:root {
    --bg-color: #121212;
    --text-color: #ffffff;
    --accent-color: #1ed760;
    /* Spotify Green-ish */
    --secondary-accent: #bb86fc;
    --soda-color: #ff6b6b;
    --beer-color: #feca57;
    --font-family: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-family);
    overflow: hidden;
    /* Prevent scrolling, story mode */
    height: 100dvh;
    width: 100vw;
    display: flex;
    justify-content: center;
    align-items: center;
}

#app {
    width: 100%;
    height: 100%;
    max-width: 480px;
    /* Mobile width on desktop */
    position: relative;
    background: linear-gradient(180deg, #1e1e1e 0%, #121212 100%);
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

/* Progress Bar */
.progress-container {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    display: flex;
    gap: 5px;
    z-index: 100;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #fff;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-fill.active {
    width: 100%;
    transition: width 0.1s linear !important;
}

.progress-fill.animating {
    transition: width 5s linear;
    /* Default slide duration */
    width: 100%;
}

/* Slides */
.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px 20px 80px 20px;
    text-align: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.slide.active {
    opacity: 1;
    pointer-events: auto;
}

/* Typography */
h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    font-weight: 800;
    line-height: 1.2;
}

h2 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    color: var(--accent-color);
}

p {
    font-size: 1.2rem;
    line-height: 1.5;
    margin-bottom: 20px;
    opacity: 0.9;
}

.big-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-color);
    display: block;
    margin: 20px 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.highlight {
    color: var(--secondary-accent);
    font-weight: bold;
}

/* Lists */
.ranking-list {
    list-style: none;
    width: 100%;
    text-align: left;
    margin-top: 20px;
}

.ranking-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.ranking-item.me {
    background: var(--accent-color);
    color: #000;
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(30, 215, 96, 0.4);
}

.rank-num {
    margin-right: 10px;
    opacity: 0.7;
}

.scrollable-list-container {
    width: 100%;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 10px;
    /* Custom Scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.5) transparent;
}

/* Controls */
.controls {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    z-index: 50;
}

.control-left,
.control-right {
    flex: 1;
    height: 100%;
    cursor: pointer;
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

.animate-pop {
    animation: popIn 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes slideUp {
    0% {
        transform: translateY(50px);
        opacity: 0;
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

.animate-up {
    animation: slideUp 0.8s ease forwards;
}

/* Specific Slide Styles */
.slide-intro {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.slide-soda {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%);
    color: #333333;
}

.slide-soda-2 {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    color: #333333;
}

.slide-soda-2 h2,
.slide-soda-2 .big-number {
    color: #d35400;
}

.slide-soda-3 {
    background: linear-gradient(135deg, #a18cd1 0%, #fbc2eb 100%);
    color: #333333;
}

.slide-soda-3 h2,
.slide-soda-3 .big-number {
    color: #8e44ad;
}

.slide-soda h2,
.slide-soda .big-number {
    color: #d63031;
}

.slide-sugar {
    background: #000;
}

.slide-beer {
    background: linear-gradient(135deg, #d35400 0%, #e67e22 100%);
    color: #ffffff;
}

.slide-beer h2,
.slide-beer .big-number {
    color: #f1c40f;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.slide-beer .highlight {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-festival {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #ffffff;
    justify-content: flex-start;
    /* Align top to avoid bottom cut-off */
    overflow-y: auto;
    /* Allow scrolling if content is too long */
}

.slide-summary {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
    color: #ffffff;
}

/* Images */
.slide-img {
    max-width: 80%;
    max-height: 40vh;
    border-radius: 15px;
    margin: 20px 0;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
    object-fit: cover;
}

.slide-img.logo {
    max-width: 50%;
    max-height: 20vh;
    box-shadow: none;
    border-radius: 0;
}

.slide-img.group {
    width: 90%;
    height: auto;
    border: 3px solid rgba(255, 255, 255, 0.5);
}

/* Summary Slide Styles */
.summary-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 10px;
    box-sizing: border-box;
}

.summary-title {
    font-size: 1.8rem;
    margin-bottom: 10px;
    text-align: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    flex: 1;
}

.summary-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.summary-card {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 10px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.summary-card h3 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 3px;
}

.summary-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 5px;
}

.summary-stat .big-number {
    font-size: 2rem;
    line-height: 1;
    margin: 3px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.summary-stat .sub-text {
    font-size: 0.8rem;
    opacity: 0.8;
}

.rank-badge {
    background: #fff;
    color: #333;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: bold;
    font-size: 0.9rem;
    margin-top: 4px;
    display: inline-block;
}

.summary-ranking-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.summary-ranking-item {
    display: flex;
    justify-content: space-between;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.summary-ranking-item:last-child {
    border-bottom: none;
}

.summary-footer {
    margin-top: auto;
    text-align: center;
    font-size: 1.1rem;
    padding-top: 10px;
    font-weight: bold;
}