/* ===== CSS Variables ===== */
:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);

    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.4);

    --ad-bg: rgba(255, 255, 255, 0.05);

    --accent-primary: #6366f1;
    --accent-secondary: #8b5cf6;
    --accent-tertiary: #a855f7;
    --accent-light: #818cf8;
    --accent-glow: rgba(99, 102, 241, 0.4);

    --success: #10b981;
    --success-glow: rgba(16, 185, 129, 0.3);

    --border-color: rgba(255, 255, 255, 0.08);
    --border-active: rgba(99, 102, 241, 0.5);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.5);

    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ===== Light Theme Variables ===== */
[data-theme="light"] {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --ad-bg: rgba(0, 0, 0, 0.05);

    --accent-primary: #4f46e5;
    --accent-secondary: #7c3aed;
    --accent-tertiary: #9333ea;
    --accent-light: #6366f1;
    --accent-glow: rgba(79, 70, 229, 0.3);

    --success: #059669;
    --success-glow: rgba(5, 150, 105, 0.2);

    --border-color: rgba(0, 0, 0, 0.1);
    --border-active: rgba(79, 70, 229, 0.5);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 64px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .orb {
    opacity: 0.15;
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.9);
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===== Background Effects ===== */
.background-effects {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: -1;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.5;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    top: -200px;
    right: -200px;
    animation-delay: 0s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-tertiary));
    bottom: -150px;
    left: -150px;
    animation-delay: -7s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: linear-gradient(135deg, var(--accent-tertiary), var(--accent-primary));
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation-delay: -14s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) scale(1);
    }

    25% {
        transform: translate(30px, -30px) scale(1.05);
    }

    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }

    75% {
        transform: translate(-30px, -20px) scale(1.02);
    }
}

/* ===== Container ===== */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* ===== Header ===== */
.header {
    text-align: center;
    margin-bottom: 3rem;
    padding-top: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.logo-icon {
    width: 48px;
    height: 48px;
    color: var(--accent-primary);
    filter: drop-shadow(0 0 20px var(--accent-glow));
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ===== Theme Toggle ===== */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
}

/* ===== Cards ===== */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
}

.card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(255, 255, 255, 0.12);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.step-badge {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ffffff;
    box-shadow: 0 0 20px var(--accent-glow);
}

.card-header h2 {
    font-size: 1.25rem;
    font-weight: 600;
}

/* ===== Mode Selection ===== */
.mode-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.mode-option {
    cursor: pointer;
}

.mode-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.mode-card {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition-normal);
    height: 100%;
}

.mode-option:hover .mode-card {
    border-color: var(--border-active);
    transform: translateY(-2px);
}

.mode-option input:checked+.mode-card {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.1);
    box-shadow: 0 0 30px var(--accent-glow);
}

.mode-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1rem;
    color: var(--accent-primary);
}

.mode-icon svg {
    width: 100%;
    height: 100%;
}

.mode-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.mode-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ===== Upload Section ===== */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-normal);
    background: rgba(0, 0, 0, 0.2);
}

.upload-area:hover,
.upload-area.drag-over {
    border-color: var(--accent-primary);
    background: rgba(99, 102, 241, 0.05);
}

.upload-area.drag-over {
    transform: scale(1.01);
    box-shadow: 0 0 40px var(--accent-glow);
}

.upload-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    color: var(--accent-primary);
    opacity: 0.8;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
}

.upload-text {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.upload-subtext {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.upload-formats {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* ===== File List ===== */
.file-list {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.file-list:empty {
    display: none;
}

.file-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.875rem 1rem;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.file-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #10b981, #059669);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.file-icon svg {
    width: 24px;
    height: 24px;
    color: white;
}

.file-info {
    flex: 1;
    min-width: 0;
}

.file-name {
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-size {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.file-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.file-remove:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.file-remove svg {
    width: 20px;
    height: 20px;
}

/* ===== Generate Section ===== */
.generate-section {
    text-align: center;
}

.generate-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px var(--accent-glow);
}

.generate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.generate-btn:active:not(:disabled) {
    transform: translateY(0);
}

.generate-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none;
}

.generate-btn svg {
    width: 24px;
    height: 24px;
}

/* ===== Progress ===== */
.progress-container {
    margin-top: 1.5rem;
}

.progress-bar {
    height: 8px;
    background: var(--bg-secondary);
    border-radius: 100px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));
    border-radius: 100px;
    transition: width 0.3s ease;
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.progress-text {
    margin-top: 0.75rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== Result Section ===== */
.result-section {
    margin-top: 1.5rem;
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.result-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.result-icon {
    width: 48px;
    height: 48px;
    color: var(--success);
    flex-shrink: 0;
}

.result-details h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--success);
}

.result-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    background: linear-gradient(135deg, var(--success), #059669);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    box-shadow: 0 4px 20px var(--success-glow);
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--success-glow);
}

.download-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Footer ===== */
.footer {
    text-align: center;
    padding: 2rem 0 1rem;
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
}

.footer-links .divider {
    color: var(--text-muted);
}

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.footer-tools {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.footer-tools-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-tools a {
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.footer-tools a:hover {
    color: var(--accent-secondary);
    text-decoration: underline;
}

.footer-tools .divider {
    color: var(--text-muted);
    font-size: 0.75rem;
}

/* ===== Navbar ===== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-logo {
    width: 28px;
    height: 28px;
    color: var(--accent-primary);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-dropdown {
    position: relative;
}

.dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition-fast);
}

.dropdown-trigger:hover {
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.dropdown-trigger svg {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

.nav-dropdown:hover .dropdown-trigger svg {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    min-width: 180px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.nav-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

/* Theme Toggle Button */
.theme-toggle {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    background: var(--bg-card-hover);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    font-size: 0.875rem;
}

.dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--text-primary);
}

.dropdown-item svg {
    width: 18px;
    height: 18px;
    color: var(--accent-primary);
}

.dropdown-logo {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    object-fit: cover;
}

/* ===== Auth Buttons & User Panel ===== */
.nav-auth {
    display: flex;
    align-items: center;
}

.notification-bell:hover {
    color: var(--text-primary) !important;
}

.notification-dropdown.active {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
}

.login-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--accent-glow);
}

.login-btn svg {
    width: 18px;
    height: 18px;
}

.user-panel {
    position: relative;
    cursor: pointer;
}

/* ===== Ads ===== */
.ad-container {
    background: var(--ad-bg);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    margin-bottom: 2rem;
    overflow: hidden;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-top {
    margin-bottom: 1rem;
}

/* ===== Premium Banner ===== */
.premium-banner {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--accent-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.15);
}

.premium-content h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 0.25rem;
}

.premium-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.premium-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    background: var(--accent-primary);
    color: white;
    text-decoration: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: var(--transition-normal);
}

.premium-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--accent-glow);
}

@media (max-width: 600px) {
    .premium-banner {
        flex-direction: column;
        text-align: center;
    }

    .premium-btn {
        width: 100%;
    }
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--accent-primary);
    object-fit: cover;
    transition: var(--transition-fast);
}

/* Premium User Styles */
.premium-user .user-avatar {
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-primary), var(--bg-primary)) padding-box,
        linear-gradient(135deg, #FFD700, #FFA500) border-box;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.3);
}

.premium-badge {
    color: #FFD700;
    margin-left: 0.5rem;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.premium-badge svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

.user-avatar:hover {
    border-color: var(--accent-secondary);
    box-shadow: 0 0 16px var(--accent-glow);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.75rem);
    right: 0;
    width: 240px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
    z-index: 100;
    box-shadow: var(--shadow-lg);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-info {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
}

.user-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
}

.user-email {
    font-size: 0.8rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-divider-light {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 0.75rem 0;
}

.stat-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    margin-bottom: 0.75rem;
}

.stat-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
    transition: background 0.2s;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.06);
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--accent-light, #818cf8);
}

.premium-info-card {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    margin-top: 0.75rem;
    border: 1px solid rgba(251, 191, 36, 0.3);
    background: rgba(251, 191, 36, 0.05);
    border-radius: var(--radius-md);
    color: #fbbf24;
    font-size: 0.85rem;
    font-weight: 600;
}

.premium-info-card.expired {
    border-color: rgba(239, 68, 68, 0.3);
    background: rgba(239, 68, 68, 0.05);
    color: #ef4444;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 0.5rem 0;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.625rem 1rem;
    background: transparent;
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-md);
    color: #ef4444;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
}

.logout-btn svg {
    width: 18px;
    height: 18px;
}

/* ===== Login Modal ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    transform: scale(0.9);
    transition: var(--transition-normal);
}

.modal-overlay.active .modal {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.modal-close svg {
    width: 20px;
    height: 20px;
}

.modal-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.modal-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 50%;
    color: white;
}

.modal-icon svg {
    width: 32px;
    height: 32px;
}

.modal-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.google-signin-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: none;
    border-radius: var(--radius-md);
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-normal);
}

.google-signin-btn:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.google-signin-btn svg {
    width: 20px;
    height: 20px;
}

/* ===== Help Modal Styles ===== */
.help-modal {
    max-width: 450px;
}

.help-icon {
    background: linear-gradient(135deg, #10b981, #059669) !important;
}

.help-body {
    gap: 1.25rem;
}

.help-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.help-step {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.help-step-number {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-primary);
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.help-step p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.help-email-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-md);
    margin-left: 2rem;
}

.help-email-box svg {
    width: 20px;
    height: 20px;
    color: var(--accent-primary);
    flex-shrink: 0;
}

.help-email {
    flex: 1;
    font-weight: 500;
    color: var(--accent-primary);
    font-size: 0.9rem;
    word-break: break-all;
}

.copy-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition-fast);
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.copy-btn.copied {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.copy-btn svg {
    width: 16px;
    height: 16px;
}

.help-response-time {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    border-radius: var(--radius-md);
    color: #fbbf24;
}

.help-response-time svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.help-response-time span {
    font-size: 0.9rem;
}

.help-response-time strong {
    color: var(--text-primary);
}

.help-mail-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.help-mail-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: white;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-normal);
}

.help-mail-btn svg {
    width: 24px;
    height: 24px;
}

.help-mail-btn:hover {
    transform: translateY(-2px);
}

.gmail-btn {
    background: linear-gradient(135deg, #ea4335, #c23321);
}

.gmail-btn:hover {
    box-shadow: 0 4px 16px rgba(234, 67, 53, 0.4);
}

.outlook-btn {
    background: linear-gradient(135deg, #0078d4, #005a9e);
}

.outlook-btn:hover {
    box-shadow: 0 4px 16px rgba(0, 120, 212, 0.4);
}

.default-btn {
    background: linear-gradient(135deg, var(--success), #059669);
}

.default-btn:hover {
    box-shadow: 0 4px 16px var(--success-glow);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .navbar {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .nav-links {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .logo h1 {
        font-size: 2rem;
    }

    .logo-icon {
        width: 40px;
        height: 40px;
    }

    .card {
        padding: 1.25rem;
    }

    .mode-options {
        grid-template-columns: 1fr;
    }

    .upload-area {
        padding: 2rem 1rem;
    }

    .generate-btn {
        width: 100%;
    }

    .orb-1,
    .orb-2,
    .orb-3 {
        opacity: 0.3;
    }

    .dropdown-menu {
        left: 0;
        transform: none;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.75rem;
    }

    .tagline {
        font-size: 0.95rem;
    }

    .card-header h2 {
        font-size: 1.1rem;
    }

    .nav-brand .nav-title {
        display: none;
    }

    .login-btn span {
        display: none;
    }
}

/* Limit Modal */
.limit-modal-content {
    border: 1px solid rgba(234, 67, 53, 0.3);
}

.limit-icon {
    background: rgba(234, 67, 53, 0.1);
    color: #ea4335;
}

.limit-message {
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
    text-align: left;
}

.limit-message p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.contact-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    padding: 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.contact-box span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.9rem;
    word-break: break-all;
}

.copy-email-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: var(--transition-fast);
}

.copy-email-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}