:root {
    --brand-color: #ff6b00;
    --text-light: #ffffff;
    --text-dark: #2d3436;
    --overlay-gradient: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, rgba(0,0,0,0.1) 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body, html {
    width: 100%;
    height: 100dvh; /* Uses dynamic viewport height for mobile */
    overflow: hidden;
    background-color: #000;
    font-family: 'Poppins', sans-serif;
    user-select: none;
    -webkit-user-select: none;
}

#app {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.brand-header {
    position: absolute;
    top: 20px;
    left: 0;
    width: 100%;
    text-align: center;
    color: var(--text-light);
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 100;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

/* Progress Bar */
.progress-container {
    position: absolute;
    top: 8px;
    left: 0;
    width: 100%;
    padding: 0 8px;
    display: flex;
    gap: 4px;
    z-index: 100;
}

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

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

.progress-fill.completed {
    width: 100%;
    transition: none;
}

/* Story Visuals */
.story-view {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #111;
}

#story-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 6s ease-out, opacity 0.3s ease;
}

/* Ken Burns effect applied via JS class toggling */
#story-image.zoom {
    transform: scale(1);
}

/* Text Overlay */
.content-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60%;
    background: var(--overlay-gradient);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 30px 24px 60px 24px;
    pointer-events: none; /* Let taps pass through to tap zones */
}

.text-content {
    color: var(--text-light);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.text-content.visible {
    transform: translateY(0);
    opacity: 1;
}

#story-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    line-height: 1.1;
    margin-bottom: 12px;
    color: var(--brand-color);
}

#story-text {
    font-size: 1rem;
    line-height: 1.5;
    font-weight: 300;
    opacity: 0.9;
}

/* CTA Button */
.cta-button {
    display: inline-block;
    margin-top: 24px;
    padding: 16px 32px;
    background-color: var(--brand-color);
    color: white;
    text-decoration: none;
    font-weight: 600;
    border-radius: 30px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    pointer-events: auto; /* Enable clicks */
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4);
    transition: transform 0.1s;
}

.cta-button:active {
    transform: scale(0.95);
}

.cta-button.hidden {
    display: none;
}

/* Navigation Tap Zones */
.tap-zone {
    position: absolute;
    top: 0;
    height: 100%;
    z-index: 50;
}

.tap-zone.left {
    left: 0;
    width: 30%;
}

.tap-zone.right {
    right: 0;
    width: 70%;
}