/* 369 Tesla Learn — Android / mobile app shell (soft pastel light) */
:root {
    --app-primary: #5c6bc0;
    --app-primary-container: #3949ab;
    --app-primary-soft: #e8eaf6;
    --app-surface: #f8faff;
    --app-surface-2: #ffffff;
    --app-surface-3: #f1f4fb;
    --app-on-surface: #1e293b;
    --app-on-surface-muted: #64748b;
    --app-outline: rgba(30, 41, 59, 0.08);
    --app-shadow: 0 4px 14px rgba(30, 41, 59, 0.06);
    --app-mint: #e8f5e9;
    --app-mint-text: #2e7d32;
    --app-sky: #e3f2fd;
    --app-sky-text: #1565c0;
    --app-peach: #fff3e0;
    --app-peach-text: #ef6c00;
    --app-lavender: #ede7f6;
    --app-lavender-text: #5e35b1;
    --app-pink: #fce4ec;
    --app-pink-text: #c2185b;
    --app-topbar-h: 56px;
    --app-bottomnav-h: 64px;
    --app-radius: 18px;
    --app-radius-sm: 14px;
}

body.app-shell {
    /* Soft pastel light theme — overrides style.css dark vars */
    --primary-color: #5c6bc0;
    --secondary-color: #7e57c2;
    --accent-color: #42a5f5;
    --background-dark: #f8faff;
    --background-primary: #f8faff;
    --background-secondary: #eef2ff;
    --background-card: #ffffff;
    --background-light: #f1f4fb;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-color: rgba(30, 41, 59, 0.1);
    --success-color: #43a047;
    --error-color: #e53935;
    --warning-color: #fb8c00;

    background: var(--app-surface);
    color: var(--app-on-surface);
    padding-top: calc(var(--app-topbar-h) + env(safe-area-inset-top, 0px));
    padding-bottom: calc(var(--app-bottomnav-h) + env(safe-area-inset-bottom, 0px));
    min-height: 100vh;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

body.app-shell--player {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body.app-shell--player .app-bottom-nav {
    display: none;
}

body.app-shell--auth {
    padding-top: 0;
    padding-bottom: 0;
}

body.app-shell .navbar {
    display: none !important;
}

/* Top app bar */
.app-topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(var(--app-topbar-h) + env(safe-area-inset-top, 0px));
    padding-top: env(safe-area-inset-top, 0px);
    background: rgba(248, 250, 255, 0.94);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--app-outline);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 8px;
    padding-right: 12px;
}

.app-topbar__left,
.app-topbar__right {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 48px;
}

.app-topbar__title {
    flex: 1;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 8px;
}

.app-icon-btn {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 22px;
    background: var(--app-sky);
    color: var(--app-sky-text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.1rem;
    cursor: pointer;
}

.app-icon-btn:active {
    background: var(--app-primary-soft);
}

/* Bottom navigation */
.app-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: calc(var(--app-bottomnav-h) + env(safe-area-inset-bottom, 0px));
    padding-bottom: env(safe-area-inset-bottom, 0px);
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--app-outline);
    box-shadow: 0 -4px 16px rgba(30, 41, 59, 0.04);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    z-index: 1100;
}

.app-bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--app-on-surface-muted);
    font-size: 0.68rem;
    font-weight: 600;
    min-height: var(--app-bottomnav-h);
    position: relative;
}

.app-bottom-nav a i {
    font-size: 1.15rem;
}

.app-bottom-nav a.active {
    color: var(--app-primary);
}

.app-bottom-nav a.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 25%;
    right: 25%;
    height: 3px;
    border-radius: 0 0 3px 3px;
    background: var(--app-primary);
}

/* Page shell */
.app-page {
    padding: 16px;
    max-width: 720px;
    margin: 0 auto;
}

.app-page--wide {
    max-width: 100%;
}

.app-greeting {
    margin-bottom: 20px;
}

.app-greeting h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 6px;
    line-height: 1.2;
}

.app-greeting p {
    color: var(--app-on-surface-muted);
    font-size: 0.95rem;
}

/* Stats row */
.app-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.app-stat-chip {
    background: var(--app-surface-2);
    border: none;
    border-radius: var(--app-radius-sm);
    padding: 16px 14px;
    text-align: left;
    box-shadow: var(--app-shadow);
}

.app-stat-chip:nth-child(4n + 1) { background: var(--app-mint); }
.app-stat-chip:nth-child(4n + 1) strong { color: var(--app-mint-text); }
.app-stat-chip:nth-child(4n + 2) { background: var(--app-sky); }
.app-stat-chip:nth-child(4n + 2) strong { color: var(--app-sky-text); }
.app-stat-chip:nth-child(4n + 3) { background: var(--app-peach); }
.app-stat-chip:nth-child(4n + 3) strong { color: var(--app-peach-text); }
.app-stat-chip:nth-child(4n + 4) { background: var(--app-lavender); }
.app-stat-chip:nth-child(4n + 4) strong { color: var(--app-lavender-text); }

.app-stat-chip strong {
    display: block;
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--app-primary);
    line-height: 1.1;
}

.app-stat-chip span {
    font-size: 0.72rem;
    color: var(--app-on-surface-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 700;
}

/* Section */
.app-section {
    margin-bottom: 24px;
}

.app-section__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.app-section__head h2 {
    font-size: 1.05rem;
    font-weight: 700;
}

.app-section__head a {
    color: var(--app-primary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Quick actions */
.app-action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.app-action-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 16px;
    border-radius: var(--app-radius);
    text-decoration: none;
    color: var(--app-on-surface);
    min-height: 96px;
    border: none;
    background: var(--app-surface-2);
    box-shadow: var(--app-shadow);
}

.app-action-card:nth-child(4n + 1) { background: var(--app-sky); }
.app-action-card:nth-child(4n + 1) i { background: #fff; color: var(--app-sky-text); }
.app-action-card:nth-child(4n + 2) { background: var(--app-pink); }
.app-action-card:nth-child(4n + 2) i { background: #fff; color: var(--app-pink-text); }
.app-action-card:nth-child(4n + 3) { background: var(--app-mint); }
.app-action-card:nth-child(4n + 3) i { background: #fff; color: var(--app-mint-text); }
.app-action-card:nth-child(4n + 4) { background: var(--app-peach); }
.app-action-card:nth-child(4n + 4) i { background: #fff; color: var(--app-peach-text); }

.app-action-card i {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--app-primary-soft);
    color: var(--app-primary);
    font-size: 1.1rem;
}

.app-action-card strong {
    font-size: 0.95rem;
}

.app-action-card span {
    font-size: 0.78rem;
    color: var(--app-on-surface-muted);
}

/* Video / course cards */
.app-video-grid,
body.app-shell .courses-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
}

body.app-shell .course-card,
.app-video-card {
    background: var(--app-surface-2);
    border: none;
    border-radius: var(--app-radius-sm);
    overflow: hidden;
    box-shadow: var(--app-shadow) !important;
}

body.app-shell .course-thumbnail {
    aspect-ratio: 16 / 10;
    border-radius: 0;
}

body.app-shell .course-content {
    padding: 10px !important;
}

body.app-shell .course-title {
    font-size: 0.85rem !important;
    line-height: 1.35 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.app-shell .course-meta {
    font-size: 0.72rem !important;
}

/* Search */
body.app-shell .search-container,
body.app-shell .courses-page,
body.app-shell .dashboard,
body.app-shell .playlists-page {
    padding: 0 !important;
    min-height: auto !important;
    background: transparent !important;
}

body.app-shell .search-container > .container,
body.app-shell .courses-page > .container,
body.app-shell .dashboard > .container,
body.app-shell .playlists-page > .container {
    max-width: 100% !important;
    padding: 16px !important;
}

body.app-shell .search-header,
body.app-shell .courses-header,
body.app-shell .dashboard-header,
body.app-shell .playlists-header {
    text-align: left !important;
    padding: 0 !important;
    margin-bottom: 16px !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

body.app-shell .search-header h1,
body.app-shell .courses-header h1,
body.app-shell .dashboard-header h1,
body.app-shell .playlists-header h1 {
    font-size: 1.4rem !important;
    margin-bottom: 6px !important;
    background: none !important;
    -webkit-text-fill-color: var(--app-on-surface) !important;
    color: var(--app-on-surface) !important;
}

body.app-shell .search-header p,
body.app-shell .courses-header p,
body.app-shell .dashboard-header p,
body.app-shell .playlists-header p {
    font-size: 0.9rem !important;
}

body.app-shell .search-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 16px;
}

body.app-shell .search-input {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 16px !important;
    min-height: 48px;
    border-radius: var(--app-radius-sm) !important;
    background: var(--app-surface-2) !important;
    border: 1px solid var(--app-outline) !important;
}

body.app-shell .search-button,
body.app-shell .btn-filter {
    min-height: 48px;
    border-radius: var(--app-radius-sm) !important;
    width: 100%;
}

body.app-shell .filters-section {
    padding: 0 !important;
    border-radius: var(--app-radius) !important;
    margin-bottom: 16px !important;
    background: var(--app-surface-2) !important;
    border: 1px solid var(--app-outline) !important;
    overflow: hidden;
}

body.app-shell .filters-section summary {
    list-style: none;
    cursor: pointer;
}

body.app-shell .filters-section summary::-webkit-details-marker {
    display: none;
}

body.app-shell .filters-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 10px !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    color: var(--app-on-surface) !important;
    background: transparent !important;
}

body.app-shell .filters-header span {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

body.app-shell .filters-header i.fa-filter {
    color: var(--app-primary) !important;
    font-size: 1rem !important;
}

body.app-shell .filters-chevron {
    color: var(--app-on-surface-muted);
    font-size: 0.85rem;
    transition: transform 0.2s ease;
}

body.app-shell .filters-section[open] .filters-chevron {
    transform: rotate(180deg);
}

body.app-shell .filters-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    padding: 0 16px 16px !important;
}

body.app-shell .filters-fields {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

body.app-shell .filter-group {
    width: 100% !important;
}

body.app-shell .filter-label {
    font-size: 0.78rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin-bottom: 6px !important;
    color: var(--app-on-surface-muted) !important;
    font-weight: 600 !important;
}

body.app-shell .filter-select {
    width: 100% !important;
    font-size: 16px !important;
    min-height: 48px;
    padding: 12px 14px !important;
    border-radius: var(--app-radius-sm) !important;
    background: var(--app-surface-3) !important;
    border: 1px solid var(--app-outline) !important;
    color: var(--app-on-surface) !important;
}

body.app-shell .filter-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    width: 100% !important;
}

body.app-shell .btn-filter {
    min-height: 44px !important;
    padding: 10px 14px !important;
    font-size: 0.88rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    width: 100% !important;
    margin: 0 !important;
}

body.app-shell .btn-filter:hover {
    transform: none !important;
}

/* Subject list cards — Material-style rows */
body.app-shell .subjects-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

body.app-shell .subject-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    text-align: left !important;
    padding: 16px !important;
    border-radius: var(--app-radius-sm) !important;
    background: var(--app-surface-2) !important;
    border: none !important;
    box-shadow: var(--app-shadow) !important;
}

body.app-shell .subject-card::before {
    display: none !important;
}

body.app-shell .subject-card > i {
    flex-shrink: 0;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--app-primary-soft) !important;
    -webkit-text-fill-color: var(--app-primary) !important;
    color: var(--app-primary) !important;
}

body.app-shell .subject-card-body {
    flex: 1;
    min-width: 0;
}

body.app-shell .subject-card h3 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
    font-weight: 700 !important;
}

body.app-shell .subject-card p {
    font-size: 0.82rem !important;
    margin-bottom: 10px !important;
    line-height: 1.45 !important;
    color: var(--app-on-surface-muted) !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.app-shell .subject-stats {
    display: flex !important;
    gap: 8px !important;
    flex-wrap: wrap !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-size: 0.75rem !important;
    font-weight: 600 !important;
}

body.app-shell .subject-stats span {
    background: var(--app-primary-soft);
    color: var(--app-primary) !important;
    padding: 4px 10px;
    border-radius: 999px;
}

/* Course video cards on mobile */
body.app-shell .course-card {
    transform: none !important;
}

body.app-shell .course-card:hover {
    transform: none !important;
    box-shadow: var(--app-shadow) !important;
}

body.app-shell .course-info {
    padding: 12px !important;
}

body.app-shell .course-instructor,
body.app-shell .course-subject {
    display: none !important;
}

body.app-shell .course-meta {
    margin-bottom: 10px !important;
    gap: 6px;
    flex-wrap: wrap;
}

body.app-shell .btn-watch {
    width: 100%;
    justify-content: center;
    min-height: 40px;
    padding: 10px !important;
    font-size: 0.82rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.app-shell .courses-header::before,
body.app-shell .dashboard-header::before,
body.app-shell .search-header::before,
body.app-shell .playlists-header::before {
    display: none !important;
}

body.app-shell .results-header {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 8px;
    margin-bottom: 16px !important;
    padding-bottom: 12px !important;
    border-bottom: 1px solid var(--app-outline) !important;
}

body.app-shell .results-header h3 {
    font-size: 1.1rem !important;
    background: none !important;
    -webkit-text-fill-color: var(--app-on-surface) !important;
}

body.app-shell .results-count {
    font-size: 0.78rem !important;
    padding: 6px 12px !important;
    text-transform: none !important;
}

/* Dashboard polish */
body.app-shell .dashboard-header h1 {
    font-size: 1.35rem !important;
}

body.app-shell .stat-label {
    font-size: 0.72rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

body.app-shell .quick-actions h2,
body.app-shell .section-title {
    font-size: 1rem !important;
    text-align: left !important;
}

body.app-shell .action-btn {
    text-transform: none !important;
    letter-spacing: 0 !important;
    justify-content: flex-start !important;
}

body.app-shell .feature-card,
body.app-shell .subject-card:active,
body.app-shell .course-card:active {
    opacity: 0.92;
}

/* Dashboard subject/feature cards */
body.app-shell .feature-card {
    display: flex !important;
    align-items: flex-start !important;
    gap: 14px !important;
    text-align: left !important;
    padding: 16px !important;
    border-radius: var(--app-radius-sm) !important;
    background: var(--app-surface-2) !important;
    border: none !important;
    box-shadow: var(--app-shadow) !important;
}

body.app-shell .feature-card::before {
    display: none !important;
}

body.app-shell .feature-card > i {
    flex-shrink: 0;
    width: 48px !important;
    height: 48px !important;
    margin: 0 !important;
    font-size: 1.25rem !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--app-primary-soft) !important;
}

body.app-shell .feature-card h3 {
    font-size: 1rem !important;
    margin-bottom: 4px !important;
}

body.app-shell .feature-card p {
    font-size: 0.82rem !important;
    margin-bottom: 8px !important;
    -webkit-line-clamp: 2;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.app-shell .feature-card .video-count {
    font-size: 0.75rem !important;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--app-primary-soft);
    color: var(--app-primary) !important;
    display: inline-block;
}

body.app-shell .subjects-grid,
body.app-shell .features-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

/* Playlists */
body.app-shell .playlists-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

body.app-shell .playlist-card {
    border-radius: var(--app-radius-sm) !important;
    padding: 16px !important;
    background: var(--app-surface-2) !important;
    border: 1px solid var(--app-outline) !important;
    box-shadow: none !important;
    text-align: left !important;
}

body.app-shell .playlist-card::before {
    display: none !important;
}

body.app-shell .playlist-card:hover {
    transform: none !important;
}

/* Empty states */
body.app-shell .empty-state {
    padding: 40px 16px !important;
}

body.app-shell .empty-state i {
    font-size: 3rem !important;
}

/* Remove heavy page backgrounds in app */
body.app-shell .courses-page::before,
body.app-shell .dashboard::before {
    display: none !important;
}


body.app-shell .dashboard-stats {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    margin-bottom: 20px !important;
}

body.app-shell .stat-card {
    padding: 16px 12px !important;
    border-radius: var(--app-radius-sm) !important;
}

body.app-shell .stat-number {
    font-size: 1.6rem !important;
}

body.app-shell .quick-actions,
body.app-shell .subjects-section,
body.app-shell .recent-section,
body.app-shell .recommended-section {
    padding: 16px !important;
    border-radius: var(--app-radius) !important;
    margin-bottom: 16px !important;
}

body.app-shell .quick-actions-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

body.app-shell .action-btn {
    min-height: 52px;
    padding: 14px 16px !important;
    font-size: 0.95rem !important;
}

body.app-shell .subjects-grid {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

/* Watch page */
body.app-shell--player .video-layout {
    display: block !important;
    max-width: 100% !important;
    padding: 0 !important;
}

body.app-shell--player .video-sidebar {
    margin-top: 16px;
}

body.app-shell--player .video-layout {
    padding: 0 16px 16px !important;
}

body.app-shell--player .video-player-wrapper {
    border-radius: 0 !important;
    margin: 0 -16px;
    width: calc(100% + 32px);
}

body.app-shell--player .video-info {
    padding: 16px 0 !important;
}

body.app-shell--player .related-videos {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

/* Auth pages */
.app-auth-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px 20px;
    background: linear-gradient(180deg, #eef2ff 0%, #f8faff 55%, #ffffff 100%);
}

.app-auth-brand {
    text-align: center;
    margin-bottom: 28px;
}

.app-auth-brand i {
    font-size: 3rem;
    color: var(--app-primary);
    margin-bottom: 12px;
}

.app-auth-brand h1 {
    font-size: 1.5rem;
    font-weight: 800;
}

.app-auth-brand p {
    color: var(--app-on-surface-muted);
    margin-top: 6px;
}

.app-auth-card {
    background: var(--app-surface-2);
    border: none;
    border-radius: var(--app-radius);
    padding: 20px;
    box-shadow: var(--app-shadow);
}

.app-auth-card .form-input {
    font-size: 16px !important;
    min-height: 48px;
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-3);
    border: 1px solid var(--app-outline);
}

.app-auth-card .form-button {
    min-height: 52px;
    border-radius: var(--app-radius-sm);
    font-size: 1rem;
    font-weight: 700;
    width: 100%;
    margin-top: 8px;
}

/* Landing */
body.app-shell-landing .landing-page {
    min-height: 100vh;
    padding: 24px 16px;
}

body.app-shell-landing .landing-content {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    padding: 28px 20px !important;
}

body.app-shell-landing .platform-title {
    font-size: 1.8rem !important;
}

body.app-shell-landing .logo-icon {
    font-size: 3rem !important;
}

/* Hide loading overlay faster on app */
body.app-shell #loadingOverlay {
    background: linear-gradient(180deg, #eef2ff 0%, #f8faff 100%) !important;
}

body.app-shell .loading-spinner {
    border-color: rgba(92, 107, 192, 0.15) !important;
    border-left-color: var(--app-primary) !important;
}

/* Soft dashboard cards under app shell */
body.app-shell .dashboard-header,
body.app-shell .stat-card,
body.app-shell .feature-card,
body.app-shell .subject-card,
body.app-shell .recent-activity,
body.app-shell .quick-actions {
    background: var(--app-surface-2) !important;
    border: none !important;
    box-shadow: var(--app-shadow) !important;
    backdrop-filter: none !important;
}

body.app-shell .dashboard-header h1,
body.app-shell .stat-number,
body.app-shell .section-title,
body.app-shell .feature-card h3 {
    background: none !important;
    -webkit-text-fill-color: var(--app-on-surface) !important;
    color: var(--app-on-surface) !important;
}

body.app-shell .stat-number {
    color: var(--app-primary) !important;
}

body.app-shell .action-btn {
    background: var(--app-primary) !important;
    color: #fff !important;
    border: none !important;
    border-radius: 999px !important;
    box-shadow: none !important;
}

body.app-shell .action-btn.secondary {
    background: var(--app-primary-soft) !important;
    color: var(--app-primary) !important;
}

/* Force light theme over leftover dark inline styles */
body.app-shell,
body.app-shell .dashboard,
body.app-shell .courses-page,
body.app-shell .search-container,
body.app-shell .playlists-page {
    background: var(--app-surface) !important;
    color: var(--app-on-surface) !important;
}

body.app-shell h1,
body.app-shell h2,
body.app-shell h3,
body.app-shell .course-title,
body.app-shell .section-header h3 {
    color: var(--app-on-surface) !important;
    -webkit-text-fill-color: var(--app-on-surface) !important;
    background: none !important;
}

body.app-shell p,
body.app-shell .course-meta,
body.app-shell .stat-label {
    color: var(--app-on-surface-muted) !important;
}

body.app-shell .stat-card,
body.app-shell .course-card,
body.app-shell .feature-card,
body.app-shell .subject-card,
body.app-shell .quick-actions,
body.app-shell .filters-section,
body.app-shell .playlist-card {
    background: var(--app-surface-2) !important;
    border-color: transparent !important;
    box-shadow: var(--app-shadow) !important;
}

body.app-shell .btn-primary,
body.app-shell .btn-watch,
body.app-shell .search-button,
body.app-shell .form-button,
body.app-shell .action-btn.primary {
    background: var(--app-primary) !important;
    color: #fff !important;
    border: none !important;
}

@media (min-width: 901px) {
    body.app-shell .app-bottom-nav {
        max-width: 480px;
        left: 50%;
        transform: translateX(-50%);
        border-radius: 20px 20px 0 0;
    }

    body.app-shell .app-topbar {
        max-width: 480px;
        left: 50%;
        right: auto;
        width: 100%;
        transform: translateX(-50%);
    }
}
