/* リセットCSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Helvetica Neue', Arial, 'Hiragino Kaku Gothic ProN', 'Hiragino Sans', Meiryo, sans-serif;
    background: #000;
    color: #fff;
    overflow: hidden;
    height: 100vh;
}

#game-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background: #000;
}

/* 動画プレイヤー */
#video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

#video-player {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    pointer-events: none;
}

/* オーバーレイ共通スタイル */
.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
}

.overlay.hidden {
    display: none;
}

/* カウントダウン */
#countdown {
    background: rgba(0, 0, 0, 0.9);
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: #fff;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    animation: pulse 1s ease-in-out;
}

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

/* クイズ表示 */
#quiz-container {
    background: rgba(0, 0, 0, 0.85);
}

.quiz-content {
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.timer-container {
    margin-bottom: 1.5rem;
}

.timer-bar {
    width: 100%;
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.timer-fill {
    height: 100%;
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
    width: 100%;
    transition: width 0.1s linear;
    border-radius: 4px;
}

.timer-text {
    text-align: center;
    color: #333;
    font-size: 0.9rem;
    font-weight: bold;
}

#quiz-question {
    color: #333;
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
    line-height: 1.4;
}

.options-container {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.option-button {
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 1rem;
    font-size: 1rem;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.option-button:hover {
    border-color: #4CAF50;
    background: #f0f8f0;
    transform: translateY(-2px);
}

.option-button.selected {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
}

.option-button.correct {
    border-color: #4CAF50;
    background: #4CAF50;
    color: white;
    animation: correctAnswer 0.5s ease;
}

.option-button.incorrect {
    border-color: #f44336;
    background: #f44336;
    color: white;
    animation: incorrectAnswer 0.5s ease;
}

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

@keyframes incorrectAnswer {
    0% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-2deg); }
    75% { transform: scale(1.05) rotate(2deg); }
    100% { transform: scale(1); }
}

/* 不正解表示 */
.incorrect-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.incorrect-content h2 {
    color: #f44336;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.game-button {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
}

.game-button:hover {
    background: #1976D2;
    transform: translateY(-2px);
}

.game-button.primary {
    background: #4CAF50;
}

.game-button.primary:hover {
    background: #388E3C;
}

/* 完了画面 */
.completion-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    max-width: 500px;
    width: 90%;
}

.completion-content h1 {
    color: #333;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.incentive-info {
    margin: 1.5rem 0;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 12px;
}

.incentive-info h2 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

#incentive-details {
    color: #666;
    font-size: 1rem;
}

/* ローディング画面 */
.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-content p {
    font-size: 1.1rem;
}

/* レスポンシブ対応 */
@media (max-width: 480px) {
    .quiz-content,
    .incorrect-content,
    .completion-content {
        width: 95%;
        padding: 1.5rem;
    }
    
    #quiz-question {
        font-size: 1.1rem;
    }
    
    .option-button {
        padding: 0.8rem;
        font-size: 0.9rem;
    }
    
    .countdown-number {
        font-size: 6rem;
    }
    
    .completion-content h1 {
        font-size: 1.5rem;
    }
}

/* アニメーション */
.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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