:root {
    --bg-primary: #0a0f24;
    --bg-secondary: #13254e;
    --text-primary: #f8f9fa;
    --color-accent: #FFE066;
    --glass-bg: rgba(19, 37, 78, 0.4);
    --glass-border: rgba(255, 255, 255, 0.1);
}

body {
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    background-attachment: fixed;
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    letter-spacing: 0.3px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

header.main-header {
    padding: 25px 40px;
    position: relative;
    display: flex;
    justify-content: flex-end;
}

/* --- POPOVER FULLSCREEN MENU --- */

.menu-trigger {
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    padding: 10px;
}

.menu-trigger .navicon {
    display: block;
    width: 32px;
    height: 3px;
    background: var(--text-primary);
    position: relative;
    border-radius: 3px;
    transition: background 0.3s;
}

.menu-trigger .navicon::before,
.menu-trigger .navicon::after {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: var(--text-primary);
    position: absolute;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.menu-trigger .navicon::before { top: -10px; }
.menu-trigger .navicon::after { top: 10px; }
.menu-trigger:hover .navicon,
.menu-trigger:hover .navicon::before,
.menu-trigger:hover .navicon::after {
    background: var(--color-accent);
}

/* Overlay Popover Styling */
.fullscreen-overlay {
    width: 100vw;
    height: 100vh;
    margin: 0;
    padding: 0;
    border: none;
    background: rgba(10, 15, 36, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: var(--text-primary);
    
    /* Flexbox centering for content inside */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    
    /* Top-layer animations */
    opacity: 0;
    transform: scale(1.05);
    transition-property: opacity, transform, display, overlay;
    transition-duration: 0.4s;
    transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
    transition-behavior: allow-discrete;
}

.fullscreen-overlay:popover-open {
    opacity: 1;
    transform: scale(1);
}

@starting-style {
    .fullscreen-overlay:popover-open {
        opacity: 0;
        transform: scale(1.05);
    }
}

.fullscreen-overlay::backdrop {
    background: rgba(0, 0, 0, 0);
    transition: display 0.4s allow-discrete, overlay 0.4s allow-discrete, background-color 0.4s ease;
}

.fullscreen-overlay:popover-open::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

@starting-style {
    .fullscreen-overlay:popover-open::backdrop {
        background: rgba(0, 0, 0, 0);
    }
}

.close-menu {
    position: absolute;
    top: 30px;
    right: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    transition: transform 0.3s ease, color 0.3s ease;
}

.close-menu:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.fullscreen-overlay nav.menu {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
}

.fullscreen-overlay nav.menu a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    font-size: 2.2rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.fullscreen-overlay nav.menu a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-accent);
    transition: width 0.3s ease;
}

.fullscreen-overlay nav.menu a:hover {
    color: var(--color-accent);
    transform: scale(1.05);
}

.fullscreen-overlay nav.menu a:hover::after {
    width: 100%;
}

/* --- GENERAL CONTENT --- */

.content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.home-title {
    font-size: 4rem;
    font-weight: 800;
    text-align: center;
    margin: 0;
    letter-spacing: -1px;
    background: linear-gradient(to right, #ffffff, #a0b0d0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.about-card {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 50px;
    max-width: 700px;
    line-height: 1.8;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.about-card h1 {
    margin-top: 0;
    font-size: 2.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
    color: var(--color-accent);
    font-weight: 800;
}

.about-card p {
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.9);
}

.about-card p:last-child {
    margin-bottom: 0;
}

.about-card .highlight {
    font-weight: 700;
    color: var(--color-accent);
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 768px) {
    header.main-header { padding: 20px; }
    .close-menu { top: 20px; right: 20px; font-size: 3rem; }
    .fullscreen-overlay nav.menu a { font-size: 1.6rem; gap: 1.5rem; }
    .home-title { font-size: 2.5rem; }
    .about-card { padding: 30px; }
.about-card h1 { font-size: 2rem; }
}

/* --- ERROR PAGES --- */
.error-card {
    text-align: center;
}
.error-card h1 {
    border-bottom: none;
    margin-bottom: 20px;
}
.error-card .back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--color-accent);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.1rem;
    transition: transform 0.3s ease;
}
.error-card .back-link:hover {
    transform: translateX(-5px);
}

/* --- UTILITIES & SPECIFIC BLOCKS --- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mt-0 { margin-top: 0; }
.mt-15 { margin-top: 15px; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-0 { margin-bottom: 0; }
.mb-5 { margin-bottom: 5px; }
.mb-8 { margin-bottom: 8px; }
.mb-10 { margin-bottom: 10px; }
.mb-15 { margin-bottom: 15px; }
.mb-20 { margin-bottom: 20px; }
.mb-25 { margin-bottom: 25px; }
.fw-400 { font-weight: 400; }
.fw-600 { font-weight: 600; }
.fw-800 { font-weight: 800; }
.fs-0-8 { font-size: 0.8rem; }
.fs-1 { font-size: 1rem; }
.fs-1-1 { font-size: 1.1rem; }
.fs-1-2 { font-size: 1.2rem; }
.fs-1-4 { font-size: 1.4rem; }
.fs-1-5 { font-size: 1.5rem; }
.fs-2 { font-size: 2rem; }
.fs-3 { font-size: 3rem; }
.fs-4 { font-size: 4rem; }
.line-height-1-6 { line-height: 1.6; }
.line-height-1-8 { line-height: 1.8; }
.color-accent { color: var(--color-accent); }
.color-white { color: white; }
.color-muted { color: rgba(255,255,255,0.8); }
.color-dim { color: rgba(255,255,255,0.5); }
.w-100 { width: 100%; }
.max-w-400 { max-width: 400px; margin-left: auto; margin-right: auto; }
.max-w-600 { max-width: 600px; }
.d-block { display: block; }
.d-inline-flex { display: inline-flex; }
.justify-center { justify-content: center; }
.text-decoration-none { text-decoration: none; }
.flex-1 { flex: 1; }
.pl-20 { padding-left: 20px; }
.pt-50 { padding-top: 50px; }
.align-start { align-items: flex-start; }
.invisible { visibility: hidden !important; }

.card-info-box {
    background: rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 16px;
    margin: 30px 0;
    border: 1px solid rgba(255,255,255,0.1);
}
.breakdown-box {
    background: rgba(0,0,0,0.1);
    padding: 15px;
    border-radius: 8px;
}
.main-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.5);
    margin-top: auto;
}
.main-footer a {
    color: inherit;
    text-decoration: none;
}
.header-logo {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.5rem;
    flex: 1;
}
