/* Day / night - html[data-ama-theme="day"|"night"] set by js/ama-theme-mode.js */

html[data-ama-theme="day"] {
 color-scheme: light;
 background: #eef2f8;
}

html[data-ama-theme="day"] body {
 color: #1a2d4a;
}

html[data-ama-theme="day"] .bg-mesh {
 opacity: 0.28;
 background:
 linear-gradient(180deg, #f7d77a 0%, #e8c547 3px, #c5d4ea 3px, #c5d4ea 6px, transparent 6px),
 radial-gradient(ellipse 110% 70% at 50% 0%, rgba(255, 255, 255, 0.55) 0%, transparent 52%),
 linear-gradient(165deg, #dce6f4 0%, #cfddef 38%, #c2d4eb 62%, #dae4f2 100%);
}

html[data-ama-theme="day"] .wrap,
html[data-ama-theme="day"] .wrap--light,
html[data-ama-theme="day"] .foundation-campus--premium,
html[data-ama-theme="day"] .ama-pre-studio {
 background: #ffffff !important;
 color: #1a2d4a;
}

/* Course campuses stay on navy shell - no white slab (Day mode) */
html[data-ama-theme="day"] body.ama-pre-surface .foundation-campus--premium,
html[data-ama-theme="day"] body.ama-pre-surface .ama-pre-studio,
html[data-ama-theme="day"] body.ama-ielts-campus .foundation-campus--premium {
 background: transparent !important;
 color: #dde6f2 !important;
 box-shadow: none !important;
 border-radius: 0 !important;
 margin-top: 0 !important;
}

html[data-ama-theme="day"] .foundation-campus-hero {
 background:
 radial-gradient(600px 280px at 90% 0%, rgba(247, 215, 122, 0.35), transparent 55%),
 linear-gradient(135deg, #1e4a8c 0%, #2a5fad 50%, #1a4080 100%);
}

html[data-ama-theme="day"] .ama-pre-tile,
html[data-ama-theme="day"] .ama-campus-tiles .ama-pre-tile {
 background: #f8fafd;
 color: #0f2044;
 border-color: rgba(11, 23, 51, 0.1);
}

html[data-ama-theme="day"] body.ama-pre-surface .ama-pre-tile,
html[data-ama-theme="day"] body.ama-ielts-campus .ama-campus-tiles .ama-pre-tile {
 background: rgba(255, 255, 255, 0.05) !important;
 color: #eef2fa !important;
 border-color: rgba(214, 179, 106, 0.28) !important;
}

html[data-ama-theme="day"] .site-foot--teen,
html[data-ama-theme="day"] .site-foot {
 color: #3d4f68;
}

html[data-ama-theme="night"] {
 color-scheme: dark;
}

html[data-ama-theme="night"] .bg-mesh {
 opacity: 1;
}

.ama-theme-toggle {
 display: inline-flex;
 align-items: center;
 gap: 6px;
 padding: 8px 12px;
 border-radius: 999px;
 border: 1px solid rgba(255, 255, 255, 0.35);
 background: rgba(0, 35, 102, 0.55);
 color: #f7f0d4;
 font: 700 0.72rem system-ui, sans-serif;
 cursor: pointer;
}

.ama-theme-toggle i {
 font-size: 0.95rem;
 color: #f7d77a;
}

.ama-theme-toggle:hover {
 background: rgba(0, 48, 120, 0.75);
}

.ama-home-hero__icon.ama-theme-toggle {
 width: auto;
 min-width: 36px;
 height: 36px;
 padding: 0 10px;
 border-radius: 999px;
}

.ama-home-hero__icon.ama-theme-toggle .ama-theme-toggle__label {
 font-size: 0.62rem;
 letter-spacing: 0.06em;
 text-transform: uppercase;
}

@media (max-width: 420px) {
 .topbar-actions .ama-theme-toggle__label {
 display: none;
 }
 .ama-home-hero__icon.ama-theme-toggle .ama-theme-toggle__label {
 display: none;
 }
}

/* ========== Night mode (phone-style dark UI) ========== */
html[data-ama-theme="night"],
html[data-ama-theme="night"] body {
 background: #070d1a !important;
 color: #e8edf7;
}

html[data-ama-theme="night"] .bg-mesh {
 opacity: 0.35;
 background: linear-gradient(180deg, #0a1224 0%, #0f1a30 100%) !important;
}

html[data-ama-theme="night"] #topbar,
html[data-ama-theme="night"] .topbar,
html[data-ama-theme="night"] .topbar--pro {
 background: #0f1a30 !important;
 border-bottom: 1px solid rgba(214, 179, 106, 0.25);
}

html[data-ama-theme="night"] .top-main-nav-wrap {
 background: #121f3a !important;
}

html[data-ama-theme="night"] .ama-nav-pill {
 background: rgba(255, 255, 255, 0.06) !important;
 color: #e8edf7 !important;
 border-color: rgba(255, 255, 255, 0.12) !important;
}

html[data-ama-theme="night"] .ama-nav-pill.active {
 background: linear-gradient(135deg, #1a3566, #243f6e) !important;
 color: #f4d78a !important;
}

html[data-ama-theme="night"] #app-main,
html[data-ama-theme="night"] .wrap,
html[data-ama-theme="night"] .ama-pre-studio,
html[data-ama-theme="night"] .foundation-campus--premium,
html[data-ama-theme="night"] .ama-home-body,
html[data-ama-theme="night"] .hw-wrap-clean {
 background: #0a1224 !important;
 color: #e8edf7;
}

html[data-ama-theme="night"] .ama-pre-tile,
html[data-ama-theme="night"] .ama-home-course,
html[data-ama-theme="night"] .ama-home-intro .ama-home-values li {
 background: #151f38 !important;
 color: #e8edf7 !important;
 border-color: rgba(214, 179, 106, 0.2) !important;
}

html[data-ama-theme="night"] .ama-home-intro .ama-home-headline {
 color: #f4f7fc;
}

html[data-ama-theme="night"] .ama-home-search-stage {
 background: linear-gradient(155deg, #121f3a 0%, #1a3566 100%) !important;
 box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

html[data-ama-theme="night"] .ielts-wrap,
html[data-ama-theme="night"] .ielts-body,
html[data-ama-theme="night"] .ielts-panel,
html[data-ama-theme="night"] .sbook-topic-panel,
html[data-ama-theme="night"] .sbook-topic-card,
html[data-ama-theme="night"] .sbook-part-btn:not(.is-active) {
 background: #151f38 !important;
 color: #e8edf7 !important;
 border-color: rgba(255, 255, 255, 0.1) !important;
}

html[data-ama-theme="night"] .sbook-textarea {
 background: #0f1a30;
 color: #f4f7fc;
 border-color: rgba(214, 179, 106, 0.35);
}

html[data-ama-theme="night"] .ielts-tabs {
 background: #0f1a30;
}

html[data-ama-theme="night"] .ielts-tab:not(.is-active) {
 background: #151f38 !important;
 color: #c5d4ea !important;
}

html[data-ama-theme="night"] #view-homework .sub-hero-pro--homework {
 background: linear-gradient(135deg, #0b1733, #1a3566) !important;
}

html[data-ama-theme="night"] #view-homework .hw-submit-guide--clean,
html[data-ama-theme="night"] #view-homework .hw-my-submissions {
 background: #151f38 !important;
 color: #e8edf7;
 border-color: rgba(255, 255, 255, 0.1);
}

html[data-ama-theme="night"] .site-foot,
html[data-ama-theme="night"] .site-foot--teen {
 background: #0a1224 !important;
 color: #9aa8c0 !important;
}

html[data-ama-theme="night"] #mobile-bottom-nav {
 background: #0f1a30 !important;
 border-top: 1px solid rgba(214, 179, 106, 0.2);
}

/* ========== Day mode (bright) ========== */
html[data-ama-theme="day"] body.ama-theme-day {
 background: #eef2f8 !important;
 color: #1a2d4a;
}

html[data-ama-theme="day"] #topbar,
html[data-ama-theme="day"] .topbar--pro {
 background: #ffffff !important;
 color: #0b1f4d !important;
 border-bottom: 1px solid #c5d4e8 !important;
 box-shadow: 0 1px 8px rgba(11, 31, 77, 0.06) !important;
}

html[data-ama-theme="day"] .topbar--pro .brand-program {
 color: #002366 !important;
}

html[data-ama-theme="day"] .topbar--pro .brand-teacher {
 color: #c9952a !important;
 opacity: 1 !important;
}

html[data-ama-theme="day"] .ama-home {
 background: #f4f7fc;
}

/* - - Day: readable study surfaces (white + dark text) - - */
html[data-ama-theme="day"] .view--ielts,
html[data-ama-theme="day"] .ielts-wrap,
html[data-ama-theme="day"] .ielts-body {
 background: #f6f8fd !important;
 color: #1a2d4a !important;
}

html[data-ama-theme="day"] .sbook-hero,
html[data-ama-theme="day"] .sbook-guide,
html[data-ama-theme="day"] .sbook-toolkit,
html[data-ama-theme="day"] .sbook-topic-panel,
html[data-ama-theme="day"] .sbook-topic-card,
html[data-ama-theme="day"] .sbook-lang__card,
html[data-ama-theme="day"] .sbook-convo,
html[data-ama-theme="day"] .sbook-part-btn:not(.is-active) {
 background: #ffffff !important;
 color: #1a2d4a !important;
 border-color: rgba(11, 23, 51, 0.12) !important;
}

html[data-ama-theme="day"] .sbook-root h2,
html[data-ama-theme="day"] .sbook-root h3,
html[data-ama-theme="day"] .sbook-root h4,
html[data-ama-theme="day"] .sbook-root h5,
html[data-ama-theme="day"] .sbook-strategy,
html[data-ama-theme="day"] .sbook-drill__q,
html[data-ama-theme="day"] .sbook-convo__text,
html[data-ama-theme="day"] .sbook-ideas,
html[data-ama-theme="day"] .sbook-lang__card li,
html[data-ama-theme="day"] .sbook-toolkit p,
html[data-ama-theme="day"] .sbook-guide__what,
html[data-ama-theme="day"] .sbook-guide__frame,
html[data-ama-theme="day"] .sbook-guide__aim {
 color: #1a2d4a !important;
}

html[data-ama-theme="day"] .sbook-part-btn.is-active {
 background: linear-gradient(165deg, #0b1733, #243f6e) !important;
 color: #ffffff !important;
}

html[data-ama-theme="day"] .sbook-part-btn.is-active strong,
html[data-ama-theme="day"] .sbook-part-btn.is-active span {
 color: #ffffff !important;
}

html[data-ama-theme="day"] .sbook-textarea {
 background: #ffffff !important;
 color: #0b1733 !important;
 border: 2px solid rgba(11, 23, 51, 0.22) !important;
}

html[data-ama-theme="day"] .ielts-panel {
 background: #ffffff !important;
 color: #1a2d4a !important;
}

/* - - Night: dark surfaces + light text - - */
html[data-ama-theme="night"] .sbook-hero,
html[data-ama-theme="night"] .sbook-guide,
html[data-ama-theme="night"] .sbook-toolkit {
 background: #151f38 !important;
 color: #e8edf7 !important;
 border-color: rgba(214, 179, 106, 0.35) !important;
}

html[data-ama-theme="night"] .sbook-guide h3,
html[data-ama-theme="night"] .sbook-hero h2,
html[data-ama-theme="night"] .sbook-toolkit h3,
html[data-ama-theme="night"] .sbook-root h3,
html[data-ama-theme="night"] .sbook-root h4,
html[data-ama-theme="night"] .sbook-strategy,
html[data-ama-theme="night"] .sbook-guide__what,
html[data-ama-theme="night"] .sbook-guide__frame,
html[data-ama-theme="night"] .sbook-guide__aim,
html[data-ama-theme="night"] .sbook-hero p,
html[data-ama-theme="night"] .sbook-toolkit p {
 color: #e8edf7 !important;
}

html[data-ama-theme="night"] .sbook-guide__time,
html[data-ama-theme="night"] .sbook-hero__badge {
 color: #f4d78a !important;
}

html[data-ama-theme="night"] .sbook-convo {
 background: #1a2744 !important;
 color: #e8edf7 !important;
}

html[data-ama-theme="night"] .sbook-convo h4,
html[data-ama-theme="night"] .sbook-convo__text {
 color: #f4f7fc !important;
}

html[data-ama-theme="night"] .sbook-lang__card {
 background: #1a2744 !important;
 color: #e8edf7 !important;
}

html[data-ama-theme="night"] .sbook-structure p {
 color: #c5d4ea !important;
}

html[data-ama-theme="night"] .sbook-vocab-chip {
 background: #0f1a30 !important;
 color: #f4f7fc !important;
 border-color: rgba(214, 179, 106, 0.35) !important;
}
