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

html, body {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Remove scroll */
    position: fixed; /* Prevent mobile scroll */
}

body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.5s ease;
}

/* === THEME COLORS === */
.theme-home { background-color: #0B1416; }
.theme-player1 { background-color: #03045E; }
.theme-player2 { background-color: #F15025; }
.theme-pass-phone { background-color: #F49CBB; }
.theme-success { background-color: #72B01D; }
.theme-fail { background-color: #720E07; }

/* === LAYOUT === */
#app {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.screen {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.4s ease;
    pointer-events: none;
    overflow: hidden;
}

.screen.active {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.container {
    text-align: center;
    color: white;
    padding: clamp(1rem, 4vw, 2rem);
    width: 100%;
    max-width: 450px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* === TYPOGRAPHY === */

/* Main title - Home screen */
.main-title {
    font-weight: 800;
    font-size: clamp(2rem, 7vw, 3.5rem);
    line-height: 1.1;
    margin-bottom: 2.5rem;
    letter-spacing: -0.02em;
}

/* Challenge breakdown - Screen 2 */
.challenge-breakdown {
    margin-bottom: 2rem;
    line-height: 1.2;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.challenge-prefix {
    font-weight: 800;
    font-size: clamp(1.2rem, 4vw, 1.8rem);
    display: block;
    margin-bottom: 0.5rem;
}

.challenge-action {
    font-weight: 800;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    display: block;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.95);
    line-height: 1.1;
}

/* Pass phone screen */
.pass-phone-title {
    font-weight: 800;
    font-size: clamp(1.5rem, 6vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 3rem;
    letter-spacing: -0.01em;
}

/* Range title - DA 1 A */
.range-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    margin-bottom: 2rem;
    letter-spacing: 0.02em;
}

/* Action titles */
.action-title {
    font-weight: 800;
    font-size: clamp(1.4rem, 5vw, 2.2rem);
    margin-bottom: 1rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.range-number {
    color: rgba(255, 255, 255, 1);
    font-size: 1em;
}

/* Challenge subtitle */
.challenge-subtitle {
    font-weight: 400;
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    margin-bottom: 1.5rem;
    opacity: 0.9;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.challenge-subtitle span {
    font-style: italic;
    text-transform: lowercase;
}

/* Player labels */
.player-label {
    font-weight: 400;
    font-size: clamp(0.8rem, 2.5vw, 1rem);
    opacity: 0.7;
    margin-bottom: 1rem;
}

/* Input labels */
.input-label {
    font-weight: 800;
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    margin-bottom: 1.5rem;
}

/* Instructions */
.instruction {
    font-weight: 600;
    font-size: clamp(0.9rem, 3.5vw, 1.2rem);
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Helper text */
.helper-text {
    font-weight: 400;
    font-size: clamp(0.75rem, 2.5vw, 0.95rem);
    opacity: 0.7;
    margin-top: 1rem;
}

/* Result title */
.result-title {
    font-weight: 800;
    font-size: clamp(1.8rem, 6vw, 2.8rem);
    margin-bottom: 2rem;
}

/* === INPUTS === */
input {
    width: 100%;
    max-width: 350px;
    padding: clamp(0.8rem, 3vw, 1.2rem);
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    text-align: center;
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    margin-bottom: 1.5rem;
    transition: all 0.2s ease;
}

input:focus {
    outline: none;
    background: white;
    transform: scale(1.02);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

input::placeholder {
    color: #999;
    font-weight: 400;
}

/* === BUTTONS === */
button {
    font-family: 'Poppins', sans-serif;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem);
    min-height: 48px;
    position: relative;
    width: 100%;
    max-width: 350px;
}

.primary-btn {
    background: white;
    color: #333;
    font-weight: 800;
    padding: clamp(0.8rem, 3vw, 1.2rem);
    letter-spacing: 0.5px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.primary-btn:active {
    transform: translateY(0);
}

.green-btn {
    background: #72B01D;
    color: white;
    font-weight: 800;
    padding: clamp(0.8rem, 3vw, 1.2rem);
    letter-spacing: 0.5px;
}

.green-btn:hover {
    background: #5a8f15;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.green-btn:active {
    transform: translateY(0);
}

.secondary-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-weight: 600;
    padding: clamp(0.7rem, 2.5vw, 1rem);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.secondary-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
}

/* === RESULT SCREEN === */
.numbers-display {
    display: flex;
    gap: clamp(0.8rem, 3vw, 1.2rem);
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.number-box {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: clamp(0.8rem, 3vw, 1.2rem);
    min-width: clamp(80px, 20vw, 120px);
    backdrop-filter: blur(10px);
}

.number-label {
    display: block;
    font-size: clamp(0.7rem, 2.5vw, 0.85rem);
    font-weight: 400;
    opacity: 0.8;
    margin-bottom: 0.5rem;
}

.number-value {
    display: block;
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 800;
}

.result-message {
    font-size: clamp(1rem, 3.5vw, 1.3rem);
    font-weight: 600;
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.3;
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* === ANIMATIONS === */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 0.6s ease-in-out;
}

/* === RESPONSIVE === */
@media (max-width: 480px) {
    .container {
        padding: 1rem;
    }
    
    .challenge-breakdown {
        margin-bottom: 1.5rem;
    }
    
    .numbers-display {
        flex-direction: column;
        gap: 0.8rem;
        align-items: center;
    }
}

@media (max-height: 600px) {
    .container {
        padding: 0.8rem;
        gap: 0.5rem;
    }
    
    .main-title, .pass-phone-title {
        margin-bottom: 1.5rem;
    }
    
    .challenge-breakdown, .action-title {
        margin-bottom: 1rem;
    }
    
    input, button {
        margin-bottom: 1rem;
    }
}

/* Prevent zoom on iOS */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    select:focus,
    textarea:focus,
    input:focus {
        font-size: 16px;
        transform: scale(1);
    }
}
