/* ========================================
   AIONYX - Professional Theme System
   Dark/Light Mode with Advanced Animations
   ======================================== */

:root {
    /* Dark Theme (Default) */
    --primary: #8b5cf6;
    --primary-light: #a78bfa;
    --primary-dark: #7c3aed;
    --secondary: #ec4899;
    --secondary-light: #f472b6;
    --accent: #06b6d4;
    --accent-light: #22d3ee;

    --background: #0a0a0f;
    --background-secondary: #13131a;
    --surface: #1a1a24;
    --surface-elevated: #232333;
    --surface-hover: #2d2d3d;

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-disabled: #64748b;

    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --border-focus: rgba(139, 92, 246, 0.5);

    --success: #10b981;
    --success-bg: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);
    --error: #ef4444;
    --error-bg: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-bg: rgba(59, 130, 246, 0.1);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.6);

    --glow-primary: 0 0 20px rgba(139, 92, 246, 0.3);
    --glow-secondary: 0 0 20px rgba(236, 72, 153, 0.3);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Light Theme */
body.light-theme {
    --background: #f8fafc;
    --background-secondary: #f1f5f9;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --surface-hover: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #334155;
    --text-muted: #64748b;
    --text-disabled: #94a3b8;

    --border: rgba(0, 0, 0, 0.08);
    --border-hover: rgba(0, 0, 0, 0.15);
    --border-focus: rgba(139, 92, 246, 0.5);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.12);
}

/* ========================================
   GLOBAL STYLES
   ======================================== */

a {
    text-decoration: none !important;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background 0.5s ease, color 0.5s ease;
}

/* Animated Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.1) 0%, transparent 50%);
    z-index: -1;
    animation: gradientShift 20s ease-in-out infinite alternate;
    pointer-events: none;
}

body.light-theme::before {
    background:
        radial-gradient(circle at 20% 80%, rgba(139, 92, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(236, 72, 153, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 40% 40%, rgba(6, 182, 212, 0.03) 0%, transparent 50%);
}

/* Floating Particles */
.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: floatParticle 15s ease-in-out infinite;
}

.particle:nth-child(2n) {
    background: var(--secondary);
    animation-duration: 18s;
    animation-delay: 2s;
}

.particle:nth-child(3n) {
    background: var(--accent);
    animation-duration: 22s;
    animation-delay: 4s;
}

/* ========================================
   THEME TOGGLE BUTTON
   ======================================== */

.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 5;
    background: var(--surface-elevated);
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
    animation: slideInRight 0.8s ease-out 0.5s both;
}

.theme-toggle:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.theme-toggle-icon {
    font-size: 1.2rem;
    transition: transform var(--transition-base);
}

.theme-toggle:hover .theme-toggle-icon {
    transform: rotate(180deg);
}

.theme-toggle-text {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-secondary);
}

/* ========================================
   NAVBAR
   ======================================== */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 1rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    animation: slideInDown 0.8s ease-out;
    transition: all var(--transition-base);
}

body.light-theme .navbar {
    background: rgba(255, 255, 255, 0.8);
}

.navbar.scrolled {
    padding: 0.75rem 5%;
    box-shadow: var(--shadow-lg);
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all var(--transition-base);
}

.logo:hover {
    transform: scale(1.05);
    color: var(--primary);
}

.mobile-menu-btn {
    display: none !important;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.3s ease;
}

.mobile-menu-btn:hover {
    color: var(--primary);
}

.logo i {
    color: var(--primary);
    animation: pulse 2s ease-in-out infinite;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}



.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-item {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all var(--transition-base);
    position: relative;
    opacity: 0.9;
}

.nav-item:hover {
    color: var(--primary);
    opacity: 1;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width 0.3s ease;
}

.nav-item:hover::after {
    width: 100%;
}

.nav-btn {
    padding: 0.6rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.nav-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(139, 92, 246, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.nav-btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-login {
    color: var(--text-primary);
    border: 1px solid var(--border);
    background: var(--surface);
}

.btn-login:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-signup {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    box-shadow: var(--glow-primary);
}

.btn-signup:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

/* ========================================
   BUTTONS
   ======================================== */

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: var(--glow-primary);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    color: white;
    box-shadow: var(--glow-secondary);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(236, 72, 153, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-ghost {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-primary);
}

.btn-ghost:hover {
    background: var(--surface-hover);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

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

/* ========================================
   CARDS
   ======================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.card:hover::before {
    transform: scaleX(1);
}

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

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--glow-primary);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.card-body {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ========================================
   FORMS
   ======================================== */

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

.form-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: all var(--transition-base);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

/* ========================================
   ANIMATIONS
   ======================================== */

@keyframes slideInDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideInLeft {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }

    50% {
        opacity: 1;
        transform: scale(1.05);
    }

    70% {
        transform: scale(0.9);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes gradientShift {
    0% {
        opacity: 0.8;
        transform: rotate(0deg);
    }

    100% {
        opacity: 1;
        transform: rotate(5deg);
    }
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translateY(0px) translateX(0px);
        opacity: 0.3;
    }

    25% {
        transform: translateY(-100px) translateX(50px);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-200px) translateX(-50px);
        opacity: 0.3;
    }

    75% {
        transform: translateY(-100px) translateX(25px);
        opacity: 0.6;
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }

    100% {
        background-position: 1000px 0;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.glow {
    box-shadow: var(--glow-primary);
}

.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    border: 2px solid var(--primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    transform: translate(-50%, -50%);
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}


/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 2.5rem 0 1.5rem;
    position: relative;
    overflow: hidden;
    margin-top: auto;
}

.footer::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(168, 85, 247, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(59, 130, 246, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(168, 85, 247, 0.02) 0%, transparent 80%);
    animation: footerMove 15s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
}

@keyframes footerMove {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }

    100% {
        transform: translate(-5%, -5%) rotate(5deg);
    }
}

.footer-desktop,
.footer-mobile {
    position: relative;
    z-index: 1;
}

.footer-mobile {
    display: none;
}

.footer-desktop {
    display: block;
}

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

.footer-brand p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: all var(--transition-base);
    display: inline-block;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--surface-hover);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    text-decoration: none;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--glow-primary);
    border-color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 1.5rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .footer-desktop {
        display: none;
    }

    .footer-mobile {
        display: block;
        padding: 1.5rem 0;
        text-align: left;
    }

    .footer-mobile .footer-brand {
        margin-bottom: 1.2rem;
    }

    .footer-mobile .footer-brand h2 {
        font-size: 1.8rem;
        font-weight: 800;
        margin-bottom: 1rem;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    .footer-mobile .footer-brand p {
        color: var(--text-secondary);
        font-size: 1rem;
        line-height: 1.6;
        margin-bottom: 1.2rem;
    }

    .footer-mobile .footer-section {
        margin-bottom: 1rem;
    }

    .footer-mobile .footer-section h4 {
        color: var(--text-primary);
        font-size: 1.2rem;
        font-weight: 700;
        margin-bottom: 0.8rem;
    }

    .footer-mobile .footer-links {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }

    .footer-mobile .footer-links a {
        color: var(--text-secondary);
        text-decoration: none;
        font-size: 1.1rem;
        transition: color 0.3s ease;
    }

    .footer-mobile .footer-social {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
        justify-content: flex-start;
    }

    .footer-mobile .social-link {
        width: 45px;
        height: 45px;
        background: var(--surface-hover);
        border: 1px solid var(--border);
        border-radius: 8px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-primary);
        font-size: 1.2rem;
    }
}

/* ========================================
   RESPONSIVE
   ======================================== */


@media (max-width: 768px) {
    .theme-toggle {
        bottom: 20px;
        right: 20px;
        top: auto;
        padding: 10px 16px;
    }

    .theme-toggle-text {
        display: none;
    }

    .navbar {
        padding: 1rem 3%;
    }

    .logo {
        font-size: 1.25rem;
    }

    .mobile-menu-btn {
        display: block !important;
    }

    .nav-links {
        gap: 0.75rem;
    }

    .nav-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .container {
        padding: 0 1rem;
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: var(--background-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    border: 2px solid var(--background-secondary);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary));
}

/* ========================================
   SELECTION
   ======================================== */

::selection {
    background: var(--primary);
    color: white;
}

::-moz-selection {
    background: var(--primary);
    color: white;
}

/* ========================================
   ADVANCED ANIMATIONS
   ======================================== */

.section-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.section-reveal.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-up {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-up.active {
    opacity: 1;
    transform: translateY(0);
}

.reveal-left {
    opacity: 0;
    transform: translateX(-100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(100px);
    transition: all 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }

    100% {
        transform: translateY(0px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 5px var(--primary-light);
    }

    50% {
        box-shadow: 0 0 20px var(--primary);
    }

    100% {
        box-shadow: 0 0 5px var(--primary-light);
    }
}

.glow-pulse {
    animation: pulse-glow 3s infinite;
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
}

body.light-theme .glass-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.07);
}

/* Loader Styles */
#loader-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--background);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease-out;
}

.loader-content {
    position: relative;
    width: 150px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.loader-arc {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border-top: 2px solid var(--accent);
    border-right: 2px solid transparent;
    animation: spin 1s linear infinite;
}

.ao-logo {
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 1px;
    z-index: 2;
}

.loading-text {
    position: absolute;
    bottom: -50px;
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: var(--text-muted);
    font-weight: 600;
    animation: pulse 2s infinite;
    width: 200px;
    text-align: center;
}

/* ========================================
   MOBILE RESPONSIVENESS FIXES
   ======================================== */
@media (max-width: 768px) {

    /* Hero Section */
    .hero {
        padding: 100px 0 60px;
        min-height: auto;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero h1 {
        font-size: 2.5rem;
        /* Reduced from 4rem */
        line-height: 1.2;
    }

    .hero-description {
        font-size: 1.1rem;
        margin: 0 auto 2rem;
    }

    .hero-badge {
        margin: 0 auto 1.5rem;
    }

    .hero-features {
        align-items: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-stats {
        gap: 1rem;
        padding-top: 2rem;
        margin-top: 2rem;
    }

    .hero-stat-number {
        font-size: 1.8rem;
    }

    .hero-stat-label {
        font-size: 0.8rem;
    }

    .hero-image-container {
        max-width: 100%;
        margin: 2rem auto 0;
    }

    .hero-visual {
        margin-top: 0;
    }

    /* Hide floating decorative elements if they cause overflow */
    .floating-card {
        display: none;
    }

    /* Roadmap / Phase Section - Enhanced Mobile Fix */
    .roadmap-section .container {
        padding: 0 !important;
        max-width: 100% !important;
    }

    .roadmap-line,
    .roadmap-node,
    .roadmap-dot {
        display: none !important;
    }

    .roadmap-item {
        flex-direction: column !important;
        gap: 0 !important;
        margin-bottom: 40px !important;
        padding: 0 !important;
        width: 100% !important;
    }

    .roadmap-item.reverse {
        flex-direction: column !important;
    }

    .roadmap-content {
        width: 100% !important;
        padding: 40px 20px !important;
        text-align: center !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        min-height: auto !important;
        transform: none !important;
    }

    .roadmap-image {
        width: 100% !important;
        height: auto !important;
        max-width: none !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        transform: none !important;
        order: 2 !important;
    }

    .roadmap-content {
        order: 1 !important;
    }

    /* General Container Padding */
    .container {
        padding: 0 1.5rem;
    }

    /* Typography Adjustments */
    .section-title {
        font-size: 2rem;
    }

    /* Mobile Navigation */
    .mobile-menu-btn {
        display: block;
        padding: 5px;
    }

    .nav-links {
        display: none;
        /* Hidden by default on mobile */
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        padding: 2rem;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-xl);
        animation: slideInDown 0.3s ease-out;
    }

    .nav-links.active {
        display: flex;
    }

    .navbar {
        padding: 1rem 5%;
        /* Restore padding for better toggle placement */
    }

    /* Architecture Grid Fix */
    .arch-grid {
        display: flex;
        flex-direction: column;
        gap: 2rem;
        margin-top: 3rem;
    }

    .arch-box {
        width: 100%;
    }
}

/* Architecture Grid - Desktop Default */
.arch-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 60px;
}

/* ========================================
   CTA SECTION & CARD (Standardized)
   ======================================== */

.cta-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.cta-container {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 50px -10px rgba(139, 92, 246, 0.5);
    max-width: 800px;
    margin: 0 auto;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: floatCard 6s ease-in-out infinite;
}

@keyframes floatCard {

    0%,
    100% {
        transform: translateY(0);
        box-shadow: 0 20px 50px -10px rgba(139, 92, 246, 0.5);
    }

    50% {
        transform: translateY(-10px);
        box-shadow: 0 30px 60px -10px rgba(139, 92, 246, 0.7);
    }
}

.cta-container::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.2), transparent 70%);
    pointer-events: none;
}

.cta-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2), transparent 50%);
    animation: floatingGlow 10s ease-in-out infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes floatingGlow {
    0% {
        transform: translate(-20%, -20%) scale(1);
        opacity: 0.3;
    }

    50% {
        transform: translate(20%, 20%) scale(1.2);
        opacity: 0.7;
    }

    100% {
        transform: translate(-20%, -20%) scale(1);
        opacity: 0.3;
    }
}

.cta-content {
    position: relative;
    z-index: 2;
}

.cta-container h2 {
    font-size: 2.25rem;
    font-weight: 800;
    color: white;
    margin-bottom: 0.75rem;
}

.cta-container p {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-white {
    background: white;
    color: var(--primary);
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.3);
    color: var(--primary-dark);
}

@media (max-width: 768px) {
    .cta-section {
        padding: 60px 0;
    }

    .cta-container {
        padding: 2.5rem 1.5rem;
        margin: 0 1rem;
    }

    .cta-container h2 {
        font-size: 1.75rem;
    }

    .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn-white {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   LIGHT THEME OVERRIDES FOR HARDCODED SECTIONS
   Ensures text readability across Home, Courses, and About Us pages
   ======================================== */

/* General Card Backgrounds */
body.light-theme .roadmap-content,
body.light-theme .dev-card,
body.light-theme .vision-card,
body.light-theme .mission-card,
body.light-theme .extra-feature-card,
body.light-theme .extra-roadmap-card,
body.light-theme .all-course-card,
body.light-theme .feature-card,
body.light-theme .stat-card,
body.light-theme .review-card {
    background: rgba(255, 255, 255, 0.85) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Section Backgrounds */
body.light-theme .team-section-enhanced,
body.light-theme .vision-mission-section-enhanced,
body.light-theme .extra-course-hero,
body.light-theme .extra-roadmap-section,
body.light-theme .extra-features-section,
body.light-theme .all-courses-strip,
body.light-theme .roadmap-section {
    background: #f8fafc !important;
}

/* Overlays with hardcoded dark gradients */
body.light-theme .extra-course-hero-overlay {
    background: radial-gradient(ellipse 80% 60% at 30% 50%, rgba(255, 255, 255, 0.85) 0%, rgba(240, 240, 245, 0.93) 100%) !important;
}

body.light-theme .strip-overlay {
    background: radial-gradient(ellipse 90% 80% at 50% 50%, rgba(255, 255, 255, 0.88) 0%, rgba(245, 245, 250, 0.95) 100%) !important;
}

body.light-theme .all-course-card-overlay {
    background: linear-gradient(to top, rgba(255, 255, 255, 1), transparent) !important;
}

/* Specific text fixes */
body.light-theme .extra-roadmap-num {
    color: rgba(0, 0, 0, 0.05) !important;
}

body.light-theme .extra-roadmap-card:hover .extra-roadmap-num {
    color: rgba(0, 0, 0, 0.08) !important;
}

body.light-theme .extra-roadmap-card::before {
    background: var(--primary) !important;
    opacity: 0.1 !important;
}

body.light-theme .extra-roadmap-card:hover::before {
    opacity: 0.2 !important;
}

/* Dev card specific fix for about.html */
body.light-theme .dev-image-space {
    background: #f1f5f9 !important;
}

body.light-theme .card-social-footer {
    border-top-color: rgba(0, 0, 0, 0.05) !important;
}