body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,0.9), transparent 34%),
        linear-gradient(135deg, var(--page-bg-start, #eef8f3), var(--page-bg-end, #edf6ff));
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
    perspective: 1000px;
    overflow-x: hidden;
    position: relative;
    isolation: isolate;
}

body::before,
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -2;
}

body::before {
    background:
        radial-gradient(circle at 18% 22%, var(--orb-one, rgba(103, 214, 232, 0.34)), transparent 0 20%),
        radial-gradient(circle at 82% 18%, var(--orb-two, rgba(98, 206, 117, 0.28)), transparent 0 22%),
        radial-gradient(circle at 72% 76%, var(--orb-three, rgba(52, 143, 255, 0.22)), transparent 0 18%);
    transform: translateZ(0) scale(1.04);
    filter: blur(6px);
}

body::after {
    z-index: -1;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.34), rgba(255,255,255,0.04)),
        linear-gradient(125deg, transparent 30%, rgba(255,255,255,0.18) 48%, transparent 56%),
        radial-gradient(circle at 50% 50%, transparent 58%, rgba(255,255,255,0.12) 59%, transparent 60%);
    opacity: 0.9;
    mix-blend-mode: screen;
}

.theme-home {
    --page-bg-start: #e9fff1;
    --page-bg-end: #e7f2ff;
    --orb-one: rgba(95, 220, 143, 0.34);
    --orb-two: rgba(44, 152, 255, 0.3);
    --orb-three: rgba(20, 92, 190, 0.18);
}

.theme-about {
    --page-bg-start: #eefcf4;
    --page-bg-end: #eef7ff;
    --orb-one: rgba(106, 220, 165, 0.34);
    --orb-two: rgba(58, 141, 255, 0.24);
    --orb-three: rgba(145, 224, 255, 0.2);
}

.theme-introduction {
    --page-bg-start: #f3fff0;
    --page-bg-end: #edf6ff;
    --orb-one: rgba(117, 222, 123, 0.3);
    --orb-two: rgba(76, 157, 255, 0.26);
    --orb-three: rgba(181, 230, 255, 0.24);
}

.theme-basics {
    --page-bg-start: #f5fff3;
    --page-bg-end: #f0f6ff;
    --orb-one: rgba(132, 224, 104, 0.32);
    --orb-two: rgba(39, 144, 255, 0.24);
    --orb-three: rgba(255, 255, 255, 0.22);
}

.theme-intermediate {
    --page-bg-start: #effff9;
    --page-bg-end: #edf2ff;
    --orb-one: rgba(67, 219, 186, 0.32);
    --orb-two: rgba(70, 126, 255, 0.25);
    --orb-three: rgba(150, 232, 255, 0.2);
}

.theme-advanced {
    --page-bg-start: #eef6ff;
    --page-bg-end: #edf1ff;
    --orb-one: rgba(80, 188, 255, 0.3);
    --orb-two: rgba(80, 108, 255, 0.24);
    --orb-three: rgba(14, 46, 99, 0.18);
}

.theme-notes {
    --page-bg-start: #fbfff4;
    --page-bg-end: #eef6ff;
    --orb-one: rgba(126, 212, 103, 0.3);
    --orb-two: rgba(78, 155, 255, 0.23);
    --orb-three: rgba(255, 236, 184, 0.2);
}

.theme-qa {
    --page-bg-start: #f8fff1;
    --page-bg-end: #eff5ff;
    --orb-one: rgba(91, 214, 199, 0.3);
    --orb-two: rgba(74, 134, 255, 0.24);
    --orb-three: rgba(255, 221, 129, 0.2);
}

.theme-fill-blanks {
    --page-bg-start: #f6fff2;
    --page-bg-end: #eef4ff;
    --orb-one: rgba(123, 224, 158, 0.3);
    --orb-two: rgba(94, 140, 255, 0.22);
    --orb-three: rgba(204, 240, 255, 0.2);
}

.theme-true-false {
    --page-bg-start: #fffdf2;
    --page-bg-end: #eef6ff;
    --orb-one: rgba(116, 209, 103, 0.3);
    --orb-two: rgba(255, 176, 92, 0.22);
    --orb-three: rgba(72, 152, 255, 0.2);
}

.theme-mcqs {
    --page-bg-start: #fffdf4;
    --page-bg-end: #eef5ff;
    --orb-one: rgba(255, 194, 86, 0.25);
    --orb-two: rgba(76, 155, 255, 0.24);
    --orb-three: rgba(102, 216, 196, 0.2);
}

.theme-applications {
    --page-bg-start: #effff7;
    --page-bg-end: #eef5ff;
    --orb-one: rgba(82, 221, 157, 0.32);
    --orb-two: rgba(53, 144, 255, 0.24);
    --orb-three: rgba(145, 241, 214, 0.18);
}

.theme-examples {
    --page-bg-start: #f2fff4;
    --page-bg-end: #f0f4ff;
    --orb-one: rgba(124, 217, 106, 0.3);
    --orb-two: rgba(72, 150, 255, 0.25);
    --orb-three: rgba(255, 226, 155, 0.2);
}

.theme-maths-formulas {
    --page-bg-start: #f4fff1;
    --page-bg-end: #ebf7ff;
    --orb-one: rgba(123, 224, 96, 0.32);
    --orb-two: rgba(44, 168, 255, 0.24);
    --orb-three: rgba(255, 241, 190, 0.18);
}

.theme-maths-tricks {
    --page-bg-start: #f7fff3;
    --page-bg-end: #eef4ff;
    --orb-one: rgba(88, 217, 181, 0.28);
    --orb-two: rgba(74, 133, 255, 0.23);
    --orb-three: rgba(255, 198, 123, 0.18);
}

.theme-class9-maths {
    --page-bg-start: #f7fff1;
    --page-bg-end: #eef7ff;
    --orb-one: rgba(132, 224, 104, 0.32);
    --orb-two: rgba(52, 149, 255, 0.24);
    --orb-three: rgba(255, 221, 146, 0.18);
}

.theme-class10-maths {
    --page-bg-start: #f8fbff;
    --page-bg-end: #f2f8ff;
    --orb-one: rgba(93, 168, 255, 0.3);
    --orb-two: rgba(255, 197, 102, 0.22);
    --orb-three: rgba(110, 210, 188, 0.18);
}

.theme-class11-maths {
    --page-bg-start: #f6f8ff;
    --page-bg-end: #eef8ff;
    --orb-one: rgba(120, 137, 255, 0.28);
    --orb-two: rgba(84, 200, 255, 0.22);
    --orb-three: rgba(180, 224, 255, 0.18);
}

.theme-class12-maths {
    --page-bg-start: #f9f7ff;
    --page-bg-end: #eef8ff;
    --orb-one: rgba(142, 115, 255, 0.24);
    --orb-two: rgba(78, 194, 255, 0.22);
    --orb-three: rgba(255, 213, 126, 0.16);
}

.theme-class9-science {
    --page-bg-start: #f2fdff;
    --page-bg-end: #eef9f7;
    --orb-one: rgba(90, 205, 244, 0.28);
    --orb-two: rgba(97, 220, 180, 0.22);
    --orb-three: rgba(171, 231, 255, 0.18);
}

.theme-class10-science {
    --page-bg-start: #f3fbff;
    --page-bg-end: #eef4ff;
    --orb-one: rgba(83, 178, 255, 0.28);
    --orb-two: rgba(108, 220, 194, 0.2);
    --orb-three: rgba(255, 214, 142, 0.16);
}

.theme-class11-science {
    --page-bg-start: #f2f8ff;
    --page-bg-end: #eef3ff;
    --orb-one: rgba(106, 153, 255, 0.26);
    --orb-two: rgba(100, 217, 255, 0.22);
    --orb-three: rgba(196, 229, 255, 0.18);
}

.theme-class12-science {
    --page-bg-start: #f5f6ff;
    --page-bg-end: #eef7ff;
    --orb-one: rgba(116, 122, 255, 0.24);
    --orb-two: rgba(82, 200, 255, 0.22);
    --orb-three: rgba(187, 227, 255, 0.16);
}

.theme-science-formulas {
    --page-bg-start: #effcff;
    --page-bg-end: #edf1ff;
    --orb-one: rgba(96, 215, 255, 0.3);
    --orb-two: rgba(74, 132, 255, 0.24);
    --orb-three: rgba(114, 232, 197, 0.18);
}

.theme-science-tricks {
    --page-bg-start: #f2fbff;
    --page-bg-end: #eef0ff;
    --orb-one: rgba(104, 204, 236, 0.3);
    --orb-two: rgba(85, 124, 255, 0.24);
    --orb-three: rgba(174, 232, 255, 0.18);
}

.theme-contact {
    --page-bg-start: #f5fff8;
    --page-bg-end: #eef5ff;
    --orb-one: rgba(106, 196, 255, 0.28);
    --orb-two: rgba(87, 137, 255, 0.22);
    --orb-three: rgba(124, 226, 196, 0.18);
}

.theme-resources {
    --page-bg-start: #fbfff4;
    --page-bg-end: #eef6ff;
    --orb-one: rgba(126, 214, 109, 0.28);
    --orb-two: rgba(70, 153, 255, 0.22);
    --orb-three: rgba(255, 220, 154, 0.18);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    color: #fff;
    padding: 1rem 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.2);
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    pointer-events: none;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 64px;
    transform: translateZ(0);
    transition: transform 0.3s, filter 0.3s;
    filter: drop-shadow(0 8px 14px rgba(5, 29, 44, 0.28));
}

.logo img:hover {
    transform: translateZ(8px) scale(1.03);
    filter: drop-shadow(0 12px 18px rgba(5, 29, 44, 0.36));
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
    color: #fff;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 1rem;
}

nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background 0.3s, transform 0.3s;
    transform: translateZ(0);
}

nav a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateZ(5px);
}

.dropdown {
    position: relative;
}

.dropdown ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.2);
    min-width: 200px;
    z-index: 1000;
    transform: translateZ(0);
    transform-style: preserve-3d;
}

.dropdown:hover ul {
    display: block;
}

.dropdown ul li {
    display: block;
}

.dropdown ul li a {
    padding: 10px;
    display: block;
    color: #333;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s;
    transform: translateZ(0);
}

.dropdown ul li a:hover {
    background: #4CAF50;
    color: #fff;
    transform: translateZ(3px);
}

.dropdown-submenu {
    position: relative;
}

.dropdown-submenu ul {
    display: none;
    position: absolute;
    top: 0;
    left: 100%;
    background: linear-gradient(135deg, #fff, #f0f0f0);
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1), 0 10px 20px rgba(0,0,0,0.2);
    min-width: 180px;
    z-index: 1001;
}

.dropdown-submenu:hover ul {
    display: block;
}

main {
    padding: 2rem 0;
}

.page-header {
    padding: 2rem 0 1rem;
}

.page-header .container,
main section > .container,
#hero .container {
    background: linear-gradient(155deg, rgba(255,255,255,0.78), rgba(255,255,255,0.52));
    border: 1px solid rgba(255,255,255,0.42);
    border-radius: 28px;
    box-shadow: 0 22px 44px rgba(10, 41, 64, 0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

.page-header h1,
.page-header p {
    margin: 0 0 1rem;
}

.page-illustration {
    display: block;
    width: min(100%, 760px);
    margin: 1.5rem auto 0;
    border-radius: 24px;
    box-shadow: 0 18px 34px rgba(10, 41, 64, 0.14);
}

.page-illustration-compact {
    width: min(100%, 640px);
}

.hero-illustration {
    margin-top: 2rem;
}

.science-formulas-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.maths-class-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.science-class-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.maths-topic-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.maths-topic-nav a {
    text-decoration: none;
    color: #0c4c2f;
    font-weight: 700;
    padding: 0.85rem 1.35rem;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(232,250,223,0.8));
    border: 1px solid rgba(255,255,255,0.75);
    box-shadow: 0 14px 26px rgba(10, 41, 64, 0.12);
    transition: transform 0.25s, box-shadow 0.25s;
}

.maths-topic-nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(10, 41, 64, 0.16);
}

.science-formulas-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.science-formulas-nav a {
    text-decoration: none;
    color: #0a3552;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 0.85rem 1.4rem;
    border-radius: 999px;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(214,244,255,0.68));
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 14px 26px rgba(10, 41, 64, 0.12);
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}

.science-formulas-nav a:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 30px rgba(10, 41, 64, 0.16);
    background: linear-gradient(145deg, rgba(255,255,255,0.96), rgba(190,235,255,0.78));
}

.subject-panel {
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 32px;
    background:
        linear-gradient(155deg, rgba(255,255,255,0.84), rgba(236,247,255,0.64)),
        linear-gradient(135deg, rgba(255,255,255,0.28), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.7);
    box-shadow: 0 24px 42px rgba(10, 41, 64, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.subject-panel::before {
    content: '';
    position: absolute;
    inset: auto -80px -100px auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(115, 217, 255, 0.24), transparent 68%);
    pointer-events: none;
}

.subject-panel h2 {
    display: inline-block;
    margin: 0 0 1.5rem;
    padding: 0.9rem 1.4rem;
    border-radius: 20px;
    color: #063958;
    background: linear-gradient(145deg, rgba(97, 214, 255, 0.28), rgba(255,255,255,0.92));
    box-shadow: 0 12px 24px rgba(10, 41, 64, 0.12);
}

.theme-science-formulas .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.8rem 1rem;
    border-left: 5px solid #46a8ff;
    border-radius: 16px;
    color: #093c5c;
    background: linear-gradient(145deg, rgba(255,255,255,0.8), rgba(221,244,255,0.65));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-science-formulas .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background:
        linear-gradient(160deg, rgba(255,255,255,0.92), rgba(239,248,255,0.72));
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-science-formulas .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.98), rgba(225,243,255,0.74));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.72);
}

.theme-science-formulas .subject-panel li strong {
    color: #0b5d8d;
}

.theme-class9-maths .subject-panel {
    background:
        linear-gradient(155deg, rgba(255,255,255,0.88), rgba(241,251,235,0.68)),
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
}

.theme-class9-maths .subject-panel::before {
    background: radial-gradient(circle, rgba(126, 218, 89, 0.24), transparent 68%);
}

.theme-class9-maths .subject-panel h2 {
    color: #0c4d2f;
    background: linear-gradient(145deg, rgba(135, 224, 114, 0.28), rgba(255,255,255,0.94));
}

.theme-class9-maths .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid #68ba41;
    border-radius: 16px;
    color: #1e5a2d;
    background: linear-gradient(145deg, rgba(255,255,255,0.84), rgba(237,250,229,0.8));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-class9-maths .subject-panel h4 {
    margin: 1rem 0 0.5rem;
    color: #2a6a38;
}

.theme-class9-maths .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(240,251,233,0.8));
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.8),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-class9-maths .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(229,247,220,0.76));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
}

.theme-class9-maths .subject-panel p {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.92), rgba(242,250,237,0.74));
    box-shadow: 0 12px 20px rgba(10, 41, 64, 0.07);
}

.theme-class10-maths .subject-panel {
    background:
        linear-gradient(155deg, rgba(255,255,255,0.9), rgba(237,245,255,0.72)),
        linear-gradient(135deg, rgba(255,255,255,0.24), rgba(255,255,255,0.08));
}

.theme-class10-maths .subject-panel::before {
    background: radial-gradient(circle, rgba(92, 166, 255, 0.22), transparent 68%);
}

.theme-class10-maths .subject-panel h2 {
    color: #184974;
    background: linear-gradient(145deg, rgba(104, 173, 255, 0.24), rgba(255,255,255,0.95));
}

.theme-class10-maths .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid #4d97ff;
    border-radius: 16px;
    color: #1d4d7d;
    background: linear-gradient(145deg, rgba(255,255,255,0.86), rgba(233,244,255,0.82));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-class10-maths .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(235,244,255,0.82));
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.82),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-class10-maths .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(232,243,255,0.8));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
}

.theme-class10-maths .subject-panel p {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(240,246,255,0.78));
    box-shadow: 0 12px 20px rgba(10, 41, 64, 0.07);
}

.theme-class11-maths .subject-panel {
    background:
        linear-gradient(155deg, rgba(255,255,255,0.9), rgba(239,244,255,0.74)),
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
}

.theme-class11-maths .subject-panel::before {
    background: radial-gradient(circle, rgba(108, 129, 255, 0.2), transparent 68%);
}

.theme-class11-maths .subject-panel h2 {
    color: #33428f;
    background: linear-gradient(145deg, rgba(136, 149, 255, 0.22), rgba(255,255,255,0.95));
}

.theme-class11-maths .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid #6b7bff;
    border-radius: 16px;
    color: #364891;
    background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(236,241,255,0.84));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-class11-maths .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(238,243,255,0.84));
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.82),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-class11-maths .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(234,240,255,0.82));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
}

.theme-class11-maths .subject-panel p {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(240,243,255,0.8));
    box-shadow: 0 12px 20px rgba(10, 41, 64, 0.07);
}

.theme-class12-maths .subject-panel {
    background:
        linear-gradient(155deg, rgba(255,255,255,0.92), rgba(242,240,255,0.76)),
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
}

.theme-class12-maths .subject-panel::before {
    background: radial-gradient(circle, rgba(135, 114, 255, 0.2), transparent 68%);
}

.theme-class12-maths .subject-panel h2 {
    color: #50329a;
    background: linear-gradient(145deg, rgba(152, 131, 255, 0.22), rgba(255,255,255,0.95));
}

.theme-class12-maths .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid #8b73ff;
    border-radius: 16px;
    color: #5639a0;
    background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(243,240,255,0.84));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-class12-maths .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(244,241,255,0.86));
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.82),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-class12-maths .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(242,239,255,0.84));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
}

.theme-class12-maths .subject-panel p {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.94), rgba(244,241,255,0.82));
    box-shadow: 0 12px 20px rgba(10, 41, 64, 0.07);
}

.theme-class9-science .subject-panel,
.theme-class10-science .subject-panel,
.theme-class11-science .subject-panel,
.theme-class12-science .subject-panel {
    background:
        linear-gradient(155deg, rgba(255,255,255,0.9), rgba(236,248,255,0.74)),
        linear-gradient(135deg, rgba(255,255,255,0.22), rgba(255,255,255,0.08));
}

.theme-class9-science .subject-panel::before,
.theme-class10-science .subject-panel::before,
.theme-class11-science .subject-panel::before,
.theme-class12-science .subject-panel::before {
    background: radial-gradient(circle, rgba(86, 190, 255, 0.22), transparent 68%);
}

.theme-class9-science .subject-panel h2,
.theme-class10-science .subject-panel h2,
.theme-class11-science .subject-panel h2,
.theme-class12-science .subject-panel h2 {
    color: #0d4d74;
    background: linear-gradient(145deg, rgba(102, 189, 255, 0.22), rgba(255,255,255,0.95));
}

.theme-class9-science .subject-panel h3,
.theme-class10-science .subject-panel h3,
.theme-class11-science .subject-panel h3,
.theme-class12-science .subject-panel h3 {
    margin: 1.75rem 0 0.8rem;
    padding: 0.85rem 1rem;
    border-left: 5px solid #4aa7ff;
    border-radius: 16px;
    color: #14577e;
    background: linear-gradient(145deg, rgba(255,255,255,0.88), rgba(235,247,255,0.84));
    box-shadow: 0 10px 20px rgba(10, 41, 64, 0.08);
}

.theme-class9-science .subject-panel ul,
.theme-class10-science .subject-panel ul,
.theme-class11-science .subject-panel ul,
.theme-class12-science .subject-panel ul {
    list-style: none;
    padding: 1rem;
    margin: 0 0 1.25rem;
    border-radius: 22px;
    background: linear-gradient(160deg, rgba(255,255,255,0.98), rgba(237,248,255,0.86));
    border: 1px solid rgba(255,255,255,0.82);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,0.82),
        0 18px 28px rgba(10, 41, 64, 0.1);
    display: grid;
    gap: 0.75rem;
}

.theme-class9-science .subject-panel li,
.theme-class10-science .subject-panel li,
.theme-class11-science .subject-panel li,
.theme-class12-science .subject-panel li {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.99), rgba(235,245,255,0.84));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
}

.theme-introduction main,
.theme-basics main,
.theme-intermediate main,
.theme-advanced main,
.theme-notes main,
.theme-qa main,
.theme-fill-blanks main,
.theme-true-false main,
.theme-mcqs main,
.theme-applications main,
.theme-examples main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 2rem;
}

.theme-introduction main section,
.theme-basics main section,
.theme-intermediate main section,
.theme-advanced main section,
.theme-notes main section,
.theme-qa main section,
.theme-fill-blanks main section,
.theme-true-false main section,
.theme-mcqs main section,
.theme-applications main section,
.theme-examples main section {
    padding: 1.8rem;
    border-radius: 30px;
    background:
        linear-gradient(155deg, rgba(255,255,255,0.88), rgba(236,246,255,0.72)),
        linear-gradient(135deg, rgba(255,255,255,0.2), rgba(255,255,255,0.08));
    border: 1px solid rgba(255,255,255,0.72);
    box-shadow: 0 24px 42px rgba(10, 41, 64, 0.12);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: relative;
    overflow: hidden;
}

.theme-introduction main section::before,
.theme-basics main section::before,
.theme-intermediate main section::before,
.theme-advanced main section::before,
.theme-notes main section::before,
.theme-qa main section::before,
.theme-fill-blanks main section::before,
.theme-true-false main section::before,
.theme-mcqs main section::before,
.theme-applications main section::before,
.theme-examples main section::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -40px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(91, 185, 255, 0.16), transparent 68%);
    pointer-events: none;
}

.theme-introduction main section > h2,
.theme-basics main section > h2,
.theme-intermediate main section > h2,
.theme-advanced main section > h2,
.theme-notes main section > h2,
.theme-qa main section > h2,
.theme-fill-blanks main section > h2,
.theme-true-false main section > h2,
.theme-mcqs main section > h2,
.theme-applications main section > h2,
.theme-examples main section > h2 {
    display: inline-block;
    margin: 0 0 1.25rem;
    padding: 0.85rem 1.3rem;
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(108, 178, 255, 0.22), rgba(255,255,255,0.94));
    box-shadow: 0 12px 24px rgba(10, 41, 64, 0.1);
}

.theme-introduction main h3,
.theme-basics main h3,
.theme-intermediate main h3,
.theme-advanced main h3,
.theme-notes main h3,
.theme-qa main h3,
.theme-fill-blanks main h3,
.theme-true-false main h3,
.theme-mcqs main h3,
.theme-applications main h3,
.theme-examples main h3 {
    margin: 1.5rem 0 0.8rem;
    padding: 0.75rem 1rem;
    border-left: 5px solid #4b97ff;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,0.82), rgba(236,245,255,0.8));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
}

.theme-introduction main ul,
.theme-introduction main ol,
.theme-basics main ul,
.theme-basics main ol,
.theme-intermediate main ul,
.theme-intermediate main ol,
.theme-advanced main ul,
.theme-advanced main ol,
.theme-notes main ul,
.theme-notes main ol,
.theme-fill-blanks main ul,
.theme-fill-blanks main ol,
.theme-true-false main ul,
.theme-true-false main ol,
.theme-mcqs main ul,
.theme-mcqs main ol,
.theme-applications main ul,
.theme-applications main ol {
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 20px;
    background: linear-gradient(160deg, rgba(255,255,255,0.96), rgba(239,247,255,0.82));
    box-shadow: 0 14px 24px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.78);
}

.theme-qa main dl {
    display: grid;
    gap: 1rem;
}

.theme-qa main dt,
.theme-qa main dd {
    margin: 0;
}

.theme-qa main dt {
    padding: 1rem 1rem 0.6rem;
    border-radius: 18px 18px 0 0;
    background: linear-gradient(145deg, rgba(112, 181, 255, 0.2), rgba(255,255,255,0.92));
    box-shadow: 0 10px 18px rgba(10, 41, 64, 0.08);
    font-weight: 700;
}

.theme-qa main dd {
    padding: 0.9rem 1rem 1rem;
    border-radius: 0 0 18px 18px;
    background: linear-gradient(145deg, rgba(255,255,255,0.97), rgba(239,246,255,0.84));
    box-shadow: 0 14px 22px rgba(10, 41, 64, 0.08);
    border: 1px solid rgba(255,255,255,0.76);
    border-top: none;
}

.theme-examples main pre,
.theme-introduction main pre,
.theme-basics main pre,
.theme-intermediate main pre,
.theme-advanced main pre {
    background: linear-gradient(145deg, #10263a, #173b57);
    color: #eaf7ff;
    border-radius: 22px;
    box-shadow: 0 18px 28px rgba(10, 41, 64, 0.18);
    border: 1px solid rgba(255,255,255,0.08);
}

.theme-examples main code,
.theme-introduction main code,
.theme-basics main code,
.theme-intermediate main code,
.theme-advanced main code,
.theme-qa main code {
    background: rgba(90, 172, 255, 0.12);
}

section {
    margin-bottom: 2rem;
}

h1, h2, h3 {
    color: #2196F3;
}

code {
    background: #f0f0f0;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

pre {
    background: #f0f0f0;
    padding: 1rem;
    border-radius: 4px;
    overflow-x: auto;
}

form {
    max-width: 600px;
    margin: 0 auto;
    background: #f9f9f9;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

input, textarea {
    width: 100%;
    padding: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-sizing: border-box;
}

textarea {
    min-height: 220px;
    resize: vertical;
}

button {
    background: #4CAF50;
    color: white;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.3s;
}

button:hover {
    background: #45a049;
}

footer {
    background: linear-gradient(135deg, #333, #555);
    color: #fff;
    padding: 2rem 0 1rem;
    margin-top: 2rem;
    box-shadow: inset 0 10px 20px rgba(0,0,0,0.3);
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4CAF50, #2196F3);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    color: #4CAF50;
    transform: translateZ(0);
    transition: transform 0.3s;
}

.footer-section h3:hover {
    transform: translateZ(2px);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section a {
    color: #fff;
    text-decoration: none;
}

.footer-section a:hover {
    color: #4CAF50;
}

/* Index specific */
#hero {
    background: transparent;
    padding: 3rem 0;
    text-align: center;
}

#hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.card {
    background: #fff;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    transform-style: preserve-3d;
}

.card:hover {
    transform: rotateY(5deg) translateY(-10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.card h4 {
    color: #2196F3;
    margin-top: 0;
}

/* Responsive */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }
    header .container {
        flex-direction: column;
        text-align: center;
    }
    .page-header .container,
    main section > .container,
    #hero .container {
        border-radius: 20px;
        padding-top: 1.2rem;
        padding-bottom: 1.2rem;
    }
    #hero h2 {
        font-size: 2rem;
    }
    .page-illustration {
        border-radius: 18px;
        margin-top: 1rem;
    }
    .subject-panel {
        padding: 1.25rem;
        border-radius: 22px;
    }
    .science-formulas-nav {
        gap: 0.75rem;
    }
    .science-formulas-nav a {
        width: 100%;
        text-align: center;
    }
    .maths-topic-nav {
        gap: 0.75rem;
    }
    .maths-topic-nav a {
        width: 100%;
        text-align: center;
    }
    .theme-introduction main section,
    .theme-basics main section,
    .theme-intermediate main section,
    .theme-advanced main section,
    .theme-notes main section,
    .theme-qa main section,
    .theme-fill-blanks main section,
    .theme-true-false main section,
    .theme-mcqs main section,
    .theme-applications main section,
    .theme-examples main section {
        padding: 1.2rem;
        border-radius: 22px;
    }
    .dropdown ul, .dropdown-submenu ul {
        position: static;
        display: none;
    }
    .dropdown:hover ul, .dropdown-submenu:hover ul {
        display: block;
    }
}
