/* Layout: prevent page scroll; app manages its own scrolling areas */
html, body { height: 100%; overflow: hidden; }
body { margin: 0; }

/* Theme Variables */
:root {
    --theme-primary: #6750a4;
    --theme-on-primary: #ffffff;
    --theme-primary-container: #eaddff;
    --theme-on-primary-container: #21005d;
    --theme-surface: #fffbfe;
    --theme-on-surface: #1c1b1f;
    --theme-surface-variant: #e7e0ec;
    --theme-on-surface-variant: #49454f;
    --theme-surface-container-highest: #e6e1e5;
    --theme-outline-variant: #cac4d0;
    --theme-surface-container: #f3edf7;
}

[data-theme="dark"] {
    --theme-primary: #d0bcff;
    --theme-on-primary: #381e72;
    --theme-primary-container: #4f378b;
    --theme-on-primary-container: #eaddff;
    --theme-surface: #141218;
    --theme-on-surface: #e6e1e5;
    --theme-surface-variant: #49454f;
    --theme-on-surface-variant: #cac4d0;
    --theme-surface-container-highest: #2b2930;
    --theme-outline-variant: #49454f;
    --theme-surface-container: #211f26;
}

[data-theme="light-blue"] {
    --theme-primary: #005ac1;
    --theme-on-primary: #ffffff;
    --theme-primary-container: #d8e2ff;
    --theme-on-primary-container: #001a41;
    --theme-surface: #f8f9ff;
    --theme-on-surface: #191c20;
    --theme-surface-variant: #dde3ea;
    --theme-on-surface-variant: #41474d;
    --theme-surface-container-highest: #d8dde4;
    --theme-outline-variant: #c1c7ce;
    --theme-surface-container: #eef2f9;
}

/* Apply theme colors */
body {
    background-color: var(--theme-surface-container-highest);
    color: var(--theme-on-surface);
}

.surface-variant {
    background-color: var(--theme-surface-variant) !important;
    color: var(--theme-on-surface-variant) !important;
}

.primary-container {
    background-color: var(--theme-primary-container) !important;
    color: var(--theme-on-primary-container) !important;
}

.surface-container-highest {
    background-color: var(--theme-surface) !important;
    color: var(--theme-on-surface) !important;
}

.button.primary {
    background-color: var(--theme-primary) !important;
    color: var(--theme-on-primary) !important;
}

/* Subtle optical centering for app bar */
header.fixed nav i.material-symbols-outlined { line-height: 1; }

/* Header with background image */
.header-background-section {
    background-image: url('/header.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: #ffffff;
    width: 100%;
    padding: 40px 0 28px 0;
    text-align: center;
    white-space: pre-line;
    margin-top: 4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.header-background-title {
    color: #ffffff;
    font-size: 2rem;
    font-weight: 500;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    margin: 0;
    padding: 0;
    text-align: center;
}

/* Main content layout */
.main-content {
    max-width: 1200px;
    width: 90%;
    margin: 2rem auto 2.5rem auto;
    padding: 1.5rem;
    position: relative;
}

@media (max-width: 1440px) {
    .main-content {
        width: 85%;
    }
}

@media (max-width: 1024px) {
    .main-content {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .main-content {
        width: 95%;
        padding: 1rem;
        margin-top: 4rem;
    }
}

@media (max-width: 480px) {
    .main-content {
        width: 100%;
        padding: 0.75rem;
    }
}

/* Center content styling */
.center-align {
    text-align: center;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.center-align i {
    color: var(--theme-on-surface-variant);
    margin-bottom: 1rem;
}

/* Bottom status bar */
footer.fixed.bottom {
    height: auto !important;
    min-height: 2.5rem !important;
}

footer.fixed.bottom > div {
    padding: 0.4rem 0.5rem !important;
    line-height: 1.2 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 100% !important;
}

/* Price display styling */
.course-card p {
    color: var(--theme-on-surface-variant);
    margin: 0.5rem 0;
    line-height: 1.5;
}

.course-card .price {
    font-weight: 500;
    color: var(--theme-primary);
    font-size: 1.1rem;
}

/* Firebase connection status styling */
.center-align .success {
    color: #4caf50;
}

.center-align .error {
    color: #f44336;
}

.progress.circle {
    margin: 1rem auto;
}

/* Course card and image styling */
.course-card {
    margin-bottom: 1.5rem;
    overflow: hidden;
}

.course-card .card-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.image-container {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.course-card-image .responsive-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    background-color: #f5f5f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #9e9e9e;
}

.placeholder-image .material-symbols-outlined {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.image-loading {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #fafafa;
}

.image-loading .progress.circle.small {
    width: 2rem;
    height: 2rem;
}

.course-card .card-content {
    padding: 1rem;
}

.course-card .price {
    font-weight: 500;
    color: var(--primary);
    margin-top: 0.5rem;
}

@media (max-width: 1440px) {
}
