:root {
    --bg: #111;
    --fg: #fff;
    --accent: #4da3ff;
}

body.light {
    --bg: #f5f5f5;
    --fg: #111;
    --accent: #0066cc;
}

* {
    user-select: none;
    -webkit-user-select: none;
}

html,
body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: "Inter", Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    overflow: hidden;
    transition: background 0.4s, color 0.4s;
}

/* Top-right button cluster */
.top-buttons {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 30;
}

.top-buttons button {
    background: var(--accent);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.3s;
}

.wrapper {
    text-align: center;
    width: 100%;
    max-width: 600px;
    position: relative;

    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
}

h1 {
    margin: 0 0 30px 0;
    font-size: 2rem;
    letter-spacing: 1px;
    opacity: 1;
    transition: opacity 0.4s ease;

    min-height: 2.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slide-container {
    display: flex;
    width: 100%;
    transition: transform 0.45s cubic-bezier(.25, .8, .25, 1);

    min-height: 160px;
}

.slide {
    min-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

.container {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 80px;
}

.value {
    font-size: 3rem;
    font-weight: bold;
    color: var(--accent);
    transition: transform 0.2s;
}

.value.animate {
    transform: scale(1.15);
}

.label {
    margin-top: 5px;
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Navigation arrows */
.nav-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.5rem;
    color: var(--fg);
    cursor: pointer;
    padding: 10px;
    user-select: none;
    opacity: 0.4;
    transition: opacity 0.3s;
    z-index: 20;
}

.nav-btn:hover {
    opacity: 1;
}

#prevBtn {
    left: 20px;
}

#nextBtn {
    right: 20px;
}

/* Pagination dots */
.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 25px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--fg);
    opacity: 0.3;
    transition: opacity 0.3s, transform 0.3s;
    cursor: pointer;
}

.dot.active {
    opacity: 1;
    transform: scale(1.3);
}

/* Swipe hint always centered at bottom */
.swipe-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.5;
    font-size: 0.9rem;
    text-align: center;
    width: max-content;
}

/* Toast */
#toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: white;
    padding: 10px 18px;
    border-radius: 8px;
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
    font-weight: bold;
}

#toast.show {
    opacity: 1;
}

/* Mobile stacked layout */
@media (max-width: 600px) {
    .container {
        flex-direction: column;
        gap: 15px;
    }

    .value {
        font-size: 2.5rem;
    }

    .nav-btn {
        font-size: 2rem;
        padding: 8px;
    }
}
