/* ===================== GLOBAL BACKGROUND IMAGE ===================== */
body {
    position: relative;
    min-height: 100vh;

    /* Background image */
    background-image: url('../images/background-picture.png'); /* adjust path if needed */
    background-size: contain;           /* scale the image down */
    background-position: center top;    /* position nicely */
    background-repeat: no-repeat;
    background-attachment: fixed;

    /* VERY faded overlay for visibility */
    background-color: rgba(255, 255, 255, 0.95); /* almost fully white for main theme */
    background-blend-mode: lighten;
}

/* Make content slightly transparent so background can show faintly */
main.content,
.hero-description,
.account-box,
.courses-box,
.dashboard-box,
.admin-box,
.message-box,
.add-course,
form {
    background-color: rgba(255, 255, 255, 0.92); /* very faintly see-through */
    backdrop-filter: blur(2px);                 /* subtle frosted effect */
}

/* ===================== DARK THEME OVERRIDE ===================== */
[data-theme="dark"] body {
    background-color: rgba(20, 20, 20, 0.95); /* almost fully dark */
    background-blend-mode: lighten;
}

[data-theme="dark"] main.content,
[data-theme="dark"] .hero-description,
[data-theme="dark"] .account-box,
[data-theme="dark"] .courses-box,
[data-theme="dark"] .dashboard-box,
[data-theme="dark"] .admin-box,
[data-theme="dark"] .message-box,
[data-theme="dark"] .add-course,
[data-theme="dark"] form {
    background-color: rgba(20, 20, 20, 0.90); /* very faintly see-through */
    backdrop-filter: blur(2px);
}

.hero-image {
    -webkit-user-drag: none;
    user-select: none;
}

/* ===================== GLOBAL BACKGROUND IMAGE ===================== */
body {
    background-image: url('../images/background-picture.png'); /* adjust path if needed */
    background-size: cover;           /* make it cover the whole screen */
    background-position: center;      /* center the image */
    background-repeat: no-repeat;
    background-attachment: fixed;     /* keeps it fixed while scrolling */
    position: relative;
}

/* Make main content and cards slightly translucent to see background */
main.content,
.hero-description,
.account-box,
.courses-box,
.dashboard-box,
.admin-box,
.message-box,
.add-course,
form {
    background-color: rgba(255, 255, 255, 0.85); /* white cards with transparency */
    backdrop-filter: blur(5px);                 /* soft blur for "frosted glass" effect */
}

/* For dark theme override */
[data-theme="dark"] main.content,
[data-theme="dark"] .hero-description,
[data-theme="dark"] .account-box,
[data-theme="dark"] .courses-box,
[data-theme="dark"] .dashboard-box,
[data-theme="dark"] .admin-box,
[data-theme="dark"] .message-box,
[data-theme="dark"] .add-course,
[data-theme="dark"] form {
    background-color: rgba(20, 20, 20, 0.75); /* dark cards with some transparency */
    backdrop-filter: blur(5px);
}

.header-logo {
    user-select: none;
    -webkit-user-drag: none;
    pointer-events: auto;
}

/* ========================== SUBTLE FADED BACKGROUND IMAGE - LIGHT THEME ========================== */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("../images/background-picture.png") no-repeat center center;
    background-size: cover;
    opacity: 0.08;           /* adjust 0.05 - 0.15 for subtlety */
    z-index: -1;              /* behind all content */
    pointer-events: none;     /* so it doesn't block clicks */
    filter: brightness(1.1);  /* slightly brightens for light theme */
}

/* ========================== GLOBAL STYLES ========================== */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', 'Nunito', 'Quicksand', sans-serif; /* rounded-friendly fonts */
    text-align: left;
    background-color: #fdf6e3; /* light background by default */
    color: #222;               /* readable text color */
    border-radius: 12px;       /* rounded edges for containers if applied */
}

/* Apply global rounding for main containers */
main.content, 
.account-box, 
.courses-box, 
.dashboard-box, 
.admin-box, 
.message-box, 
.courses-list, 
.add-course, 
.hero-description {
    border-radius: 18px; /* smooth rounded corners for all cards */
    padding: 20px;
    box-sizing: border-box;
}

/* Optional: soft shadow for floating feel */
main.content, 
.account-box, 
.courses-box, 
.dashboard-box, 
.admin-box, 
.message-box, 
.courses-list, 
.add-course, 
.hero-description {
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ===================== HEADER LOGO ===================== */
.site-header .header-logo {
    display: block;
    margin-left: 0 auto;         /* centers the logo */
    max-width: 200px;       /* prevents it from being too wide */
    width: 50%;             /* scales relative to the container */
    height: auto;           /* keeps aspect ratio */
    text-align: left;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .site-header .header-logo {
        max-width: 150px;
        width: 60%;
    }
}

@media (max-width: 480px) {
    .site-header .header-logo {
        max-width: 120px;
        width: 70%;
    }
}

/* ===================== DARK THEME TEXT ALIGNMENT ===================== */
/* Default everything to left */
[data-theme="dark"] body {
    text-align: left; /* global left alignment */
}

/* Keep headers centered */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6 {
    text-align: center;
}

/* Hero section text remains centered */
[data-theme="dark"] .hero,
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero p,
[data-theme="dark"] .hero-description {
    text-align: center;
}

/* Cards: left-align paragraphs and lists inside them */
[data-theme="dark"] .account-box p,
[data-theme="dark"] .account-box ul,
[data-theme="dark"] .account-box li,
[data-theme="dark"] .courses-box p,
[data-theme="dark"] .courses-box ul,
[data-theme="dark"] .courses-box li,
[data-theme="dark"] .dashboard-box p,
[data-theme="dark"] .dashboard-box ul,
[data-theme="dark"] .dashboard-box li,
[data-theme="dark"] .admin-box p,
[data-theme="dark"] .admin-box ul,
[data-theme="dark"] .admin-box li,
[data-theme="dark"] .message-box p,
[data-theme="dark"] .message-box ul,
[data-theme="dark"] .message-box li,
[data-theme="dark"] .courses-list p,
[data-theme="dark"] .courses-list ul,
[data-theme="dark"] .courses-list li,
[data-theme="dark"] .add-course p,
[data-theme="dark"] .add-course ul,
[data-theme="dark"] .add-course li {
    text-align: left;
}

.hero-image {
    width: 100%;          /* image stretches to container width */
    max-width: 600px;     /* prevents it from being huge on desktop */
    height: auto;         /* maintains aspect ratio */
    display: block;
    margin: 0 auto 20px auto; /* centers horizontally, adds spacing below */
    border-radius: 12px;  /* optional: rounded edges for modern look */
    box-shadow: 0 8px 20px rgba(0,0,0,0.15); /* optional: subtle shadow */
}

/* Responsive tweak for very small screens */
@media (max-width: 480px) {
    .hero-image {
        max-width: 90%;   /* almost full width on tiny screens */
        margin-bottom: 15px;
    }
}

/* ===================== DARK THEME : BRAND PRESERVING ===================== */
[data-theme="dark"] {
    background-color: #0f1113;
    color: #e8e8e8;
    box-sizing: border-box;
}

[data-theme="dark"], [data-theme="dark"] * {
    box-sizing: border-box;
}

/* Page background */
[data-theme="dark"] body {
    background: #0f1113;
    color: #e8e8e8;
    font-family: 'Poppins', sans-serif;
    text-align: left;
}

/* Main content */
[data-theme="dark"] main.content {
    background: linear-gradient(
        180deg,
        rgba(20,20,20,0.35),
        rgba(30,30,30,0.85)
    );
    padding: 24px 18px;
    max-width: 420px;
    width: 95%;
    margin: 0 auto;
    box-sizing: border-box;
    border-radius: 18px;
    box-shadow:
        0 10px 30px rgba(0,0,0,0.08),
        inset 0 1px 0 rgba(255,255,255,0.7);
    animation: content-fade-in 0.9s ease-out both;
}

/* ===================== HEADINGS ===================== */
[data-theme="dark"] h1 { font-size: 2.2em; }
[data-theme="dark"] h2 { font-size: 1.9em; }
[data-theme="dark"] h3 { font-size: 1.6em; }
[data-theme="dark"] h4 { font-size: 1.3em; }
[data-theme="dark"] h5 { font-size: 1.1em; }
[data-theme="dark"] h6 { font-size: 1em; }

[data-theme="dark"] h1, [data-theme="dark"] h2, [data-theme="dark"] h3, [data-theme="dark"] h4, [data-theme="dark"] h5, [data-theme="dark"] h6 {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    line-height: 1.2;
    margin-bottom: 0.5em;
    font-family: 'Poppins', sans-serif;
    color: #d4af37;
    text-align: center;
}

/* ===================== HERO / HEADER POP & PRESENCE ===================== */
[data-theme="dark"] .admin-dashboard .dashboard-title,
[data-theme="dark"] .admin-dashboard h1 {
    font-size: 2.2em;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #fff;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 15px rgba(255,235,180,0.4);
    animation: header-glow 3s ease-in-out infinite;
}

[data-theme="dark"] .admin-dashboard .dashboard-subtitle {
    font-size: 1.2em;
    font-weight: 700;
    text-transform: uppercase;
    color: #fff;
    opacity: 0.9;
    margin-bottom: 25px;
    letter-spacing: 1px;
    text-align: left;
}

[data-theme="dark"] .message-box h3,
[data-theme="dark"] .dashboard-box h3 {
    font-size: 1.5em;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    background: linear-gradient(45deg, #f0e6d2, #8B7500);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    text-align: left;
}

[data-theme="dark"] .message-box h3:hover,
[data-theme="dark"] .dashboard-box h3:hover {
    color: #8B7500;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.2);
    transform: scale(1.02);
    transition: all 0.25s ease-in-out;
}

/* ===================== HERO ===================== */
[data-theme="dark"] .hero {
    text-align: center;
    padding: 20px 10px 10px;
    margin-bottom: 20px;
}

[data-theme="dark"] .hero h1 {
    font-size: 2.6em;
    margin-bottom: 12px;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, #3c2f1f, #8B7500, #3c2f1f);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: hero-glow 6s ease-in-out infinite;
}

[data-theme="dark"] .hero p {
    font-size: 1.15em;
    margin-bottom: 0;
    opacity: 0.9;
    text-align: center;
}

/* ===================== HERO DESCRIPTION / ACCOUNT / COURSES CARDS ===================== */
[data-theme="dark"] .hero-description,
[data-theme="dark"] .account-box,
[data-theme="dark"] .courses-box,
[data-theme="dark"] .dashboard-box,
[data-theme="dark"] .admin-box,
[data-theme="dark"] .message-box,
[data-theme="dark"] .courses-list,
[data-theme="dark"] .add-course {
    background: #1d2226;
    border: 1px solid #2a2f34;
    border-radius: 18px;
    padding: 26px 28px;
    box-shadow: 0 14px 35px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.8);
    max-width: 100%;
    width: 95%;
    margin: 0 auto 20px;
    color: #e0e0e0;
}

/* Card text adjustments */
[data-theme="dark"] .hero-description p,
[data-theme="dark"] .account-box p,
[data-theme="dark"] .courses-box p,
[data-theme="dark"] .dashboard-box p,
[data-theme="dark"] .admin-box p,
[data-theme="dark"] .message-box p,
[data-theme="dark"] .courses-list p,
[data-theme="dark"] .add-course p {
    color: #e0e0e0;
    opacity: 1;
    font-size: 1.05em;
    line-height: 1.75;
}

/* ===================== BUTTONS ===================== */
[data-theme="dark"] button,
[data-theme="dark"] .btn,
[data-theme="dark"] .hero-description .btn,
[data-theme="dark"] .account-box .btn,
[data-theme="dark"] .courses-box .btn,
[data-theme="dark"] .btn-pay-now {
    background-size: 200% 200%;
    border-radius: 6px;
    font-weight: 600;
    padding: 10px 20px;
    cursor: pointer;
    transition: transform 0.25s ease, box-shadow 0.4s ease, background-position 0.5s ease;
    border: none;
    font-size: 1em;
}

[data-theme="dark"] .cta-buttons .btn.primary,
[data-theme="dark"] .hero-description .btn-primary,
[data-theme="dark"] .account-box .btn-primary,
[data-theme="dark"] .courses-box .btn-primary {
    background: linear-gradient(135deg, #2a6b2a, #3c9c3c, #2a6b2a);
    color: #f0e6d2;
}

[data-theme="dark"] .cta-buttons .btn.secondary,
[data-theme="dark"] .hero-description .btn-secondary,
[data-theme="dark"] .account-box .btn-secondary,
[data-theme="dark"] .courses-box .btn-secondary {
    background: linear-gradient(135deg, #d4af37, #f1e5ac, #b8962e);
    color: #fff;
}

[data-theme="dark"] button:hover,
[data-theme="dark"] .btn:hover,
[data-theme="dark"] .cta-buttons .btn:hover,
[data-theme="dark"] .hero-description .btn:hover,
[data-theme="dark"] .account-box .btn:hover,
[data-theme="dark"] .courses-box .btn:hover {
    transform: scale(1.04);
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
}

[data-theme="dark"] button:active,
[data-theme="dark"] .btn:active,
[data-theme="dark"] .cta-buttons .btn:active,
[data-theme="dark"] .hero-description .btn:active,
[data-theme="dark"] .account-box .btn:active,
[data-theme="dark"] .courses-box .btn:active {
    transform: scale(0.98);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===================== FORMS ===================== */
[data-theme="dark"] form {
    max-width: 340px;
    width: 95%;
    margin: 15px auto;
    background: #161a1d;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* Inputs */
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border-radius: 5px;
    border: 1px solid #2a2f34;
    font-family: 'Poppins', sans-serif;
    color: #e0e0e0;
}

/* ===================== FOOTER ===================== */
[data-theme="dark"] .site-footer {
    background: #0c0e10;
    border-top: 2px solid #d4af37;
    color: #bfbfbf;
    max-width: 360px;
    margin: 0 auto;
    border-radius: 0 0 8px 8px;
    padding: 15px 10px;
}
[data-theme="dark"] .site-footer a { color: #d4af37; }

/* ===================== TOAST ===================== */
[data-theme="dark"] .toast,
[data-theme="dark"] .admin-toast {
    background: #1d2226;
    border-left: 4px solid #d4af37;
    color: #e0e0e0;
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
    [data-theme="dark"] .account-box,
    [data-theme="dark"] .courses-box,
    [data-theme="dark"] form { width: 95%; padding: 15px; }
    [data-theme="dark"] main.content { padding: 15px; }
    [data-theme="dark"] .cta-buttons .btn { padding: 8px 15px; }
    [data-theme="dark"] .hero h1 { font-size: 1.8em; }
    [data-theme="dark"] .hero p { font-size: 0.95em; }
}

/* ===================== KEYFRAMES ===================== */
@keyframes content-fade-in {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes header-glow {
    0%,100% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 10px rgba(255,235,180,0.3); }
    50% { text-shadow: 2px 2px 4px rgba(0,0,0,0.5), 0 0 25px rgba(255,235,180,0.6); }
}

@keyframes hero-glow {
    0%,100% { filter: drop-shadow(0 0 2px rgba(139,117,0,0.25)); }
    50% { filter: drop-shadow(0 0 6px rgba(139,117,0,0.45)); }
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes pop-in {
    0% { transform: scale(0.85); opacity: 0; }
    60% { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

@keyframes payNowPop {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}