
body {
    background: linear-gradient(to right, #eef2f3, #e0ecff);
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    font-size: 22px; 
    text-align: left; /* Forces text to start at the left */
    overflow-x: hidden;
}

/* --- REPLACED NAV & SEARCH SECTION ONLY --- */
.navbar {
    background-color: #00008b;
    display: flex !important;
    justify-content: space-between !important; 
    align-items: center;
    padding: 10px 50px;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: visible !important;
}

.navbar a, .dropbtn {
    color: white;
    text-decoration: none;
    font-weight: bold;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    padding: 10px 15px;
    white-space: nowrap;
    transition: 0.3s;
}

.navbar a:hover, .dropbtn:hover {
    color: #add8e6;
    transform: scale(1.05);
}

.dropdown {
    position: relative;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: white;
    min-width: 250px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    top: 100%;
    left: 0;
    z-index: 9999;
}

.dropdown-content a {
    color: #333 !important;
    padding: 15px;
    display: block;
    font-size: 18px;
    border-bottom: 1px solid #eee;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a:hover {
    background-color: #add8e6 !important;
    color: #00008b !important;
}

.search-group {
    display: flex !important;
    align-items: center !important;
    gap: 30px !important;
    margin-left: 50px; 
    flex-shrink: 0; 
}

.search-wrapper {
    position: relative;
    width: 250px; 
    transition: width 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.search-wrapper:focus-within {
    width: 400px !important; 
}

#topicSearch {
    width: 100%;
    padding: 12px 18px;
    border: none;
    border-radius: 8px;
    outline: none;
    font-size: 16px;
    color: #00008b;
    box-sizing: border-box;
}

/* UPDATED SEARCH SUGGESTIONS TO MATCH NAV DROPDOWN COLORS */
.suggestions-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 100%;
    background: white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: none;
    z-index: 9999 !important;
    border-radius: 0;
    overflow: hidden;
}

.suggestions-dropdown a {
    display: block !important; 
    padding: 15px;
    color: #333 !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee;
    font-size: 18px;
    text-align: left;
}

.suggestions-dropdown a:hover {
    background-color: #add8e6 !important;
    color: #00008b !important;
}

.modern-search-btn {
    background-color: white;
    color: #00008b;
    border: none;
    padding: 12px 25px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.modern-search-btn:hover {
    background-color: #add8e6 !important;
    color: #00008b !important;
    transform: translateY(-2px);
}

/* --- YOUR ORIGINAL REMAINING STYLES --- */

.container {
    width: 90%;
    max-width: 1200px;
    margin: 40px auto;    
    padding-left: 60px;   
    padding-right: 40px;
    text-align: left;    
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);     
    padding: 20px;  
}

.example {
    background: #f8fafc;
    border-left: 5px solid #1e3a8a;
    border-radius: 10px;
    padding: 20px;
}

h1 {
    color: #00008b;
    font-size: 50px;
    width: fit-content;
}

h2 {
    color: #00008b;
    width: fit-content;
}

b {
    color: #00008b;
}

.question-list {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: bold;
}

#check-btn {
    background-color: #00008b;
    color: white;
    padding: 18px 35px;
    border: none;
    border-radius: 5px;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    margin: 30px 0;
}

#check-btn:hover {
    background-color: #0000cd;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

#answer-key {
    background-color: #e8f5e9;
    padding: 25px;
    border-radius: 8px;
    margin-top: 20px;
    border-left: 10px solid #2e7d32;
}

.note-box {
    background-color: #e8f5e9;
    border-left: 10px solid #2e7d32;
    padding: 20px;
    margin-top: 30px;
    border-radius: 5px;
}

.note-box h2 { color: #2e7d32; margin-top: 0; }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

@media screen and (max-width: 768px) {
    .container {
        width: 95%;
        padding: 20px;
        margin: 10px auto;
    }
    .navbar {
        flex-direction: column;
        align-items: center;
        gap: 10px;
        padding: 10px 15px;
    }
    .search-group {
        width: 100%;
        justify-content: center;
        margin-left: 0;
    }
    .search-wrapper, .search-wrapper:focus-within {
        width: 100%;
        max-width: 300px;
    }
    h1 { font-size: 35px; }
    #check-btn { width: 100%; }

}

/* ================= MOBILE NAV FIX ================= */

/* Hamburger icon */
.hamburger {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
}

/* Mobile dropdown menu */
.mobile-menu {
    display: none;
    position: absolute;
    top: 60px;
    left: 10px;
    background: white;
    width: 200px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
    z-index: 9999;
}

.mobile-menu a {
    display: block;
    padding: 15px;
    color: #00008b;
    text-decoration: none;
    border-bottom: 1px solid #eee;
}

.mobile-menu a:hover {
    background-color: #add8e6;
}

/* MOBILE ONLY */
@media screen and (max-width: 768px) {

    /* Hide desktop links */
    .desktop-only {
        display: none !important;
    }

    /* Show hamburger */
    .hamburger {
        display: block;
    }

    /* Navbar layout */
    .navbar {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        padding: 10px;
        gap: 10px;
    }

    /* Keep dropdown near hamburger */
    .dropdown {
        margin-left: 5px;
    }

    /* Push search to right */
    .search-group {
        margin-left: auto;
    }

    /* Smaller search */
    .search-wrapper {
        width: 140px;
    }

    .search-wrapper:focus-within {
        width: 180px !important;
    }

    /* Hide search button */
    .modern-search-btn {
        display: none !important;
    }
@media screen and (max-width: 768px) {

    /* 🔴 STOP ALL HORIZONTAL SCROLL */
    body {
        overflow-x: hidden;
    }

    /* 🔴 FIX NAVBAR WIDTH */
    .navbar {
        flex-wrap: nowrap;
        justify-content: flex-start;
        align-items: center;
        padding: 10px 10px;   /* 🔥 CRITICAL FIX (was 50px) */
        gap: 5px;
        width: 100%;
        box-sizing: border-box;
        overflow: hidden;
    }

    /* 🔴 HAMBURGER */
    .hamburger {
        display: block;
        margin-right: 5px;
    }

    /* 🔴 DROPDOWN CLOSE TO HAMBURGER */
    .dropdown {
        margin-left: 0;
    }

   .dropbtn {
    font-size: 18px;   /* match other nav items */
    padding: 10px 12px;
}

    /* 🔴 FORCE SEARCH TO FIT */
    .search-group {
        margin-left: auto;
        display: flex;
        align-items: center;
        max-width: 45%; /* 🔥 prevents pushing out */
    }

    /* 🔴 SEARCH INPUT FIX */
    .search-wrapper {
        width: 100%;
        max-width: 140px;
    }

    .search-wrapper:focus-within {
        width: 100% !important;
        max-width: 160px;
    }

    /* 🔴 REMOVE BUTTON */
    .modern-search-btn {
        display: none !important;
    }

    /* 🔴 HIDE DESKTOP LINKS */
    .desktop-only {
        display: none !important;
    }
}
    #topicSearch::placeholder {
        font-size: 13px;
    }
}
.navbar {
    transition: top 0.3s ease;
}
.mobile-menu a:active,
.mobile-menu a:focus,
.mobile-menu a:visited {
    color: #00008b !important;   /* keep dark blue */
    background-color: #add8e6 !important; /* light blue highlight */
}

/* Remove ugly mobile tap highlight */
.mobile-menu a {
    -webkit-tap-highlight-color: transparent;
}

  .suggestions-dropdown a {
        font-size: 14px;      /* smaller text */
        padding: 12px 10px;   /* better spacing */
        line-height: 1.4;     /* prevents cut text */
        white-space: normal;  /* allows wrapping */
    }

/* ================= TOPICS (PC + MOBILE CLEAN FIX) ================= */

/* ===== PC (KEEP NICE GRID) ===== */
.topics ul {
    list-style: none;
    padding: 0;
    margin: 20px auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* PC stays 3 columns */
    gap: 20px;
}

/* BOX STYLE */
.topics ul li {
    background-color: #add8e6;
    height: 90px;                 /* nice rectangle */
    border-left: 10px solid #00008b;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* TEXT */
.topics ul li p {
    margin: 0;
    padding: 0 10px;
    font-weight: bold;
    color: #00008b;
}

/* ================= MOBILE FIX ================= */
@media screen and (max-width: 768px) {

    /* 🔥 2 COLUMNS */
    .topics ul {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 🔥 RECTANGULAR (NOT SQUARE) */
    .topics ul li {
        height: 70px;              /* KEY: rectangle shape */
        padding: 6px;
    }

    /* 🔥 TEXT MUST FIT CLEANLY */
    .topics ul li p {
        font-size: 13px;
        line-height: 1.2;

        /* IMPORTANT: clean wrapping */
        white-space: normal;
        word-break: keep-all;
        overflow-wrap: normal;

        text-align: center;
    }
}
/* ===== HOVER EFFECT (PC) ===== */
.topics ul li {
    transition: transform 0.25s ease, background-color 0.25s ease;
    cursor: pointer;
}

.topics ul li:hover {
    transform: scale(1.05);
    background-color: #bde0fe;
    z-index: 5;
}

/* ===== TOUCH EFFECT (MOBILE) ===== */
.topics ul li:active {
    transform: scale(0.98);
    background-color: #bde0fe;
}

/* REMOVE BLUE TAP FLASH (MOBILE CLEAN) */
.topics ul li {
    -webkit-tap-highlight-color: transparent;
}
/* ===== REMOVE LINK UNDERLINE COMPLETELY ===== */
.topics ul li a {
    text-decoration: none !important;
    color: #00008b !important;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.mobile-menu {
    display: none;
}

.mobile-menu.show {
    display: block !important;
}
.navbar {
    position: sticky;
    top: 0;
    transition: top 0.3s ease;
    z-index: 9999;
}

/* ================= CONTACT FORM STYLE ================= */

form {
    width: 95%;
    max-width: 1000px;
    margin: 30px auto;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Labels (your <p> tags) */
form p {
    font-weight: 600;
    color: #00008b;
    margin-bottom: 10px;
}


form input[type="text"],
form input[type="email"],
form textarea {
    width: 100%;
    max-width: 600px;     /* good desktop limit */
    padding: 10px 12px;
    margin-top: 5px;
    border: 2px solid #cfe2ff;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: 0.3s;
    background: #f9fbff;
    font-family: inherit;
    display: block;
    box-sizing: border-box;
}

form textarea {
    min-height: 140px;
    resize: vertical;
}

/* Focus effect */
form input:focus,
form textarea:focus {
    border-color: #00008b;
    box-shadow: 0 0 8px rgba(0, 0, 139, 0.25);
}

/* Textarea sizing */
form textarea {
    min-height: 180px;
    resize: vertical;
}

/* Button */
form button {
    background: #00008b;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
    margin-top: 15px;
    transition: 0.3s ease;
}

/* Button hover */
form button:hover {
    background: #00006b;
    transform: scale(1.05);
}

/* Horizontal line */
hr {
    margin-top: 30px;
    border: none;
    height: 1px;
    background: #d0e2ff;
}


@media (max-width: 768px) {
    form {
        width: 92%;
        max-width: 100%;
        padding: 12px 10px;
    }

    form input,
    form textarea {
        max-width: 100%;
        font-size: 16px;
    }

    form button {
        width: 100%;
    }
}
 
/* ================= TOP HEADER ================= */


/* HEADER (desktop) */
.top-header {
    width: 100%;
    background: rgba(255, 255, 255, 0.801);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 15px 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* LOGO LEFT */
.logo-area {
    justify-self: start;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* LOGO IMAGE */
.logo-area img {
    width: 200px;
    height: 80px;
    object-fit: contain;
}

/* CENTER TITLE */
.logo-area h1 {
    justify-self: center;
    font-size: 45px;
    color: #00008b;
    margin: 0;
    text-align: center;
}

/* ================= MOBILE ================= */

@media (max-width: 768px) {
    .top-header {
        flex-direction: column;
        padding: 20px 10px;
    }

    .logo-area {
        flex-direction: column;
        text-align: center;
    }

    .logo-area img {
        width: 90px;
        height: 90px;
    }

    .logo-area h1 {
        font-size: 20px;
    }
}
@media (max-width: 768px) {
    .logo-area img {
        width: 120px;
        height: 120px;
    }

    .logo-area h1 {
        font-size: 26px;
        text-align: center;
    }
}
@media (max-width: 768px) {
    .top-header {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .logo-area {
        flex-direction: column;
        justify-content: center;
    }

    .logo-area img {
        width: 120px;
        height: 120px;
    }

    .logo-area h1 {
        font-size: 26px;
    }
}

body {
    overflow-x: hidden;
}

* {
    box-sizing: border-box;
}

/* ================= MOBILE FONT FIX (FINAL) ================= */
@media screen and (max-width: 768px) {

    /* GENERAL TEXT */
    body {
        font-size: 16px !important;
    }

    p {
        font-size: 16px !important;
        line-height: 1.6;
    }

    /* HEADINGS */
    h1 {
        font-size: 32px !important;
    }

    h2 {
        font-size: 22px !important;
    }

    /* NAVBAR TEXT */
    .navbar a,
    .dropbtn {
        font-size: 15px !important;
    }

    /* SEARCH INPUT */
    #topicSearch {
        font-size: 14px !important;
    }

    /* SEARCH SUGGESTIONS */
    .suggestions-dropdown a {
        font-size: 14px !important;
    }

    /* TOPIC BOX TEXT */
    .topics ul li p {
        font-size: 14px !important;
        line-height: 1.3;
    }

    /* SLIGHTLY BIGGER BOXES FOR FIT */
    .topics ul li {
        height: 100px !important;
        padding: 5px !important;
    }
}

/* Container to give it some space in the body */
.body-tool-container {
    margin: 20px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.body-tool-container label {
    font-weight: bold;
    color: #333;
}

/* The Dropdown Wrapper */
.custom-body-dropdown {
    position: relative;
    display: inline-block;
}

/* The Button itself */
.body-dropbtn {
    background-color: #00008b;
    color: white;
    padding: 12px 25px;
    font-size: 18px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.body-dropbtn:hover {
    background-color: #0000cd;
}

/* The Menu that pops out */
.body-dropdown-content {
    display: none;
    position: absolute;
    background-color: #ffffff;
    min-width: 220px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 50;
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid #ddd;
}

/* Links inside the menu */
.body-dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    font-size: 16px;
    border-bottom: 1px solid #eee;
}

.body-dropdown-content a:last-child {
    border-bottom: none;
}

.body-dropdown-content a:hover {
    background-color: #add8e6;
    color: #00008b;
}

/* Show the menu on hover */
.custom-body-dropdown:hover .body-dropdown-content {
    display: block;
}
/* ================= CALC TYPE DROPDOWN (FINAL CLEAN VERSION) ================= */

.calc-type-header {
    position: absolute;
    top: 100px;   /* adjust if needed */
    left: 25px;
    z-index: 9999;
    width: auto;
    padding: 0;
    margin: 0;
    background: transparent;
}

.calc-left-align {
    position: relative;
}

/* BUTTON */
.calc-trigger {
    background: #00008b;
    color: white;
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
}

/* DROPDOWN */
.calc-dropdown-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 6px;
    overflow: hidden;
}

/* OPTIONS */
.calc-dropdown-menu div {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

.calc-dropdown-menu div:hover {
    background: #add8e6;
}

/* SHOW */
.show-calc-menu {
    display: block !important;
}

/* ================= MOBILE ================= */
@media (max-width: 768px) {

    .calc-type-header {
        top: 75px;
        left: 10px;
    }

    .calc-trigger {
        padding: 6px 10px;
        font-size: 13px;
        border-radius: 5px;
    }

    .calc-dropdown-menu {
        min-width: 150px;
    }

    .calc-dropdown-menu div {
        font-size: 13px;
        padding: 10px;
    }
}

/* ================= OTHER PAGES POSITION FIX ================= */

.other-page .calc-type-header {
    left: auto !important;
    right: 25px !important;   /* move to RIGHT */
    top: 100px !important;
}

/* MOBILE */
@media (max-width: 768px) {

    .other-page .calc-type-header {
        right: 10px !important;
        left: auto !important;
        top: 75px !important;
    }
}/* ==========================================
   DESKTOP / STANDARD FOOTER STYLES
   ========================================== */
.math-footer {
  background: #0d1b2a; 
  color: #e0e1dd;      
  font-family: 'Segoe UI', sans-serif;
  padding: 60px 40px 30px; 
  border-top: 4px solid #1b263b;
  /* FIXED: Safely stretches edge-to-edge on PC without breaking layout or causing scrollbar bugs */
  width: 100%;
  box-sizing: border-box;
  margin-top: 100px; 
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
  gap: 50px; 
  margin-bottom: 40px; 
}

.footer-column h3 {
  color: #ffffff; 
  margin-top: 0; 
  margin-bottom: 20px; 
  font-size: 1.5rem; 
  padding-bottom: 5px;
}

.footer-column p {
  font-size: 0.95rem;
  line-height: 1.6; 
}

.footer-column ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-column ul li {
  margin: 12px 0; 
}

/* Base link setup for PC */
.footer-column ul li a {
  color: #00c3ff;        
  text-decoration: none; 
  font-weight: 500;      
  display: inline-block; 
  transition: color 0.2s ease, transform 0.2s ease;
}

/* HOVER EFFECT: Turns bright teal-green and grows larger */
.footer-column ul li a:hover {
  color: #00ffcc;          
  transform: translateX(5px);  
  text-decoration: none;   
}

.footer-bottom {
  text-align: center;
  font-size: 1.5rem; /* Enlarged copyright text on PC */
  border-top: 1px solid #1b263b;
  padding-top: 25px; 
  color: #d1d5db; /* Brighter off-white/light gray instead of deep grey */
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS FOR MOBILE DEVICES
   ========================================== */
@media (pointer: coarse), (max-width: 900px) {
  .math-footer {
    width: 100%;
    padding: 35px 15px; 
    box-sizing: border-box;
    margin-top: 60px; 
  }

  .footer-column p,
  .footer-column h3,
  .footer-column:nth-child(3) { 
    display: none !important;
  }

  .footer-container {
    display: flex;
    justify-content: center; 
    margin-bottom: 30px; 
    gap: 0;
  }

  .footer-column ul {
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    padding: 0;
    margin: 0;
    width: 100%; 
  }

  .footer-column ul li {
    margin: 0;
    display: flex;
    align-items: center;
    position: relative;
  }

  /* 1. HOME ADJUSTMENT (Left Column) */
  .footer-column ul li:nth-child(1) {
    display: flex;
    justify-content: flex-start; /* Aligns left edge */
    width: 100%;
    margin-left: -5px; /* INCREASE THIS to manually push Home further right */
  }

  /* 2. PRIVACY (Dead-centered Column - Adjustable Shift) */
  .footer-column ul li:nth-child(2) {
    justify-self: center; 
    /* MANUAL CONTROL FOR PRIVACY: */
    /* Use a negative number (-5px) to shift left. Use a positive number (5px) to shift right. */
    transform: translateX(-10px); 
  }


  /* 3. CONTACT US ADJUSTMENT (Right Column) */
  .footer-column ul li:nth-child(3) {
    display: flex;
    justify-content: flex-end; /* Aligns right edge */
    width: 100%;
    margin-right: 50px; /* INCREASE THIS to manually push Contact Us further left */
  }

  .footer-column ul li a {
    font-size: 1rem; 
    color: #00c3ff !important; 
    text-decoration: none !important;
    font-weight: 500; 
    transform: none !important; 
    transition: color 0.1s ease; 
    white-space: nowrap; /* Prevents "Contact Us" from breaking onto two lines when pushed */
  }

  /* GREEN FEEDBACK WHEN PRESSED (MOBILE) */
  .footer-column ul li a:active {
    color: #00ffcc !important; 
  }

  .footer-bottom {
    border-top: 1px solid #1b263b;
    padding-top: 20px;
    display: flex;
    flex-direction: column; 
    gap: 8px;
    font-size: 0.9rem; 
    color: #8d99ae; 
  }

  .footer-bottom p {
    margin: 0;
  }
}

/* ========================================================
   🔥 MOBILE-ONLY FIX (WILL NOT TOUCH PC LAYOUT)
   ======================================================== */
@media screen and (max-width: 768px) {
    .logo-area {
        display: flex !important;
        flex-direction: row !important; /* Forces side-by-side row behavior on mobile */
        align-items: center !important;
        gap: 12px !important;
        margin: 15px 0 5px 0px !important; /* FIXED: Set to 0px to slam it completely to the left margin edge */
        padding-left: 0px !important;       /* FIXED: Erases any hidden internal padding shifts */
    }

    .site-logo {
        width: 70px !important; /* FIXED: Boosted size significantly from 55px to 70px */
        height: auto !important;
        flex-shrink: 0 !important; /* Stops the layout from crushing the image width */
    }

    .site-title {
        font-size: 25px !important; /* FIXED: Marginally increased text size to balance the larger logo */
        margin: 0 !important;
        line-height: 1.2 !important;
        white-space: nowrap !important; /* Prevents text wrap layout breaks on mobile */
    }
}

/* Base container wrapper */
.donation-card-container {
    width: 100%;
    max-width: 1100px; /* Aligns with your main body text block */
    margin: 0 auto;
    padding: 10px 20px 45px 20px; /* Pads nicely right above the footer */
    box-sizing: border-box;
}

/* Light Mode Card Design */
.donation-card {
    background-color: #ffffff; /* Clean pure white background */
    border: 2px solid #e2e8f0; /* Sharp, visible light border boundary */
    border-radius: 10px;
    padding: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); /* Premium, modern lift effect */
}

/* High-Visibility Typography */
.donation-content h3 {
    color: #1e3a8a; /* Deep, authoritative dark blue headline */
    font-family: sans-serif;
    font-size: 1.4rem; /* Prominent size for clarity */
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.donation-content p {
    color: #334155; /* Ultra-clear, dark slate gray for maximum text readability */
    font-family: sans-serif;
    font-size: 1rem; /* Standard comfortable reading size */
    line-height: 1.6; /* Breathing room for easy reading */
    margin: 0;
    max-width: 750px; /* Prevents text lines from stretching too long */
}

/* Eye-Catching Button Design */
.coffee-btn {
    display: inline-block;
    background-color: #f59e0b; /* Bright golden amber to stand out instantly */
    color: #000000; /* High-contrast black text on gold */
    text-decoration: none;
    font-family: sans-serif;
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 28px;
    border-radius: 6px;
    white-space: nowrap;
    text-align: center;
    box-shadow: 0 2px 4px rgba(245, 158, 11, 0.2);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.coffee-btn:hover {
    background-color: #d97706; /* Richer gold tone on cursor hover */
    transform: translateY(-1px); /* Subtle premium interaction effect */
}

/* Flawless responsive layout layout for mobile screens */
@media (max-width: 768px) {
    .donation-card {
        flex-direction: column; /* Stacks text and button vertically on phones */
        text-align: center;
        padding: 24px;
        gap: 20px;
    }
    
    .donation-content p {
        font-size: 0.95rem; /* Micro-adjustment for mobile readability */
    }
    
    .coffee-btn {
        width: 100%; /* Stretches button wide for easy thumb tapping */
        box-sizing: border-box;
    }
}

/* =================================================
   DARK THEME BASE
================================================= */

:root[data-theme="dark"]{
    color-scheme: dark;
}

/* PAGE */

:root[data-theme="dark"] body{
    background:#060b1d;
    color:#f1f5f9;
}

/* MAIN CONTAINER */

:root[data-theme="dark"] .container{
    background:#18263b;
    color:#f1f5f9;
    border:1px solid #2c3f5f;
    border-radius:14px;
    box-shadow:0 12px 35px rgba(0,0,0,.45);
}
/* HEADINGS */

:root[data-theme="dark"] h1 {
    color: #2fbdff;
}
:root[data-theme="dark"] h2 {
    color: #2fbdff;
}
/* BOLD TEXT */

:root[data-theme="dark"] b,
:root[data-theme="dark"] strong {
    color: #2fbdff;
}
/* EXAMPLE BLOCK */

:root[data-theme="dark"] .example {
    background-color: #000000 !important;
    background: #000000 !important;
    border: 2px solid #3b82f6 !important;
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.4) !important;
    border-radius: 12px !important;
    padding: 20px !important;
}

/* Base text color inside examples */
:root[data-theme="dark"] .example,
:root[data-theme="dark"] .example * {
    color: #c8e4fc !important;
}

/* Bold elements inside examples */
:root[data-theme="dark"] .example b,h2
:root[data-theme="dark"] .example strong {
    color: #53c6fc !important;
}
/* SAMPLE QUESTIONS */
:root[data-theme="dark"] .question-list,
:root[data-theme="dark"] #answer-key {
    background-color: #010120 !important; /* Dark Purple */
    background: #01013d !important;
    border: 2px solid rgba(85, 223, 247, 0.4) !important; /* Shiny Purple Border */
    box-shadow: 0 0 15px rgba(85, 223, 247, 0.4) !important; /* Glowing effect */
    margin: 15px 0 !important;
    border-radius: 8px;
    padding: 15px;
}

/* Forces all nested text inside the container to white and NOT BOLD */
:root[data-theme="dark"] .question-list,
:root[data-theme="dark"] .question-list *,
:root[data-theme="dark"] #answer-key,
:root[data-theme="dark"] #answer-key * {
    color: #c8e4fc !important;
    font-weight: normal !important;
}
/* SAMPLE ANSWERS ONLY */
:root[data-theme="dark"] #answer-key {
    background-color: #010108 !important;
    background: #02010e !important;
    border: 2px solid rgba(85, 223, 247, 0.4) !important;
    box-shadow: 0 0 15px rgba(85, 223, 247, 0.4) !important;
    margin: 15px 0 !important;
    border-radius: 8px;
    padding: 15px;
}

/* Forces all nested text inside the answer key to be light blue and BOLD */
:root[data-theme="dark"] #answer-key,
:root[data-theme="dark"] #answer-key * {
    color: #5ac5f7 !important;
    font-weight: bold !important;
}
/* NOTE BOX */

:root[data-theme="dark"] .note-box {
    background-color: #140722 !important; /* Dark Purple */
    background: #140722 !important;
    
    /* Restores the left vertical line with a shiny purple color */
    border-left: 6px solid #8006f3 !important; 
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
    
    /* Adds the glowing effect focused on that left edge */
    box-shadow: -5px 0 15px rgba(125, 10, 233, 0.5) !important; 
    
    border-radius: 0 8px 8px 0 !important; /* Rounds only the right corners */
    padding: 15px !important;
}

/* Forces all nested text elements inside the notebox to light green */
:root[data-theme="dark"] .note-box,
:root[data-theme="dark"] .note-box h2,
:root[data-theme="dark"] .note-box p,
:root[data-theme="dark"] .note-box li,
:root[data-theme="dark"] .note-box * {
    color: #acd2f3 !important;
}
/* CHECK ANSWER BUTTON TEXT COLOR ONLY */

:root[data-theme="dark"] #check-btn {
    color: #d2e4f3 !important;
}
/* FOOTER HEADINGS COLOR */

:root[data-theme="dark"] .math-footer h1,
:root[data-theme="dark"] .math-footer h2,
:root[data-theme="dark"] .math-footer h3,
:root[data-theme="dark"] .math-footer h4,
:root[data-theme="dark"] .math-footer h5,
:root[data-theme="dark"] .math-footer h6 {
    color: #d8e8f5 !important;
}
/* =================================================
   NAVBAR, DROPDOWNS & SEARCH BAR
================================================= */

/* NAVBAR BACKGROUND */
:root[data-theme="dark"] .navbar {
    background-color: #000000 !important;
    background: #000000 !important;
    opacity: 1.0 !important;
}

/* NAVBAR LINKS */
:root[data-theme="dark"] .navbar a,
:root[data-theme="dark"] .navbar span,
:root[data-theme="dark"] .navbar-brand,
:root[data-theme="dark"] .nav-link {
    color: #d8e8f5 !important;
}

/* SEARCH INPUT FIELD */
:root[data-theme="dark"] .navbar input[type="text"],
:root[data-theme="dark"] .navbar input[type="search"] {
    background-color: transparent !important;
    color: #d8e8f5 !important;
    border: 1px solid #ffffff !important;
}

/* SEARCH PLACEHOLDER */
:root[data-theme="dark"] .navbar input::placeholder {
    color: #d8e8f5 !important;
    opacity: 1 !important;
}

/* SEARCH BUTTON */
:root[data-theme="dark"] .navbar button,
:root[data-theme="dark"] #search-btn,
:root[data-theme="dark"] .search-btn {
    background-color: #000000 !important;
    background: #000000 !important;
    color: #d8e8f5 !important;
    border: 1px solid #ffffff !important;
}

/* DROPDOWN & SUGGESTION BOXES */
:root[data-theme="dark"] .dropdown-menu,
:root[data-theme="dark"] .search-suggestions,
:root[data-theme="dark"] [class*="suggestion"],
:root[data-theme="dark"] [class*="dropdown"],
:root[data-theme="dark"] .navbar ul,
:root[data-theme="dark"] .navbar div {
    background-color: #000000 !important;
    background: #000000 !important;
}

/* DROPDOWN LINKS (DEFAULT STATE) */
:root[data-theme="dark"] .dropdown-menu a,
:root[data-theme="dark"] .dropdown-menu li,
:root[data-theme="dark"] [class*="suggestion"] a,
:root[data-theme="dark"] [class*="suggestion"] li,
:root[data-theme="dark"] [class*="dropdown"] a,
:root[data-theme="dark"] [class*="dropdown"] li {
    color: #ffffff !important;
    background-color: transparent !important;
    background: transparent !important;
}

/* DROPDOWN HOVER & TOUCH STATES */
:root[data-theme="dark"] .dropdown-menu a:hover,
:root[data-theme="dark"] .dropdown-menu a:active,
:root[data-theme="dark"] [class*="suggestion"] a:hover,
:root[data-theme="dark"] [class*="suggestion"] li:hover,
:root[data-theme="dark"] [class*="dropdown"] a:hover {
    background-color: #5ecbff !important;
    background: #5ecbff !important;
    color: #000000 !important;
}
/* =================================================
   TOP-RIGHT CORNER TOGGLE BUTTON (NO CONTENT SHIFT)
================================================= */

/* 1. Sets the anchor on the main container box */
:root .container {
    position: relative !important;
}


/* =================================================
   INDEX TOPIC LINKS (DARK BLUE BARS & LIGHT BLUE ACCENTS)
================================================= */

/* Removes any background color from the main outer container grid */
:root[data-theme="dark"] .topics {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
}

/* Styles ONLY the individual separated item blocks */
:root[data-theme="dark"] .topics ul li,
:root[data-theme="dark"] .topic-link {
    background-color: #000000 !important; /* Dark Blue Background Bar */
    background: #000000 !important;
    border-left: 6px solid #12b9d6 !important; /* Light Blue Thick Accent Line */
    border-top: none !important;
    border-right: none !important;
    border-bottom: none !important;
}

/* Forces all nested text inside the individual bars to Light Blue */
:root[data-theme="dark"] .topic-link,
:root[data-theme="dark"] .topic-link p,
:root[data-theme="dark"] .topic-link h1,
:root[data-theme="dark"] .topic-link h2,
:root[data-theme="dark"] .topic-link h3,
:root[data-theme="dark"] .topics b,
:root[data-theme="dark"] .topics strong,
:root[data-theme="dark"] .topics ul li * {
    color:  #12b9d6 !important; /* Light Blue Text */
}
/* =================================================
   HEADER PANEL & TOGGLE BUTTON LAYOUT ADJUSTMENTS
================================================= */

/* 1. Turns the header panel background solid black ONLY in Dark Mode */
:root[data-theme="dark"] header, 
:root[data-theme="dark"] .header-container,
:root[data-theme="dark"] [class*="header"] {
    background-color: #000000 !important;
    background: #000000 !important;
}

/* 2. Structural alignment rules that apply to both modes safely */
header, 
.header-container,
[class*="header"] {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    position: relative !important;
    padding: 15px 25px !important; /* Cleans up spacing around logo/title */
}

/* 3. Moves the toggle button to live safely inside the header layout */
.theme-toggle {
    position: static !important; /* Unlocks it from the main container corner */
    margin-left: auto !important; /* Naturally floats it to the right edge of the header */
    
    /* Maintains your high-visibility styling for Light Mode */
    padding: 7px 16px;
    border: none !important;
    border-radius: 40px;
    background: linear-gradient(135deg, #00008b, #00008b) !important;
    color: #ffffff !important;
    font-weight: 800 !important;
    font-size: 11px;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(29, 78, 216, 0.4) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 6px 20px rgba(29, 78, 216, 0.6) !important;
}

/* Dark Mode Button specific design */
:root[data-theme="dark"] .theme-toggle {
    background: linear-gradient(135deg, #00b8ff, #0077ff) !important;
    color: #000000 !important;
    font-weight: 900 !important;
    box-shadow: 0 0 15px rgba(0, 184, 255, 0.5) !important;
}

:root[data-theme="dark"] .theme-toggle:hover {
    box-shadow: 0 0 25px rgba(0, 184, 255, 0.8) !important;
}

/* 4. Cleans up the main container top spacing since button moved out */
:root .container {
    position: relative !important;
    padding-top: 25px !important; 
}

/* Mobile responsive padding compression */
@media (max-width: 768px) {
    header, [class*="header"] {
        padding: 10px 15px !important;
    }
    .theme-toggle {
        padding: 5px 12px;
        font-size: 10px;
    }
}
/* =================================================
   AUTOMATIC LOGO INVERSION FOR DARK MODE
================================================= */

/* Targets the logo image specifically inside your header when dark theme is active */
:root[data-theme="dark"] header img,
:root[data-theme="dark"] .logo img,
:root[data-theme="dark"] [class*="header"] img {
    filter: invert(1) hue-rotate(180deg) brightness(0.9) contrast(1.1) !important;
}
/* =================================================
   CONTACT FORM CONTAINER - BLACK WIDE BLOCK INVERSION
================================================= */

/* 1. Targets the main inner form card wrapper on your contact page */
:root[data-theme="dark"] .container form,
:root[data-theme="dark"] .contact-form,
:root[data-theme="dark"] .container > div:has(input, textarea) {
    background-color: #000000 !important;
    background: #000000 !important;
}

/* 2. Text Color Inversion - Forces EVERY title, label, and string to white */
:root[data-theme="dark"] .container form label,
:root[data-theme="dark"] .container form h1,
:root[data-theme="dark"] .container form h2,
:root[data-theme="dark"] .container form h3,
:root[data-theme="dark"] .container form p,
:root[data-theme="dark"] .container form b,
:root[data-theme="dark"] .container form strong,
:root[data-theme="dark"] .container form div,
:root[data-theme="dark"] .container form * {
    color: #c8e4fc !important;
}

/* 3. Input Text Box Tweaks - Deep dark background with light blue text inside */
:root[data-theme="dark"] .container form input[type="text"],
:root[data-theme="dark"] .container form input[type="email"],
:root[data-theme="dark"] .container form textarea {
    background-color: #101b2c !important; 
    color: #c8e4fc !important;
    border: 1px solid #355074 !important;
    border-radius: 6px !important;
}

/* 4. Action Button Inversion - Makes button text clear white */
:root[data-theme="dark"] .container form button,
:root[data-theme="dark"] .container form input[type="submit"],
:root[data-theme="dark"] .container form [class*="btn"] {
    background-color: #1d4ed8 !important;
    color: #c8e4fc !important;
    border: 1px solid #3b82f6 !important;
}

/* 1. Sets the anchor on the main container box */
:root .container {
    position: relative !important;
}

/* 2. Locks the button in the top-right empty space */
.theme-toggle {
    position: absolute !important;
    top: 7px !important;      /* Distance from the top inside edge */
    right: 7px !important;    /* Distance from the right inside edge */
    z-index: 100 !important;   /* Keeps it clickable above everything else */
    
    /* Clean button styling */
    padding: 6px 14px;
    border: 2px solid #1e293b;
    border-radius: 30px;
    background: #c8e4fc;
    color: #1e293b;
    font-weight: bold;
    font-size: 11px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.theme-toggle:hover {
    background: #1e293b;
    color: #c8e4fc;
}

/* Dark Mode states */
:root[data-theme="dark"] .theme-toggle {
    background: #101b2c;
    color: #5ecbff;
    border: 2px solid #3b82f6;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.3);
}

:root[data-theme="dark"] .theme-toggle:hover {
    background: #3b82f6;
    color: #000000;
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.6);
}

/* 3. Mobile screen handling (Maintains right side alignment, prevents shifting) */
@media (max-width: 768px) {
    .theme-toggle {
        top: 7px !important;   /* Pulls it slightly closer to the top on mobile */
        right: 7px !important; /* Pulls it slightly closer to the right on mobile */
        padding: 4px 10px;       /* Shrinks button size slightly for mobile spacing */
        font-size: 10px;
    }
}
/* =================================================
   DARK THEME DONATION CARD
================================================= */

/* Container adaptation */
:root[data-theme="dark"] .donation-card {
    background-color: #0b1329 !important; /* Deep dark slate to blend with the footer */
    border: 2px solid #1e293b !important; /* Muted dark border line */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.6) !important; /* Stronger shadow for dark background depth */
}

/* Heading color */
:root[data-theme="dark"] .donation-content h3 {
    color: #2fbdff !important; /* Uses your signature neon blue heading color */
}

/* Paragraph text color */
:root[data-theme="dark"] .donation-content p {
    color: #becbdd !important; /* Soft, accessible gray to reduce eye strain */
}

/* Golden Amber Button Tweaks */
:root[data-theme="dark"] .coffee-btn {
    background-color: #f59e0b !important; /* Keeps the high-visibility gold */
    color: #000000 !important; /* Keeps the deep black text contrast */
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3) !important; /* Gives the gold button a faint glowing lift */
}

:root[data-theme="dark"] .coffee-btn:hover {
    background-color: #fbbf24 !important; /* Slightly brighter gold on hover for responsive dark feedback */
}
/* =================================================
   ANTI-HORIZONTAL SCROLL SAFETY SHIELD
================================================= */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}
/* =================================================
   TABLET & IPAD VIEWPORT NAV BAR FIX (769px - 1024px)
================================================= */
@media screen and (min-width: 769px) and (max-width: 1024px) {

    /* 🔴 STOP ALL HORIZONTAL SCROLL */
    body {
        overflow-x: hidden !important;
    }

    /* 🔴 FIX NAVBAR SCROLLING & BOUNDARIES */
    .navbar {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 10px 10px !important;   
        gap: 5px !important;
        width: 100% !important;
        box-sizing: border-box !important;
        overflow: visible !important; 
        position: relative !important; 
    }

    /* 🔴 HAMBURGER */
    .hamburger {
        display: block !important;
        margin-right: 5px !important;
        cursor: pointer !important;
    }

    /* 🔴 DROPDOWN CLOSE TO HAMBURGER */
    .dropdown {
        margin-left: 0 !important;
    }

    .dropbtn {
        font-size: 18px !important;   
        padding: 10px 12px !important;
    }

    /* 🔴 FORCE SEARCH TO FIT */
    .search-group {
        margin-left: auto !important;
        display: flex !important;
        align-items: center !important;
        max-width: 45% !important; 
    }

    /* 🔴 SEARCH INPUT FIX */
    .search-wrapper {
        width: 100% !important;
        max-width: 160px !important; 
        position: relative !important;
    }

    .search-wrapper:focus-within {
        width: 100% !important;
        max-width: 190px !important;
    }

    /* 🔴 REMOVE BUTTON */
    .modern-search-btn {
        display: none !important;
    }

    /* 🔴 HIDE DESKTOP LINKS */
    .desktop-only {
        display: none !important;
    }

    /* NAVBAR TEXT SIZES */
    .navbar a,
    .dropbtn {
        font-size: 15px !important;
    }

    /* SEARCH INPUT TEXT */
    #topicSearch {
        font-size: 14px !important;
    }

    /* SEARCH SUGGESTIONS TEXT */
    .suggestions-dropdown a {
        font-size: 14px !important;
    }

    /* =================================================
       🔥 FIXED: HAMBURGER DROP-DOWN MENU (LIGHT & DARK THEMES)
    ================================================= */
    .mobile-menu {
        display: none !important; 
        position: absolute !important;
        top: 100% !important; 
        left: 10px !important;          
        width: 250px !important;        
        flex-direction: column !important;
        padding: 5px 0 !important;
        z-index: 999999 !important; 
        border-radius: 8px !important;
        
        /* Default: Clean Light Mode Look */
        background-color: #ffffff !important; 
        border: 1px solid #ccd6f6 !important;
        box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
    }

    .mobile-menu.show {
        display: flex !important;
    }

    /* Default Light Mode Link Colors */
    .mobile-menu a {
        display: block !important;
        width: 100% !important;
        padding: 12px 20px !important;
        box-sizing: border-box !important;
        text-decoration: none !important;
        text-align: left !important;
        font-size: 15px !important;
        font-weight: bold !important;
        color: #0b192c !important; /* Dark text for crisp light visibility */
        border-bottom: 1px solid #f0f4f8 !important;
    }
    
    .mobile-menu a:hover {
        background-color: #f0f4f8 !important;
    }

    /* 🌓 Dark Mode Overrides for Hamburger Dropdown */
    :root[data-theme="dark"] .mobile-menu {
        background-color: #010120 !important; 
        border: 2px solid rgba(85, 223, 247, 0.4) !important;
        box-shadow: 0 5px 15px rgba(0,0,0,0.5) !important;
    }

    :root[data-theme="dark"] .mobile-menu a {
        color: #c8e4fc !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
    
    :root[data-theme="dark"] .mobile-menu a:hover {
        background-color: rgba(85, 223, 247, 0.1) !important;
    }

    /* =================================================
       🔥 FIXED: THEME TOGGLE BUTTON CLEAR PLACEMENT & COLORS
    ================================================= */
    .theme-toggle {
        position: absolute !important;
        right: 8px !important;        
        top: -37px !important; /* Safely clears the title header spacing zone completely */
        z-index: 99999 !important;
        display: inline-block !important;
        visibility: visible !important;
        opacity: 1 !important;
        
        /* Crisp High-Visibility Styling for Light Mode */
        padding: 8px 18px !important;
        min-width: 110px !important;
        text-align: center !important;
        border: 2px solid #00008b !important;
        border-radius: 40px !important;
        background: #00008b !important;
        color: #ffffff !important;
        font-weight: 800 !important;
        font-size: 11px !important;
        letter-spacing: 0.8px !important;
        text-transform: uppercase !important;
        box-shadow: 0 4px 12px rgba(0, 0, 139, 0.3) !important;
    }

    /* High-Visibility Styling for Dark Mode */
    :root[data-theme="dark"] .theme-toggle {
        background: linear-gradient(135deg, #00b8ff, #0077ff) !important;
        border: none !important;
        color: #000000 !important;
        font-weight: 900 !important;
        box-shadow: 0 0 15px rgba(0, 184, 255, 0.5) !important;
    }
}
    /* =================================================
       🔥 HIDE TOGGLE BUTTON ONLY WHEN SEARCHING
    ================================================= */
    /* When the search input is focused, hide the theme button so it never overlaps the dropdown suggestions */
    :root:has(#topicSearch:focus) .theme-toggle {
        display: none !important;
        opacity: 0 !important;
        visibility: hidden !important;
    }
/* ==========================================
   🎉 SMART MATHS NOTES - THANK YOU GRAPHICS
   ========================================== */

.thankyou-wrapper {
    width: 100%;
    padding: 60px 20px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.thankyou-card {
    max-width: 600px;
    width: 100%;
    background: #ffffff; /* Clean contrast for standard light mode */
    border-radius: 16px;
    padding: 50px 40px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #e5e7eb;
    text-align: center;
    box-sizing: border-box;
    position: relative;
    z-index: 10;
    animation: fadeInUp 0.8s ease-out;
}

.thankyou-heart-badge {
    width: 80px;
    height: 80px;
    background: #eff6ff;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 40px;
    margin: 0 auto 24px auto;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.15);
    animation: heartBeat 2s infinite ease-in-out;
}

.thankyou-title {
    font-size: 42px;
    font-weight: 800;
    color: #2563eb;
    margin-top: 0;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
}

.thankyou-text {
    font-size: 17px;
    line-height: 1.8;
    color: #4b5563; /* Readable dark slate for light mode */
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.thankyou-text b {
    color: #2563eb;
}

.thankyou-action-btn {
    display: inline-block;
    padding: 14px 36px;
    background-color: #2563eb;
    color: #ffffff !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 16px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.thankyou-action-btn:hover {
    background-color: #1d4ed8;
}

/* --- 🎉 PURE CSS CONFETTI DROP RAIN MECHANICS --- */
.confetti-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.confetti-piece {
    position: absolute;
    width: 12px;
    height: 24px;
    background-color: #3b82f6;
    opacity: 0.7;
    top: -20px;
    border-radius: 3px;
    animation: fall linear infinite;
}

.confetti-piece:nth-child(1) { left: 10%; width: 10px; height: 20px; background-color: #3b82f6; animation-duration: 4s; animation-delay: 0s; }
.confetti-piece:nth-child(2) { left: 25%; width: 14px; height: 28px; background-color: #10b981; animation-duration: 5s; animation-delay: 1.5s; }
.confetti-piece:nth-child(3) { left: 40%; width: 8px; height: 16px; background-color: #f59e0b; animation-duration: 3.5s; animation-delay: 0.5s; }
.confetti-piece:nth-child(4) { left: 55%; width: 12px; height: 24px; background-color: #ef4444; animation-duration: 6s; animation-delay: 2s; }
.confetti-piece:nth-child(5) { left: 70%; width: 10px; height: 22px; background-color: #ec4899; animation-duration: 4.5s; animation-delay: 1s; }
.confetti-piece:nth-child(6) { left: 85%; width: 15px; height: 25px; background-color: #8b5cf6; animation-duration: 5.5s; animation-delay: 0.2s; }
.confetti-piece:nth-child(7) { left: 95%; width: 9px; height: 18px; background-color: #06b6d4; animation-duration: 3.8s; animation-delay: 1.8s; }

/* --- 🎬 KEYFRAMES ENGINE --- */
@keyframes fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; top: -20px; }
    90% { opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes heartBeat {
    0% { transform: scale(1); }
    14% { transform: scale(1.1); }
    28% { transform: scale(1); }
    42% { transform: scale(1.1); }
    70% { transform: scale(1); }
}

/* --- 🌙 NATIVE DARK MODE CONFIGURATIONS --- */
/* Completely strips internal backgrounds so the card maps seamlessly over your system colors */
body.dark-mode .thankyou-card,
[data-theme="dark"] .thankyou-card {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

body.dark-mode .thankyou-text,
[data-theme="dark"] .thankyou-text {
    color: #c7d3e4 !important; /* Premium readable gray tint */
}

body.dark-mode .thankyou-heart-badge,
[data-theme="dark"] .thankyou-heart-badge {
    background: #1e293b !important;
    border: 1px solid #334155 !important;
    box-shadow: none !important;
}

@media (max-width: 480px) {
    .thankyou-card { padding: 40px 10px; }
    .thankyou-title { font-size: 32px; }
    .thankyou-text { font-size: 15px; }
}
