/* Time Attack Quiz Front Styles */

.taq-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 15px;
    font-family: sans-serif;
    color: #fff;
}

/* スタート画面 */
.taq-start {
    text-align: center;
    padding: 40px 20px;
}

.taq-title {
    font-size: 2em;
    font-weight: bold;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.taq-description {
    font-size: 1.1em;
    margin-bottom: 25px;
    opacity: 0.9;
}

.taq-info {
    margin-bottom: 30px;
    font-size: 1em;
    opacity: 0.85;
}

.taq-info p {
    margin: 5px 0;
}

.taq-start-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 18px 60px;
    font-size: 1.3em;
    font-weight: bold;
    border-radius: 50px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
}

.taq-start-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}

/* クイズ画面 */
.taq-quiz {
    padding: 20px;
}

.taq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.taq-progress {
    font-size: 1.1em;
    font-weight: 600;
}

.taq-timer {
    background: rgba(255,255,255,0.2);
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 1.2em;
    font-weight: bold;
}

.taq-timer.warning {
    background: #e74c3c;
    animation: pulse 0.5s infinite;
}

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

/* タイマーバー */
.taq-timer-bar {
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 25px;
}

.taq-timer-fill {
    height: 100%;
    background: #2ecc71;
    border-radius: 4px;
    transition: width 1s linear, background 0.3s;
    width: 100%;
}

.taq-timer-fill.warning {
    background: #e74c3c;
}

/* 問題画像 */
.taq-question-image {
    text-align: center;
    margin-bottom: 20px;
}

.taq-question-image img {
    max-width: 100%;
    max-height: 250px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 問題文 */
.taq-question-text {
    font-size: 1.4em;
    font-weight: 600;
    text-align: center;
    margin-bottom: 30px;
    line-height: 1.5;
    min-height: 60px;
}

/* 選択肢 */
.taq-choices {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.taq-choice {
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.3);
    color: #fff;
    padding: 20px;
    font-size: 1.1em;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.taq-choice:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.5);
    transform: translateY(-2px);
}

.taq-choice:active {
    transform: scale(0.98);
}

.taq-choice.correct {
    background: #2ecc71;
    border-color: #2ecc71;
}

.taq-choice.incorrect {
    background: #e74c3c;
    border-color: #e74c3c;
}

.taq-choice.disabled {
    pointer-events: none;
    opacity: 0.7;
}

/* フィードバック */
.taq-feedback {
    text-align: center;
    font-size: 2em;
    font-weight: bold;
    margin-top: 25px;
    min-height: 50px;
}

.taq-feedback.correct {
    color: #2ecc71;
}

.taq-feedback.incorrect {
    color: #e74c3c;
}

/* 結果画面 */
.taq-result {
    text-align: center;
    padding: 40px 20px;
}

.taq-result-title {
    font-size: 1.5em;
    margin-bottom: 20px;
    opacity: 0.9;
}

.taq-result-rank {
    font-size: 5em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 3px 3px 6px rgba(0,0,0,0.3);
}

.taq-result-rank.rank-S { color: #ffd700; }
.taq-result-rank.rank-A { color: #ff6b6b; }
.taq-result-rank.rank-B { color: #4ecdc4; }
.taq-result-rank.rank-C { color: #95e1d3; }
.taq-result-rank.rank-D { color: #dfe6e9; }
.taq-result-rank.rank-E { color: #b2bec3; }

.taq-result-score {
    font-size: 1.8em;
    margin-bottom: 25px;
}

.taq-result-message {
    font-size: 1.2em;
    line-height: 1.6;
    margin-bottom: 35px;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

/* 結果ボタン */
.taq-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.taq-share-x {
    background: #000;
    color: #fff;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}

.taq-share-x:hover {
    background: #333;
}

.taq-retry {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 15px 35px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s;
}

.taq-retry:hover {
    transform: translateY(-2px);
}

/* レスポンシブ */
@media (max-width: 600px) {
    .taq-container {
        padding: 20px 15px;
        border-radius: 10px;
    }
    
    .taq-title {
        font-size: 1.5em;
    }
    
    .taq-choices {
        grid-template-columns: 1fr;
    }
    
    .taq-question-text {
        font-size: 1.2em;
    }
    
    .taq-result-rank {
        font-size: 4em;
    }
}
