:root {
    --bg-dark: #0f0f1a;
    --nav-bg: #12121f;
    --card-bg: #16162a;
    --card-border: #252545;
    --card-hover: #1a1a35;
    --text-primary: #d0d0d0;
    --text-title: #ffffff;
    --text-secondary: #aaaaaa;
    --accent-gold: #f0c040;
}

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

html {
    scroll-behavior: auto;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background-color: rgba(15, 15, 26, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 12px 30px rgba(5, 8, 15, 0.22);
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 3rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
    color: var(--text-primary);
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.logo-img {
    height: 35px;
    width: auto;
    animation: logo-glow 2.5s ease-in-out infinite alternate;
}

@keyframes logo-glow {
    0% {
        filter: brightness(1.6) contrast(1.3)
                drop-shadow(0 0 4px rgba(0, 200, 255, 0.3));
    }
    100% {
        filter: brightness(1.6) contrast(1.3)
                drop-shadow(0 0 12px rgba(0, 200, 255, 0.8));
    }
}

.logo-accent {
    color: var(--accent-gold);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--accent-gold);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}


.btn-signin,
.btn-register {
    text-decoration: none;
    color: var(--accent-gold);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 6px;
    display: inline-block;
    background: transparent;
    border: 1px solid rgba(240, 192, 64, 0.35);
    transition: all 0.2s ease;
}

.btn-signin:hover,
.btn-register:hover {
    background: linear-gradient(135deg, #f5cc55, #e0b030);
    color: #1a1a2e;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(240, 192, 64, 0.25);
    border-color: transparent;
}

.btn-signin:active,
.btn-register:active {
    transform: translateY(0);
}

.back-btn {
    font-size: small !important;
    background: var(--bg);
    color: var(--bg) !important;
    font-weight: bold;
    margin-bottom: 2rem;
    text-decoration: none;
    display: flex; 
    justify-content: flex-start;
}

.back-btn:hover {
    color: #d4a72d;
    text-decoration: underline !important;
    transform: scale(1.05);
}

/* ==========================================================================
   Upgraded Modern Hero Section (UI/UX Production-Checked Revision)
   ========================================================================== */
.hero {
    position: relative;
    min-height: 80vh;
    background-color: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 4rem 1.5rem;
    max-width: 100%;
    margin: 0 auto;
    overflow: hidden;
}

/* Ambient Visual Background Glow Depth Layout */
.ambient-glow {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(130px);
    opacity: 0.07;
    width: 380px;
    height: 380px;
    z-index: 1;
}

.glow-gold {
    top: 15%;
    left: 15%;
    background-color: var(--accent-gold);
}

.glow-blue {
    bottom: 15%;
    right: 15%;
    background-color: #3b82f6;
}

.hero-inner-wrapper {
    position: relative;
    max-width: 850px;
    margin: 0 auto;
    text-align: center;
    z-index: 5;
}

/* Technical Hybrid Architecture Tag */
.architecture-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    background-color: rgba(30, 41, 59, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 9999px;
    padding: 0.45rem 1.2rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #cbd5e1;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.live-pulse {
    width: 6px;
    height: 6px;
    background-color: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 8px #10b981;
    animation: micro-engine-pulse 2s infinite ease-in-out;
}

.hero-title {
    font-size: clamp(2.4rem, 6vw, 4.2rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-title);
    margin: 0 auto 1.5rem auto;
}

.gradient-text-gold {
    background: linear-gradient(135deg, var(--accent-gold) 0%, #ffeaa7 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: var(--accent-gold);
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2.5vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 640px;
    margin: 0 auto 2.8rem auto;
    line-height: 1.6;
    font-weight: 400;
}

.text-highlight {
    color: #f1f5f9;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    gap: 1.25rem;
    justify-content: center;
    align-items: center;
}

/* Primary High-Contrast Accent Buttons */
.btn-primary-gold {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    background: linear-gradient(135deg, var(--accent-gold), #d4a020);
    color: #1a1a2e;
    box-shadow: 0 10px 20px -5px rgba(240, 192, 64, 0.25);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    cursor: pointer;
}

.btn-primary-gold:hover {
    background: linear-gradient(135deg, #f5cc55, #e0b030);
    transform: translateY(-2px);
    box-shadow: 0 12px 24px -5px rgba(240, 192, 64, 0.45);
}

/* Ghost Outline Muted Buttons */
.btn-secondary-ghost {
    display: inline-block;
    padding: 0.9rem 2.4rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    background-color: rgba(15, 23, 42, 0.45);
    color: #cbd5e1;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
}

.btn-secondary-ghost:hover {
    background-color: rgba(30, 41, 59, 0.65);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
    transform: translateY(-1px);
}

@keyframes micro-engine-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.25); opacity: 0.4; }
}

/* ==========================================================================
   Features, About, and Structural Layout Containers
   ========================================================================== */
.features {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    height: 180px;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--accent-gold);
    box-shadow: 0 0 18px rgba(240, 192, 64, 0.18);
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: opacity 0.3s;
}

.card-front,
.card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    transition: opacity 0.3s ease;
}

.card-front {
    opacity: 1;
}

.card-back {
    opacity: 0;
    pointer-events: none;
    text-align: left;
    justify-content: center;
    background-color: var(--card-hover);
}

.card-back p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.card:hover .card-front,
.card:focus-within .card-front {
    opacity: 0;
}

.card:hover .card-back,
.card:focus-within .card-back {
    opacity: 1;
    pointer-events: auto;
}

.card-icon {
    margin-bottom: 1rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-gold);
}
.about {
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.section-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.about-content p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.8;
}

.footer {
    max-width: 1200px;
    margin: 4rem auto 2rem;
    padding: 3rem 4rem 1.5rem;
    background-color: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.footer-container {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    padding-bottom: 2rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.footer-col:first-child {
    max-width: 380px;
}

.footer-col p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
}

.footer-col h4 {
    color: var(--text-title);
    font-size: 1.05rem;
    font-weight: 700;
    font-family: 'Cinzel', serif;
    margin-bottom: 0.5rem;
    letter-spacing: 1px;
}

.footer-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-link:hover {
    color: var(--accent-gold);
    transform: translateX(3px);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.footer-copy {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.footer-socials {
    display: flex;
    gap: 1.2rem;
}

.footer-socials a {
    color: var(--text-secondary);
    transition: color 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
}

.footer-socials a:hover {
    color: var(--accent-gold);
    transform: scale(1.1);
}

/* ==========================================================================
   Media Queries & Mobile Layout Refinement Breakpoints
   ========================================================================== */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    .nav-left {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        display: none;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .btn-primary-gold,
    .btn-secondary-ghost {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }

    .footer-container {
        flex-direction: column;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
    }

    .card {
        height: auto;
        min-height: 260px;
        cursor: default;
    }

    .card-front,
    .card-back {
        position: relative;
        opacity: 1;
        pointer-events: auto;
    }

    .card-back {
        background-color: transparent;
        padding-top: 0;
    }

    .card:hover .card-front,
    .card:hover .card-back,
    .card:focus-within .card-front,
    .card:focus-within .card-back {
        opacity: 1;
    }
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    .btn-primary-gold, .btn-secondary-ghost {
        width: 100%;
        text-align: center;
        box-sizing: border-box;
    }
}