:root {
    --primary-orange: linear-gradient(180deg, #FFB347 0%, #FF8C00 100%);
    --hover-orange: linear-gradient(180deg, #FF8C00 0%, #E67E00 100%);
    --border-yellow: #FFD700;
    --bg-light: #f8fafc;
    --text-dark: #1e293b;
    --safe-green: #22c55e;
    --link-blue: #2563eb;
    --alert-red: #ef4444;
}

body {
    font-family: 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-light);
    margin: 0;
    color: var(--text-dark);
}

/* Navigation */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 40px;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.logo {
    font-size: 24px;
    font-weight: 900;
    letter-spacing: -1px;
}

.logo span {
    color: #FF8C00;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 60px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

h1 {
    font-size: 52px;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.1;
}

.subtitle {
    font-size: 20px;
    color: #64748b;
    margin-bottom: 40px;
}

/* Main Orange Button */
.upload-box {
    position: relative;
    display: inline-block;
    margin-bottom: 30px;
}

.btn-main-upload {
    display: inline-block;
    background: var(--primary-orange);
    color: white;
    padding: 25px 60px;
    border-radius: 60px;
    font-size: 28px;
    font-weight: 900;
    border: 3px solid var(--border-yellow);
    box-shadow: 0 15px 35px rgba(255, 140, 0, 0.4);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-transform: uppercase;
}

.btn-main-upload:hover {
    background: var(--hover-orange);
    transform: scale(1.05);
}

.btn-main-upload:disabled {
    background: #cbd5e1;
    border-color: #94a3b8;
    box-shadow: none;
    cursor: not-allowed;
}

/* Standard UI Button (Elegant Gradient) */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #FFB347 0%, #FF8C00 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 50px;
    /* Elegant pill shape */
    font-size: 16px;
    font-weight: 600;
    border: none;
    box-shadow: 0 4px 15px rgba(255, 140, 0, 0.3);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    text-transform: uppercase;
    text-align: center;
    letter-spacing: 0.5px;
    width: auto;
    /* Prevent full width */
    margin-top: 10px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #FF8C00 0%, #E67E00 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px (255, 140, 0, 0.4);
}

#fileInput {
    display: none;
}

.invitation {
    font-size: 18px;
    font-weight: 700;
    color: #ff8c00;
    margin-top: 15px;
    animation: pulse 2s infinite;
}

/* Hidden Dashboard Logic */
#processingDashboard {
    display: none;
    margin-top: 40px;
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    text-align: center;
}

.stat-val {
    font-size: 24px;
    font-weight: 800;
    color: var(--link-blue);
    display: block;
}

.stat-val.alert {
    color: var(--alert-red);
}

.stat-lbl {
    font-size: 10px;
    text-transform: uppercase;
    color: #94a3b8;
    font-weight: 700;
}

/* Modules Section */
.modules-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    gap: 20px;
    text-align: center;
}

.module-item {
    background: white;
    padding: 20px;
    border-radius: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
}

/* Switch UI */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked+.slider {
    background-color: var(--safe-green);
}

input:checked+.slider:before {
    transform: translateX(24px);
}

/* Modals */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.95);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-card {
    background: white;
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 550px;
    text-align: center;
    border: 4px solid var(--border-yellow);
    overflow-y: auto;
    max-height: 90vh;
}

/* Diff Box for Verification */
.diff-box {
    text-align: left;
    padding: 15px;
    background: #1e1e1e;
    color: #d4d4d4;
    border-radius: 8px;
    margin: 15px 0;
    font-family: 'Consolas', monospace;
    white-space: pre-wrap;
    line-height: 1.4;
    border-left: 5px solid #1a73e8;
    font-size: 14px;
}

/* Viral Section */
.viral-box {
    background: #f0fdf4;
    border: 2px dashed #22c55e;
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
}

.btn-fb {
    background: #1877F2;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px auto;
    width: fit-content;
}

.trust-banner {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 50px;
    opacity: 0.6;
    font-size: 17px;
    font-weight: 600;
}

textarea {
    width: 100%;
    height: 100px;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-family: monospace;
}

.btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-top: 15px;
}

.btn-action {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

/* Footer & Tooltip */
footer {
    margin-top: 60px;
    padding: 30px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    color: #64748b;
    font-size: 14px;
}

.disclaimer {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.8;
}

.tooltip {
    position: relative;
    display: inline-block;
    cursor: help;
    margin-left: 5px;
    color: var(--link-blue);
    border-bottom: 1px dotted var(--link-blue);
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 220px;
    background-color: #334155;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 10;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

.tooltip .tooltiptext::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #334155 transparent transparent transparent;
}