/**
 * LEIBER Poland Quiz - Quiz Page Styles
 *
 * Quiz-specific styles for the player-facing quiz interface
 * Requires: variables.css, base.css
 */

/* Body extensions for quiz page */
body {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    overflow-x: hidden;
}

/* Main container */
.container {
    width: 100%;
    max-width: 600px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0,0,0,0.5);
    overflow: hidden;
    position: relative;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--leiber-dark) 0%, var(--leiber-gray) 100%);
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    font-family: 'Open Sans', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--leiber-red);
    letter-spacing: 1px;
}

.logo .poland {
    color: var(--leiber-gray);
    font-weight: 400;
}

/* Language switch */
.lang-switch {
    display: flex;
    gap: 5px;
}

.lang-switch button {
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: transparent;
    color: rgba(255,255,255,0.5);
}

.lang-switch button:hover {
    border-color: rgba(255,255,255,0.6);
    color: rgba(255,255,255,0.8);
}

.lang-switch button.active {
    background: var(--leiber-red);
    border-color: var(--leiber-red);
    color: white;
}

/* Lives display */
.lives {
    display: flex;
    gap: 8px;
}

.life {
    width: 32px;
    height: 32px;
    background: var(--leiber-red);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 18px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(227, 6, 19, 0.4);
}

.life.lost {
    background: var(--leiber-gray);
    opacity: 0.3;
    transform: scale(0.8);
    box-shadow: none;
}

/* Progress bar */
.progress-container {
    background: var(--leiber-light);
    padding: 15px 20px;
    border-bottom: 3px solid var(--leiber-red);
}

.progress-bar {
    height: 8px;
    background: #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--leiber-red), #ff4444);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.progress-text {
    font-size: 12px;
    color: var(--leiber-gray);
    margin-top: 8px;
    text-align: center;
    font-weight: 600;
}

/* Content area */
.content {
    padding: 30px;
    min-height: 400px;
    display: flex;
    flex-direction: column;
}

/* Screen system */
.screen {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    animation: fadeIn 0.5s ease;
}

.screen.active {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Start screen */
.start-logo {
    font-family: 'Open Sans', sans-serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--leiber-red);
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.start-logo .poland {
    color: var(--leiber-gray);
    font-weight: 400;
}

h1 {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 36px;
    color: var(--leiber-dark);
    margin-bottom: 15px;
    letter-spacing: 2px;
}

.subtitle {
    color: var(--leiber-gray);
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 25px;
}

/* Nickname input */
.nickname-input {
    width: 100%;
    max-width: 300px;
    padding: 15px 20px;
    font-size: 18px;
    border: 3px solid var(--leiber-aluminum);
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    transition: border-color 0.3s;
    font-family: 'Open Sans', sans-serif;
}

.nickname-input:focus {
    outline: none;
    border-color: var(--leiber-red);
}

/* Buttons */
.btn {
    padding: 16px 40px;
    font-size: 18px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Open Sans', sans-serif;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background: var(--leiber-red);
    color: white;
    box-shadow: 0 4px 15px rgba(227, 6, 19, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(227, 6, 19, 0.5);
}

.btn-primary:disabled {
    background: var(--leiber-aluminum);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Question screen */
.question-number {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 14px;
    color: var(--leiber-red);
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.scenario {
    background: linear-gradient(135deg, var(--leiber-light) 0%, #e8e8e8 100%);
    border-left: 4px solid var(--leiber-red);
    padding: 20px;
    border-radius: 0 10px 10px 0;
    margin-bottom: 25px;
    font-size: 16px;
    line-height: 1.7;
    text-align: left;
}

.scenario-icon {
    font-size: 40px;
    margin-bottom: 10px;
    display: block;
    text-align: center;
}

/* Answer options */
.options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.option {
    background: white;
    border: 2px solid var(--leiber-aluminum);
    border-radius: 10px;
    padding: 15px 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    text-align: left;
}

.option:hover:not(.disabled) {
    border-color: var(--leiber-red);
    transform: translateX(5px);
}

.option.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.option.wrong {
    background: var(--danger);
    border-color: var(--danger);
    color: white;
}

.option.disabled {
    pointer-events: none;
}

.option-letter {
    width: 36px;
    height: 36px;
    background: var(--leiber-light);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    color: var(--leiber-dark);
    flex-shrink: 0;
}

.option.correct .option-letter,
.option.wrong .option-letter {
    background: rgba(255,255,255,0.3);
    color: white;
}

/* Result screen */
.result-icon {
    font-size: 80px;
    margin-bottom: 20px;
}

.score-display {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 72px;
    color: var(--leiber-red);
    line-height: 1;
}

.score-label {
    font-size: 18px;
    color: var(--leiber-gray);
    margin-bottom: 20px;
}

.badge {
    background: linear-gradient(135deg, var(--leiber-red), #ff4444);
    color: white;
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.end-message {
    color: var(--leiber-gray);
    font-size: 16px;
    margin-bottom: 25px;
}

/* Life lost animation */
.life-lost-animation {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 100px;
    animation: lifeLost 1s ease forwards;
    pointer-events: none;
    z-index: 1000;
}

@keyframes lifeLost {
    0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -100%) scale(1.5); }
}

/* Death screen */
.death-screen {
    background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
    color: white;
    padding: 40px;
    border-radius: 16px;
}

.death-screen h1 {
    color: var(--leiber-red);
}

.death-score {
    font-size: 24px;
    margin: 20px 0;
}

/* Firebase status indicator */
.firebase-status {
    position: fixed;
    bottom: 10px;
    right: 10px;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 100;
}

.firebase-status.connected {
    background: var(--success);
    color: white;
}

.firebase-status.disconnected {
    background: var(--danger);
    color: white;
}

.firebase-status.sending {
    background: #f39c12;
    color: white;
}

/* Result sent confirmation */
.sent-confirmation {
    background: var(--success);
    color: white;
    padding: 15px 25px;
    border-radius: 10px;
    margin-top: 20px;
    animation: fadeIn 0.5s ease;
}

.sent-confirmation.error {
    background: var(--danger);
}
