body {
    margin: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
    background: var(--bg);
    color: var(--fg);
    transition: background 0.3s, color 0.3s;
}

:root {
    color-scheme: light dark;
    --blue: #3a7bd5;
    --blue-dark: #283e51;
    --bg: #f7faff;
    --fg: #222;
    --bar-bg: #e3f0ff;
    --bar-fg: #222;
    --btn-bg: #e3f0ff;
    --btn-fg: #3a7bd5;
}

[data-theme="dark"] {
    --bg: #181f2a;
    --fg: #e3f0ff;
    --bar-bg: #283e51;
    --bar-fg: #e3f0ff;
    --btn-bg: #283e51;
    --btn-fg: #3a7bd5;
}

.top-bar {
    width: 100vw;
    background: var(--bar-bg);
    color: var(--bar-fg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5em 1em;
    box-sizing: border-box;
    position: sticky;
    top: 0;
    z-index: 10;
}

.top-bar .center {
    flex: 1;
    text-align: center;
}

.top-bar .right {
    display: flex;
    align-items: center;
    gap: 1em;
}

.top-bar .left {
    width: 2em;
}

#category-select {
    font-size: 1.1em;
    padding: 0.3em 1em;
    border-radius: 5px;
    border: 1px solid var(--blue);
    background: var(--btn-bg);
    color: var(--btn-fg);
}

#darkmode-toggle {
    background: none;
    border: none;
    font-size: 1.3em;
    cursor: pointer;
    color: var(--btn-fg);
}

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 70vh;
    width: 100vw;
}

.carousel {
    display: flex;
    align-items: center;
    gap: 1em;
}

.carousel-img {
    max-width: 80vw;
    max-height: 70vh;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(58, 123, 213, 0.08);
    background: var(--bar-bg);
    object-fit: contain;
}

.carousel-btn {
    background: var(--btn-bg);
    color: var(--btn-fg);
    border: none;
    border-radius: 50%;
    width: 2.5em;
    height: 2.5em;
    font-size: 1.5em;
    cursor: pointer;
    transition: background 0.2s;
}

.carousel-btn:hover {
    background: var(--blue);
    color: #fff;
}

.no-images {
    color: var(--blue);
    font-size: 1.2em;
    text-align: center;
}

@media (max-width: 600px) {
    .carousel-img {
        max-width: 98vw;
        max-height: 50vh;
    }

    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .top-bar .center {
        margin: 0.5em 0;
    }
}