:root {
    /* Green Professional Theme */
    --primary-color: #10b981; /* Emerald Green */
    --primary-hover: #059669; /* Darker Emerald */
    --secondary-color: #059669; /* Forest Green */
    --accent-color: #3b82f6; /* Blue accent */
    
    /* Light Mode */
    --background-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e2e8f0;
    --text-color: #1e293b;
    --text-secondary: #64748b;
    --error-color: #ef4444;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Animation speeds */
    --transition-fast: 0.15s;
    --transition-medium: 0.25s;
    --transition-slow: 0.4s;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-color: #10b981;
    --primary-hover: #34d399;
    --secondary-color: #059669;
    --accent-color: #60a5fa;
    
    --background-color: #0f172a;
    --card-bg: #1e293b;
    --border-color: #334155;
    --text-color: #f1f5f9;
    --text-secondary: #94a3b8;
    --error-color: #f87171;
    --success-color: #34d399;
    --warning-color: #fbbf24;
    --info-color: #60a5fa;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color var(--transition-medium), color var(--transition-medium);
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeOut {
    from { opacity: 1; }
    to { opacity: 0; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(15px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { 
        opacity: 0;
        transform: translateY(-15px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Animation Classes */
.animate-fade-in {
    animation: fadeIn 0.6s ease-out;
}

.animate-fade-in-delay {
    animation: fadeIn 0.8s ease-out 0.2s both;
}

.animate-slide-up {
    animation: slideUp 0.5s ease-out;
}

.animate-slide-up-delay {
    animation: slideUp 0.5s ease-out 0.3s both;
}

.animate-slide-down {
    animation: slideDown 0.3s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

.animate-card {
    animation: slideUp 0.4s ease-out both;
}

.animate-badge {
    animation: slideUp 0.3s ease-out both;
}

.animate-btn {
    animation: slideUp 0.25s ease-out;
}

.animate-hover:hover {
    transform: translateY(-2px);
    transition: transform var(--transition-fast) cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-modal {
    animation: slideDown 0.25s ease-out;
}

.animate-shake {
    animation: shake 0.4s ease-in-out;
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

/* Header - Mobile First */
.header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    background-color: rgba(16, 185, 129, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 60px;
}

/* Logo - Compact for Mobile */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
    text-decoration: none;
    color: white;
}

.logo-icon {
    font-size: 1.75rem;
    animation: bounce 3s ease-in-out infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    white-space: nowrap;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Tagline - Hide on mobile, show on tablet+ */
.tagline {
    display: none;
    font-size: 0.875rem;
    opacity: 0.95;
    text-align: center;
    flex: 1;
    margin: 0 1rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Theme Toggle Button with Sun-Bright Icon */
.theme-toggle-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(8px);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.theme-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: rotate(12deg) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.theme-toggle-btn:active {
    transform: rotate(12deg) scale(0.95);
}

/* Default: Show moon icon (light mode) */
.theme-toggle-btn .fa-moon {
    display: block;
    transition: transform var(--transition-medium);
}

.theme-toggle-btn .fa-sun-bright {
    display: none;
    transition: transform var(--transition-medium);
}

/* Dark mode: Show sun-bright icon */
[data-theme="dark"] .theme-toggle-btn .fa-moon {
    display: none;
}

[data-theme="dark"] .theme-toggle-btn .fa-sun-bright {
    display: block;
}

/* Add glow effect to sun icon */
[data-theme="dark"] .theme-toggle-btn .fa-sun-bright {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    color: #FFD700;
}

/* Add glow effect to moon icon */
.theme-toggle-btn .fa-moon {
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.3);
    color: #E2E8F0;
}

/* Terms Modal */
.terms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.25s ease-out;
    backdrop-filter: blur(4px);
}

.terms-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease-out;
    border: 1px solid var(--border-color);
}

.terms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.terms-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.terms-title i {
    color: var(--primary-color);
    font-size: 1.5rem;
}

.close-terms {
    background: none;
    border: none;
    font-size: 2rem;
    font-weight: 300;
    cursor: pointer;
    color: var(--text-secondary);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-medium);
    line-height: 1;
}

.close-terms:hover {
    background-color: var(--border-color);
    color: var(--error-color);
    transform: rotate(90deg);
}

/* Terms Modal Body */
.terms-body {
    padding: 1rem 0;
}

.terms-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--background-color);
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.terms-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
}

.terms-section h3 i {
    color: var(--primary-color);
}

.terms-section p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.privacy-points {
    margin-top: 1.5rem;
}

.privacy-point {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.25rem;
    padding: 1rem;
    background: var(--card-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.privacy-point i {
    color: var(--success-color);
    font-size: 1.5rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}

.privacy-point strong {
    color: var(--text-color);
    display: block;
    margin-bottom: 0.375rem;
    font-size: 1.0625rem;
}

.privacy-point p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.terms-section ul {
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.terms-section li {
    margin-bottom: 0.5rem;
}

.contact-info {
    margin-top: 2rem;
    padding: 1.5rem;
    text-align: center;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
}

.terms-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid var(--border-color);
    display: flex;
    justify-content: center;
}

/* FIXED: Terms & Conditions "I Accept" Button */
.agree-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 200px;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.agree-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.agree-button:hover::before {
    left: 100%;
}

.agree-button:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.agree-button:active {
    transform: translateY(-1px);
}

/* Token Modal */
.token-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    z-index: 1001;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.25s ease-out;
    backdrop-filter: blur(5px);
}

.token-modal-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    animation: slideDown 0.3s ease-out;
    border: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
}

.token-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    gap: 1rem;
    flex-shrink: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.token-modal-header h3 {
    font-size: 1.375rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    flex: 1;
}

.close-token-modal {
    background: none;
    border: none;
    font-size: 1.75rem;
    font-weight: 300;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.9);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-medium);
    flex-shrink: 0;
    line-height: 1;
}

.close-token-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    transform: rotate(90deg) scale(1.1);
}

.token-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
}

.token-info {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    line-height: 1.6;
    font-size: 1rem;
    background: var(--background-color);
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--primary-color);
}

.token-modal-body .form-group {
    margin-bottom: 1.5rem;
}

.token-instructions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.token-instructions h4 {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    font-size: 1.125rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.token-instructions h4 i {
    color: var(--info-color);
}

.token-instructions ol {
    margin-left: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.token-instructions li {
    margin-bottom: 0.75rem;
    line-height: 1.5;
    padding-left: 0.5rem;
}

.token-modal-footer {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    border-top: 1px solid var(--border-color);
    background: var(--card-bg);
    flex-shrink: 0;
}

.token-modal-footer .secondary-btn,
.token-modal-footer .login-token-btn {
    min-width: 140px;
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all var(--transition-medium);
}

/* Welcome Screen */
.welcome-screen {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.03), rgba(5, 150, 105, 0.03));
}

.welcome-content {
    background: var(--card-bg);
    border-radius: var(--radius-2xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-xl);
    max-width: 1100px;
    width: 100%;
    text-align: center;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.welcome-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.welcome-header {
    margin-bottom: 3rem;
}

.welcome-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 8px 16px rgba(16, 185, 129, 0.3));
    animation: float 4s ease-in-out infinite;
}

.welcome-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.welcome-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
    margin-bottom: 3rem;
}

.feature-card {
    padding: 2rem 1.5rem;
    background: var(--card-bg);
    border-radius: var(--radius-xl);
    text-align: center;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary-color);
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    opacity: 0;
    transition: opacity var(--transition-medium);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    transition: transform var(--transition-medium);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.375rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 1rem;
    margin-bottom: 0;
}

/* Rate Limit Feature Card */
.feature-card.rate-limit-feature {
    border-color: rgba(245, 158, 11, 0.3);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.05), rgba(251, 191, 36, 0.05));
}

.feature-card.rate-limit-feature:hover {
    border-color: var(--warning-color);
}

.feature-card.rate-limit-feature .feature-icon {
    color: var(--warning-color);
}

.feature-card.rate-limit-feature .rate-limit-badge-feature {
    display: inline-block;
    background: linear-gradient(135deg, var(--warning-color), #f59e0b);
    color: white;
    padding: 0.375rem 1rem;
    border-radius: 2rem;
    font-size: 0.8125rem;
    font-weight: 700;
    margin-top: 1rem;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.welcome-actions {
    margin-top: 2.5rem;
}

.security-badges {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.security-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.625rem 1.25rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    transition: all var(--transition-medium);
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.security-badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.action-buttons {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.get-started-btn, .view-terms-btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.125rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    min-width: 200px;
    justify-content: center;
    text-decoration: none;
}

.get-started-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    position: relative;
    overflow: hidden;
}

.get-started-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.get-started-btn:hover::before {
    left: 100%;
}

.get-started-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.view-terms-btn {
    background: var(--card-bg);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.view-terms-btn:hover {
    background: var(--border-color);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.welcome-note {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 1.5rem;
}

.terms-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: color var(--transition-medium);
}

.terms-link:hover {
    color: var(--secondary-color);
}

.terms-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width var(--transition-medium);
}

.terms-link:hover::after {
    width: 100%;
}

/* Main App */
.main-app {
    flex: 1;
    padding-bottom: 2rem;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 1rem;
}

.main-content {
    background-color: var(--card-bg);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-xl);
    padding: 2.5rem;
    border: 1px solid var(--border-color);
    margin-top: 1.5rem;
    position: relative;
    overflow: hidden;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Login Section */
.login-section {
    text-align: center;
}

.login-options {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    max-width: 420px;
    margin: 0 auto 2rem;
}

.login-divider {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    color: var(--text-secondary);
    font-size: 0.9375rem;
    font-weight: 500;
}

.login-divider::before,
.login-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

/* Button Styles */
.github-login-btn, .token-login-btn, .upload-btn, .secondary-btn, .login-token-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: var(--radius-lg);
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.github-login-btn {
    background: #24292e;
    color: white;
    border: 2px solid #24292e;
}

.github-login-btn:hover {
    background: #2ea44f;
    border-color: #2ea44f;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(46, 164, 79, 0.3);
}

.token-login-btn {
    background: linear-gradient(135deg, #6e5494, #c9510c);
    color: white;
    border: 2px solid transparent;
}

.token-login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(110, 84, 148, 0.4);
}

.upload-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
    border: 2px solid transparent;
    margin-top: 2rem;
    font-size: 1.125rem;
    font-weight: 700;
    padding: 1.125rem 1.5rem;
}

.upload-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.upload-btn:hover::before {
    left: 100%;
}

.upload-btn:hover:not(:disabled) {
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(16, 185, 129, 0.5);
}

.upload-btn:disabled {
    background: linear-gradient(135deg, #94d3a2, #b8a9d9);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

.secondary-btn {
    background: var(--border-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.secondary-btn:hover {
    background: var(--text-secondary);
    color: var(--card-bg);
    transform: translateY(-2px);
}

.login-token-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid transparent;
}

.login-token-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

.login-hint {
    text-align: center;
    color: var(--text-secondary);
    margin-top: 1rem;
    font-size: 0.9375rem;
}

/* User Info - FIXED: Prevent logout button from being cut off */
.user-info {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
    min-height: auto;
    position: relative;
    overflow: visible;
}

.avatar {
    font-size: 3rem;
    color: var(--primary-color);
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
    flex-shrink: 0;
}

.user-info span {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--text-color);
    flex: 1;
    min-width: 100px;
}

/* FIXED: Logout button - ensure it stays within container */
.logout-btn {
    background: linear-gradient(135deg, var(--error-color), #dc2626);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
    white-space: nowrap;
    max-width: 100%;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: var(--background-color);
    border-radius: var(--radius-xl);
    padding: 0.375rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.tab-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: var(--radius-lg);
    transition: all var(--transition-medium);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: width var(--transition-medium);
}

.tab-button:hover {
    background: var(--border-color);
    color: var(--text-color);
}

.tab-button:hover::before {
    width: 60%;
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    box-shadow: var(--shadow-md);
}

.tab-button.active::before {
    width: 100%;
    background: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

/* Search Container */
.search-container {
    position: relative;
}

.search-container input {
    padding-right: 3.5rem;
}

.search-icon {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
}

.suggestions-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    display: none;
    animation: slideDown 0.2s ease-out;
}

.suggestion-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    transition: background-color var(--transition-fast);
}

.suggestion-item:hover {
    background: var(--background-color);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item i {
    color: var(--primary-color);
    width: 1.125rem;
    font-size: 1.125rem;
}

.suggestion-name {
    font-weight: 600;
    flex: 1;
}

.repo-visibility {
    font-size: 0.8125rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    background: var(--background-color);
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.repo-visibility.private {
    background: rgba(207, 34, 46, 0.1);
    color: #cf222e;
}

/* Selected Repo Info */
.selected-repo-info {
    margin: 1.5rem 0;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.repo-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--primary-color);
    box-shadow: var(--shadow-sm);
}

.repo-card i {
    font-size: 2rem;
    color: var(--primary-color);
}

.repo-details {
    flex: 1;
}

.repo-details strong {
    display: block;
    margin-bottom: 0.375rem;
    font-size: 1.125rem;
    color: var(--text-color);
}

/* Form Styles */
h1 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    font-weight: 900;
    color: var(--text-color);
    line-height: 1.2;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.upload-form {
    margin-top: 1.5rem;
}

.form-group {
    margin-bottom: 1.75rem;
}

label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.625rem;
    font-size: 1rem;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    padding: 1rem 1.25rem;
    font-size: 1.0625rem;
    line-height: 1.5;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: all var(--transition-medium);
    background-color: var(--card-bg);
    color: var(--text-color);
    font-family: inherit;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.input-hint {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    line-height: 1.4;
}

/* FIXED: File Input Wrapper for "Choose ZIP File Manually" Button */
.file-input-wrapper {
    position: relative;
    margin: 1rem 0;
    width: 100%;
}

/* FIXED: Professional file input button */
.file-input-button {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-lg);
    font-size: 1.0625rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    width: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    border: 2px solid transparent;
}

.file-input-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.7s;
}

.file-input-button:hover::before {
    left: 100%;
}

.file-input-button:hover {
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.4);
}

/* FIXED: Hide the default file input but keep it functional */
.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 10;
}

.file-name {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    background: var(--background-color);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.9375rem;
    min-height: 46px;
}

.file-name i {
    color: var(--primary-color);
    font-size: 1.125rem;
}

/* Drag & Drop Area */
.drag-drop-area {
    border: 3px dashed var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 1.5rem;
    text-align: center;
    background: var(--background-color);
    transition: all var(--transition-medium);
    margin-bottom: 1.5rem;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.drag-drop-area.active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    animation: pulse 1.5s infinite;
}

.drag-drop-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1.25rem;
    filter: drop-shadow(0 4px 8px rgba(16, 185, 129, 0.3));
}

.drag-drop-text {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-color);
}

.drag-drop-hint {
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

/* Progress Container */
.progress-container {
    margin: 2rem 0;
    display: none;
    animation: slideUp 0.3s ease-out;
}

.progress-bar {
    height: 12px;
    background-color: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 1rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

.progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background-image: linear-gradient(
        -45deg,
        transparent 33%,
        rgba(255, 255, 255, 0.2) 33%,
        rgba(255, 255, 255, 0.2) 66%,
        transparent 66%
    );
    background-size: 35px 35px;
    animation: shimmer 2s linear infinite;
}

.progress-text {
    font-size: 1rem;
    text-align: center;
    color: var(--text-color);
    font-weight: 600;
}

/* Rate Limit Styles */
.rate-limit-info {
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
    border-radius: var(--radius-xl);
    border: 2px solid var(--warning-color);
    display: none;
    animation: slideUp 0.3s ease-out;
}

.rate-limit-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rate-limit-header i {
    font-size: 1.5rem;
    color: var(--warning-color);
    animation: pulse 2s infinite;
}

.rate-limit-header h4 {
    margin: 0;
    color: var(--text-color);
    font-weight: 700;
    font-size: 1.25rem;
}

.rate-limit-progress {
    margin: 1.25rem 0;
    height: 10px;
    background: var(--border-color);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.rate-limit-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--success-color), var(--warning-color), var(--error-color));
    border-radius: 5px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.rate-limit-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 1.5s linear infinite;
}

.rate-limit-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
    font-size: 0.9375rem;
    color: var(--text-secondary);
}

.rate-limit-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: center;
}

/* Rate Limit Badge */
.rate-limit-badge {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    animation: slideUp 0.3s ease-out;
    backdrop-filter: blur(10px);
    background-color: rgba(16, 185, 129, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.3);
    display: none;
}

.rate-limit-badge i {
    animation: bounce 2s ease-in-out infinite;
}

/* Rate Limit Toast */
.rate-limit-toast {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    background: linear-gradient(135deg, var(--error-color), #dc2626);
    color: white;
    padding: 1.5rem;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    animation: slideDown 0.3s ease-out;
    max-width: 350px;
    display: none;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.rate-limit-toast .toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.rate-limit-toast .toast-header h5 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.rate-limit-toast .close-toast {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all var(--transition-medium);
}

.rate-limit-toast .close-toast:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.rate-limit-toast .countdown-timer {
    font-size: 2rem;
    font-weight: 900;
    text-align: center;
    margin: 1rem 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.rate-limit-toast .toast-message {
    font-size: 1rem;
    opacity: 0.9;
    text-align: center;
    line-height: 1.5;
}

/* Status Messages */
.status {
    margin-top: 1.5rem;
    padding: 1.25rem;
    border-radius: var(--radius-lg);
    display: none;
    font-weight: 600;
    animation: slideUp 0.3s ease-out;
    border: 2px solid transparent;
    font-size: 1rem;
}

.status.success {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(5, 150, 105, 0.1));
    border-color: var(--success-color);
    color: var(--success-color);
}

.status.error {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1), rgba(220, 38, 38, 0.1));
    border-color: var(--error-color);
    color: var(--error-color);
}

.status.info {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    border-color: var(--info-color);
    color: var(--info-color);
}

/* Instructions */
.instructions {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(5, 150, 105, 0.05));
    border-radius: var(--radius-xl);
    font-size: 1rem;
    border-left: 4px solid var(--primary-color);
    animation: slideUp 0.5s ease-out;
    border: 1px solid var(--border-color);
}

.instructions h3 {
    margin-bottom: 1.5rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.875rem;
    font-size: 1.375rem;
    font-weight: 700;
}

.usage-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.usage-tab h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.usage-tab ol {
    padding-left: 1.5rem;
}

.usage-tab li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.tips {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 2px solid var(--border-color);
}

.tips h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.tips ul {
    padding-left: 1.5rem;
}

.tips li {
    margin-bottom: 0.75rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--card-bg);
    color: var(--text-secondary);
    padding: 2rem 0;
    margin-top: auto;
    border-top: 2px solid var(--border-color);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.875rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-color);
}

.footer-brand i {
    color: var(--primary-color);
    font-size: 1.375rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.625rem;
    transition: all var(--transition-medium);
    font-size: 1rem;
    font-weight: 500;
}

.footer-link:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

.footer-link i {
    font-size: 1.125rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--border-color);
    color: var(--text-color);
    text-decoration: none;
    transition: all var(--transition-medium) cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1.25rem;
}

.social-link:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.social-link.instagram {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.social-link.telegram {
    background: linear-gradient(45deg, #0088cc, #00a8e8);
}

.copyright {
    font-size: 0.875rem;
    opacity: 0.8;
    margin-top: 1rem;
}

.footer-note {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    opacity: 0.7;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
    margin-right: 0.75rem;
    vertical-align: middle;
}

/* Mobile Responsive */
@media (max-width: 640px) {
    .header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        padding: 0 0.75rem;
        gap: 0.75rem;
        min-height: 56px;
    }
    
    .logo-text {
        font-size: 1.125rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .theme-toggle-btn {
        width: 40px;
        height: 40px;
        font-size: 1.125rem;
    }
    
    .welcome-content {
        padding: 1.75rem;
    }
    
    .welcome-header h1 {
        font-size: 2rem;
    }
    
    .welcome-icon {
        font-size: 3.5rem;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    
    .feature-card {
        padding: 1.75rem 1.25rem;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .get-started-btn, .view-terms-btn {
        width: 100%;
        min-width: unset;
        padding: 1rem 1.5rem;
    }
    
    .main-content {
        padding: 1.75rem;
        margin-top: 1rem;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .tab-navigation {
        flex-direction: column;
        gap: 0.375rem;
    }
    
    .rate-limit-stats {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .rate-limit-badge {
        bottom: 1rem;
        right: 1rem;
        left: 1rem;
        justify-content: center;
    }
    
    .rate-limit-toast {
        top: 1rem;
        right: 1rem;
        left: 1rem;
        max-width: none;
    }
    
    .usage-tabs {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .token-modal-content {
        margin: 0.5rem;
    }
    
    .token-modal-header h3 {
        font-size: 1.125rem;
    }
    
    .token-modal-footer {
        flex-direction: column;
    }
    
    .token-modal-footer .secondary-btn,
    .token-modal-footer .login-token-btn {
        width: 100%;
        min-width: unset;
    }
    
    /* Mobile fixes for user info */
    .user-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .logout-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet */
@media (min-width: 641px) and (max-width: 1024px) {
    .header-content {
        padding: 0 1.5rem;
    }
    
    .tagline {
        display: block;
        font-size: 0.9375rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    .main-content {
        padding: 2rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        text-align: left;
        align-items: center;
        gap: 2rem;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
    
    .social-links {
        justify-content: flex-end;
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .header-content {
        padding: 0 2rem;
    }
    
    .tagline {
        display: block;
        font-size: 1rem;
    }
    
    .logo-text {
        font-size: 1.5rem;
    }
    
    .logo-icon {
        font-size: 2rem;
    }
    
    .theme-toggle-btn {
        width: 46px;
        height: 46px;
        font-size: 1.375rem;
    }
    
    .welcome-content {
        padding: 3.5rem;
    }
    
    .welcome-header h1 {
        font-size: 3rem;
    }
    
    .welcome-icon {
        font-size: 4.5rem;
    }
    
    .features-grid {
        gap: 2rem;
    }
    
    .container {
        padding: 2rem;
    }
    
    .main-content {
        padding: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
        text-align: left;
        align-items: center;
        gap: 2rem;
    }
    
    .footer-links {
        justify-content: flex-start;
    }
    
    .social-links {
        justify-content: flex-end;
    }
    
    .copyright {
        grid-column: 1 / -1;
        text-align: center;
        margin-top: 1.5rem;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease-out;
}

.loading-spinner {
    width: 70px;
    height: 70px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Focus States for Accessibility */
:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .header-actions,
    .footer,
    .login-section,
    .tab-navigation,
    .rate-limit-badge,
    .rate-limit-toast,
    .rate-limit-info,
    .instructions,
    .social-links {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .main-content {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
        padding: 1rem !important;
    }
    
    .header {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        border-bottom: 2px solid #000 !important;
    }
}