/*
Theme Name: PapayaBeat Theme
Theme URI: https://papaya.kalajokinen.fi
Author: Markus Haapasaari / Kaupunkilehti Kalajokinen
Author URI: https://kalajokinen.fi
Description: Moderni App Shell -teema PapayaBeat-suoratoistopalvelulle. PWA-optimoitu.
Version: 1.0
License: Proprietary
Text Domain: papayabeat-theme
*/

/* --- 1. CSS VARIABLES (DESIGN SYSTEM) --- */
:root {
    /* Brand Colors */
    --papaya-orange: #ff8c42;
    --papaya-orange-glow: rgba(255, 140, 66, 0.4);
    --papaya-dark: #121212; /* Deep Black for OLED screens */
    --papaya-panel: #1e1e1e;
    --papaya-border: #333333;

    /* Text Colors */
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --text-faint: #555555;

    /* Spacing & Layout */
    --app-padding: 20px;
    --header-height: 60px;
    --player-height: 90px;
    --border-radius: 12px;
    --safe-area-inset-top: env(safe-area-inset-top);
    --safe-area-inset-bottom: env(safe-area-inset-bottom);

    /* Typography */
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

    /* Animations */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* --- 2. RESET & BASE --- */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent; /* Poistaa harmaan välähdyksen mobiilissa */
}

html {
    font-size: 16px;
    height: 100%;
    overflow: hidden; /* Estää sivun scrollauksen, sovellus hoitaa scrollauksen sisäisesti */
}

body {
    background-color: var(--papaya-dark);
    color: var(--text-main);
    font-family: var(--font-stack);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: fixed; /* Lukitsee viewportin iOS:llä */
    overscroll-behavior-y: none; /* Estää "kumilanka"-efektin sivun reunoilla */
}

/* --- 3. TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-main);
}

a {
    color: var(--text-main);
    text-decoration: none;
}

/* --- 4. APP SHELL STRUCTURE --- */
#app-root {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* --- 5. INTRO / WELCOME SCREEN ANIMATIONS --- */
/* Apple-tyylinen sisäänheittoruutu */

.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.welcome-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.welcome-text {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-main);
    opacity: 0;
    transform: translateY(20px);
    animation: textFadeInUp 2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

/* Tervehdys eri kielillä (vuorottelevat) */
.welcome-word {
    display: none;
}
.welcome-word.active {
    display: inline-block;
    animation: wordPulse 2s ease-in-out;
}

@keyframes textFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes wordPulse {
    0% { opacity: 0; transform: scale(0.9); }
    20% { opacity: 1; transform: scale(1); }
    80% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.1); }
}

/* --- 6. UTILITIES --- */
.hidden { display: none !important; }
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}
