* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { 
    background: linear-gradient(rgba(10, 10, 30, 0.4), rgba(20, 20, 50, 0.5)), url('party.png') no-repeat center center fixed; 
    background-size: cover;
    color: #fff; 
    min-height: 100vh; 
    overflow-x: hidden; 
    display: flex; 
    flex-direction: column; 
}

.app-container { width: 100%; max-width: 500px; margin: 0 auto; padding: 20px; min-height: 100vh; position: relative; }

.screen { display: none; flex-direction: column; width: 100%; animation: fadeIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.screen.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }

.header { text-align: center; margin-bottom: 30px; margin-top: 20px; }
.header h1 { color: #ffd700; font-size: 2.2rem; text-transform: uppercase; letter-spacing: 2px; text-shadow: 0 4px 10px rgba(255, 215, 0, 0.3); }
.header p { color: #ccc; margin-top: 5px; font-size: 1.1rem; }

.back-btn { 
    background: rgba(255, 255, 255, 0.1); 
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2); 
    color: #fff; 
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 1rem; 
    cursor: pointer; 
    align-self: flex-start; 
    margin-bottom: 10px; 
    transition: all 0.3s;
}
.back-btn:hover { background: rgba(255, 255, 255, 0.2); transform: translateX(-5px); }

.setup-card, .resolution-card { 
    background: rgba(22, 33, 62, 0.7); 
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 25px; 
    border-radius: 15px; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.5); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
}
.setup-card label { display: block; margin-top: 20px; margin-bottom: 10px; font-weight: bold; color: #ff6b6b; font-size: 1.1rem; }
.setup-card select, .setup-card input[type="range"] { 
    width: 100%; padding: 12px; border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    background: rgba(0, 0, 0, 0.4); 
    color: #fff; font-size: 1rem; 
}
.setup-card input[type="range"] { padding: 0; accent-color: #ff6b6b; }

.primary-btn { 
    width: 100%; 
    padding: 15px; 
    background: linear-gradient(45deg, #e94560, #ff6b6b); 
    color: #fff; 
    border: none; 
    border-radius: 10px; 
    font-size: 1.2rem; 
    font-weight: bold; 
    cursor: pointer; 
    margin-top: 30px; 
    transition: all 0.3s; 
    box-shadow: 0 5px 15px rgba(233, 69, 96, 0.4); 
}
.primary-btn:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(233, 69, 96, 0.6); }
.primary-btn:active { transform: translateY(1px); }

.secondary-btn { 
    background: rgba(15, 52, 96, 0.8); 
    backdrop-filter: blur(5px);
    color: #fff; 
    border: 1px solid rgba(255,255,255,0.2); 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-size: 1rem; 
    cursor: pointer; 
    transition: all 0.3s;
}
.secondary-btn:hover { background: rgba(15, 52, 96, 1); }

.names-container { display: flex; flex-direction: column; gap: 10px; margin-bottom: 20px; }
.names-container input { 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px solid rgba(255, 255, 255, 0.2); 
    background: rgba(0, 0, 0, 0.4); 
    backdrop-filter: blur(5px);
    color: #ffd700; 
    font-size: 1.2rem; 
    font-weight: bold;
    text-align: center; 
    transition: all 0.3s;
}
.names-container input:focus { border-color: #ffd700; outline: none; background: rgba(0, 0, 0, 0.6); }

.pass-container { text-align: center; margin-top: 50px; }

.role-card { 
    background: rgba(22, 33, 62, 0.8); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    padding: 40px 20px; 
    border-radius: 20px; 
    text-align: center; 
    margin-top: 30px; 
    border: 2px solid rgba(255, 255, 255, 0.1); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.5); 
}
.role-card h2 { color: #ccc; font-size: 1.2rem; margin-bottom: 10px; }

.timer-container { text-align: center; margin-top: 30px; }
#timer-display { font-size: 5rem; font-weight: bold; color: #ffd700; margin-bottom: 20px; font-family: monospace; text-shadow: 0 0 20px rgba(255, 215, 0, 0.5); }
.timer-controls { display: flex; gap: 15px; justify-content: center; }
