/* Flappy Cheek Marketing Demo - Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #00d4ff;
    --primary-dark: #0099cc;
    --bg-dark: #0a1628;
    --bg-darker: #060d18;
    --text-light: #ffffff;
    --text-muted: #8ba3c7;
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff4466;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-dark);
    color: var(--text-light);
    touch-action: none;
    -webkit-tap-highlight-color: transparent;
}

/* Screens */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    height: 100dvh;
    /* Fix for mobile address bars */
    display: none;
    flex-direction: column;
    align-items: center;
    overflow-y: auto;
    /* Allow scrolling if content is tall */
    -webkit-overflow-scrolling: touch;
}

.screen.active {
    display: flex;
}

/* Ensure content centers nicely but allows scroll */
.intro-content,
.cta-content {
    margin: auto;
    /* Centers vertically if space permits, pushes out if not */
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.screen.active {
    display: flex;
}

/* Intro Screen */
#intro-screen {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #0d2847 100%);
    padding: 20px;
}

.intro-content {
    text-align: center;
    max-width: 400px;
}

.intro-fish {
    width: 120px;
    height: 120px;
    object-fit: contain;
    margin-bottom: 20px;
    animation: float 2s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-15px);
    }
}

#intro-screen h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color), #00ff88);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.tagline {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.highlight {
    color: var(--primary-color);
    font-weight: 700;
}

.instructions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.instruction-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.instruction-item .emoji {
    font-size: 1.8rem;
}

.instruction-item span:last-child {
    font-size: 1rem;
    color: var(--text-light);
}

.cta-header {
    margin-bottom: 25px;
    line-height: 1.2;
}

.cta-line-1 {
    font-size: 1.4rem;
    display: block;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.cta-line-2 {
    font-size: 2.2rem;
    font-weight: 900;
    display: block;
    text-transform: uppercase;
    background: linear-gradient(90deg, #fff, var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.4));
}

.cta-line-3 {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--success);
    margin-top: 5px;
    display: block;
    text-shadow: 0 0 15px rgba(0, 255, 136, 0.3);
}

/* Buttons */
.primary-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    /* CENTER THE BUTTON */
    gap: 4px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--bg-dark);
    border: none;
    padding: 18px 50px;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.4);
    text-decoration: none;
    max-width: 300px;
}

.primary-btn:hover,
.primary-btn:active {
    transform: scale(1.05);
    box-shadow: 0 6px 30px rgba(0, 212, 255, 0.6);
}

.btn-subtitle {
    font-size: 0.8rem;
    font-weight: 500;
    opacity: 0.8;
}

.secondary-btn {
    display: inline-block;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    border: 2px solid var(--primary-color);
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.secondary-btn:hover {
    background: rgba(0, 212, 255, 0.2);
}

.text-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    cursor: pointer;
    margin-top: 20px;
}

.permission-note {
    margin-top: 25px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Game Screen */
#game-screen {
    background: #000;
}

#camera-feed {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
    /* Mirror for selfie view */
}

#game-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Game UI */
#game-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 15px;
    pointer-events: none;
    z-index: 10;
}

#score-display {
    position: absolute;
    top: 70px;
    /* Align with smile-indicator height from top */
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    text-align: right;
    min-width: 100px;
    height: 65px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#score {
    display: block;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 10px var(--primary-color), 0 2px 4px rgba(0, 0, 0, 0.5);
}

.score-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

#smile-indicator {
    position: absolute;
    top: 70px;
    left: 15px;
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 15px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    height: 65px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#smile-emoji {
    font-size: 1.5rem;
    display: block;
    margin-bottom: 5px;
}

.smile-bar {
    width: 80px;
    height: 12px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

#smile-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success));
    border-radius: 6px;
    width: 0%;
    transition: width 0.1s ease;
}

#smile-threshold {
    position: absolute;
    left: 60%;
    /* 0.6 threshold */
    top: 0;
    width: 2px;
    height: 100%;
    background: #ffcc00;
}

#round-display {
    position: absolute;
    top: 70px;
    /* Align with score and smile boxes */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    padding: 5px 25px;
    border-radius: 12px;
    border: 2px solid var(--primary-color);
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-light);
    min-width: 140px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

/* Overlays */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.overlay.hidden {
    display: none;
}

/* Countdown */
#countdown-overlay {
    text-align: center;
}

.countdown-text {
    font-size: 2rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

#countdown-number {
    font-size: 8rem;
    font-weight: 800;
    text-shadow: 0 0 30px var(--primary-color);
    animation: pulse 1s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.1);
    }
}

.countdown-hint {
    margin-top: 30px;
    font-size: 1.2rem;
    color: var(--text-muted);
}

/* Round Over */
#round-over-overlay {
    text-align: center;
    padding: 30px;
}

.round-over-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.round-score {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.rounds-left {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
}

/* CTA Screen */
#cta-screen {
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 50%, #0d2847 100%);
    padding: 20px;
}

.cta-content {
    text-align: center;
    max-width: 400px;
}

.cta-fish {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.final-score {
    font-size: 1.5rem;
    margin-bottom: 25px;
    padding: 15px 30px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid var(--primary-color);
}

#best-score {
    font-weight: 800;
    color: var(--success);
}

.cta-message {
    margin-bottom: 30px;
}

.cta-message p {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--text-muted);
}

.cta-highlight {
    color: var(--text-light) !important;
    font-weight: 600;
}

.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.cta-buttons.hidden {
    display: none;
}

.download-btn {
    flex-direction: row;
    gap: 10px;
}

.btn-icon {
    font-size: 1.5rem;
}

.ios-message {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 10px;
}

/* Loading */
#loading-overlay {
    flex-direction: column;
    gap: 20px;
}

.loader {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

#loading-text {
    font-size: 1.1rem;
    color: var(--text-muted);
}

/* Mobile optimizations */
@media (max-height: 600px) {
    .intro-fish {
        width: 80px;
        height: 80px;
    }

    #intro-screen h1 {
        font-size: 2rem;
    }

    .instruction-item {
        padding: 10px 15px;
    }

    #countdown-number {
        font-size: 5rem;
    }
}

/* Video Styles */
.video-container {
    width: 100%;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.app-video {
    width: 100%;
    max-width: 280px;
    /* Limit width for aesthetics */
    border-radius: 15px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    background: #000;
}

.intro-video-container {
    margin: 15px 0 25px 0;
}


.cta-video-container {
    margin-bottom: 20px;
}

/* Features List */
.features-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
    text-align: left;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 18px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.2s ease;
}

.feature-item:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.12);
}

.feature-icon {
    font-size: 1.5rem;
}

.feature-text {
    font-size: 1.1rem;
    color: var(--text-light);
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

/* Quit Button */
.icon-btn {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;

    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 20;
}

.icon-btn:hover {
    background: rgba(255, 0, 0, 0.8);
    transform: scale(1.1);
    border-color: rgba(255, 255, 255, 0.8);
}

/* Overlay Button Group */
.button-group {
    display: flex;
    gap: 15px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.secondary-btn {
    background: transparent;
    border: 2px solid white;
    color: white;
    padding: 12px 25px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}
