/* CSS Reset & Variables */
:root {
    --color-primary: #fed700;
    --color-primary-light: #fed700;
    --color-secondary: #fed700;
    --color-secondary-light: #FEF08A;
    --color-bg: #FFFDF0;
    --color-bg-light: #FFF8DB;
    --color-text: #111827;
    --color-text-muted: #4B5563;
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
    
    --shadow-soft: 0 8px 32px rgba(0, 0, 0, 0.04);
    --shadow-premium: 0 20px 50px rgba(0, 0, 0, 0.1);
    --radius-md: 12px;
    --radius-lg: 24px;
    --radius-full: 9999px;
    
    --font-main: 'Poppins', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-norm: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    
    --glow-primary: rgba(251, 191, 36, 0.4);
    --glow-secondary: rgba(250, 204, 21, 0.4);
}

/* Background Blobs Layer */
.blobs-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    pointer-events: none;
    background: transparent;
}

.blob {
    position: absolute;
    width: 40vw;
    height: 40vw;
    background: var(--color-primary);
    filter: blur(100px);
    border-radius: 50%;
    opacity: 0.25;
    animation: blobMove 40s linear infinite alternate;
}

.blob-2 {
    background: var(--color-secondary);
    width: 50vw;
    height: 50vw;
    right: -10vw;
    top: 20vh;
    animation-duration: 60s;
    animation-delay: -5s;
}

.blob-3 {
    background: #FEF08A;
    width: 30vw;
    height: 30vw;
    left: 20vw;
    bottom: -10vh;
    animation-duration: 50s;
    opacity: 0.15;
}

@keyframes blobMove {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(10vw, 5vh) scale(1.1); }
    66% { transform: translate(-5vw, 15vh) scale(0.9); }
    100% { transform: translate(0, 0) scale(1); }
}

/* Cursor Glow Effect */
#cursor-glow {
    position: fixed;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(253, 224, 71, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999;
    transform: translate(-50%, -50%);
    mix-blend-mode: screen;
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: var(--font-main);
    background: #ffffff;
    min-height: 100dvh;
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
    position: relative;
    scroll-behavior: smooth;
}

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-gradient {
    background: var(--color-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glassmorphism */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-norm);
    text-align: center;
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--color-primary);
    color: #111;
    box-shadow: 0 4px 15px rgba(251, 191, 36, 0.3);
}

.btn-primary:hover, .glow-hover:hover {
    box-shadow: 0 8px 25px rgba(251, 191, 36, 0.5);
}

.btn-ghost {
    background: transparent;
    color: var(--color-text);
}

.btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--color-primary);
}

/* Legacy Navbar styles removed - replaced by header.css */


/* Basic Layout Adjustments for Main */
.main-content {
    min-height: 100dvh;
}

/* Footer */
.footer {
    background: #fed700;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer h3, .footer h4 {
    margin-bottom: 20px;
    color: #111;
}

.footer p {
    color: #1F2937;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #1F2937;
    text-decoration: none;
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: #B45309;
}

.footer-bottom {
    text-align: center;
    color: #1F2937;
    border-top: 1px solid rgba(0,0,0,0.1);
    padding-top: 20px;
}

/* Animations */
.fade-up {
    /* Always visible by default to prevent "missing data" on slow load */
    opacity: 1;
    transform: translateY(0);
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.8s ease-out;
}

/* Only hide if JS is confirmed to be handling the reveal */
body.js-enabled .fade-up:not(.visible) {
    opacity: 0;
    transform: translateY(30px);
}

.fade-up.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Fallback: if JS never fires, still show content after 1s */
@keyframes fallbackShow {
    to { opacity: 1; transform: translateY(0); }
}

.scale-up {
    transition: transform var(--transition-norm), box-shadow var(--transition-norm);
}

.scale-up:hover {
    transform: scale(1.05);
}

/* Page Transition */
.page-transition {
    animation: smoothFade 0.5s ease forwards;
}

.page-section {
    display: none;
    animation: fadeIn 0.5s ease;
}

.page-section.active {
    display: block;
}

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

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

/* Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--glass-border);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Spinner Small */
.spinner-small {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top: 2px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    display: inline-block;
}

@media (max-width: 1024px) {
    .mobile-profile-name {
        font-size: 17px;
        font-weight: 700;
        color: #111;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .mobile-profile-email {
        font-size: 13px;
        color: #666;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }
    
    .mobile-auth-links {
        list-style: none;
        padding: 0;
        margin: 0 0 10px 0;
        width: 100%;
    }

    .mobile-auth-links li {
        width: 100%;
    }

    .mobile-auth-links a {
        display: flex;
        align-items: center;
        padding: 14px 12px;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 500;
        color: #444;
        text-decoration: none;
        transition: background 0.2s;
        margin-bottom: 4px;
        min-height: 44px; /* Touch friendly */
    }

    .mobile-auth-links a:hover {
        background: #FFF8E1;
        color: #000;
    }
}

/* ─── Login Page Stabilization ─────────────────────────────────────────── */

/* ─── Footer Mobile Alignment Fix ────────────────────────────────────────── */
@media (max-width: 768px) {
    .footer-contact, .footer-social {
        justify-self: start !important;
    }
}
