/* 連打チャレンジ カスタムCSS */

/* レイアウト */
.main-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin: 0 auto;
}

.how-to-use {
    margin-bottom: 3rem;
}

/* セクション共通スタイル */
section {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.section-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #374151;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f3f4f6;
}

/* カード共通スタイル */
.card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* ゲーム開始画面 */
.start-content {
    text-align: center;
    max-width: 500px;
    margin: 0 auto;
}

.game-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.challenge-settings {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.setting-item {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* スタートボタン */
.start-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 25px;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

/* カウントダウン */
.countdown-content {
    text-align: center;
    padding: 4rem 2rem;
}

.countdown-number {
    font-size: 8rem;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 1rem;
    text-shadow: 4px 4px 8px rgba(239, 68, 68, 0.3);
    animation: countdown-pulse 1s infinite;
}

@keyframes countdown-pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
}

.countdown-message {
    font-size: 1.2rem;
    color: #6b7280;
}

/* ゲーム中画面 */
.game-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
}

.stat-display {
    text-align: center;
}

.time-remaining {
    font-size: 2.5rem;
    font-weight: bold;
    color: #ef4444;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.click-count {
    font-size: 2.5rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.clicks-per-second {
    font-size: 2rem;
    font-weight: bold;
    color: #3b82f6;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.stat-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
}

/* クリックエリア */
.click-area {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.click-btn {
    width: 300px;
    height: 300px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.1s;
    box-shadow: 0 8px 30px rgba(16, 185, 129, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    user-select: none;
}

.click-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(16, 185, 129, 0.5);
}

.click-btn:active {
    transform: scale(0.95);
    box-shadow: 0 4px 20px rgba(16, 185, 129, 0.6);
}

.click-btn-text {
    font-size: 1.8rem;
}

.click-btn-count {
    font-size: 3rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

/* クリック時のエフェクト */
.click-btn.clicked {
    animation: click-effect 0.1s ease-out;
}

@keyframes click-effect {
    0% { transform: scale(0.95); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 結果表示 */
.result-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.result-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    animation: result-bounce 0.6s ease-out;
}

.result-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #374151;
    margin-bottom: 1rem;
}

.result-score {
    font-size: 4rem;
    font-weight: bold;
    color: #10b981;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.result-label {
    font-size: 1.2rem;
    color: #6b7280;
    margin-bottom: 1rem;
}

.result-evaluation {
    font-size: 1.3rem;
    font-weight: 600;
    color: #7c3aed;
    margin-bottom: 1rem;
}

.result-message {
    color: #6b7280;
    margin-bottom: 2rem;
    line-height: 1.5;
}

@keyframes result-bounce {
    0% { opacity: 0; transform: scale(0.3); }
    50% { opacity: 1; transform: scale(1.05); }
    70% { transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

/* 統計表示 */
.result-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 10px;
}

.stat-item {
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
    margin-bottom: 0.25rem;
}

.stat-value {
    display: block;
    font-size: 1.2rem;
    font-weight: bold;
    color: #1f2937;
}

/* アクションボタン */
.result-actions {
    display: flex;
    justify-content: center;
}

.action-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.action-btn.primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.action-btn:hover {
    transform: translateY(-2px);
}

.action-btn.primary:hover {
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

/* 記録セクション */
.records-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #0284c7;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #0369a1;
    margin-bottom: 0.5rem;
    font-family: 'Courier New', monospace;
}

.stat-card .stat-label {
    font-size: 0.9rem;
    color: #0369a1;
    font-weight: 500;
}

/* 記録一覧 */
.records-list {
    max-height: 300px;
    overflow-y: auto;
}

.record-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 4px solid #10b981;
}

.record-score {
    font-size: 1.2rem;
    font-weight: bold;
    color: #1f2937;
    font-family: 'Courier New', monospace;
}

.record-date {
    font-size: 0.85rem;
    color: #6b7280;
}

.record-evaluation {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 500;
}

.no-records {
    text-align: center;
    color: #6b7280;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 2px dashed #d1d5db;
}

/* 評価バッジ */
.evaluation-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    min-width: 80px;
    text-align: center;
}

.evaluation-badge.machine-gun {
    background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
}

.evaluation-badge.super-fast {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

.evaluation-badge.fast {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
}

.evaluation-badge.normal {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.evaluation-badge.slow {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

/* レスポンシブ調整 */
@media (max-width: 768px) {
    .card {
        padding: 1.5rem;
    }
    
    .game-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .click-btn {
        width: 250px;
        height: 250px;
        font-size: 1.2rem;
    }
    
    .click-btn-text {
        font-size: 1.5rem;
    }
    
    .click-btn-count {
        font-size: 2.5rem;
    }
    
    .result-score {
        font-size: 3rem;
    }
    
    .countdown-number {
        font-size: 6rem;
    }
    
    .time-remaining,
    .click-count {
        font-size: 2rem;
    }
    
    .clicks-per-second {
        font-size: 1.5rem;
    }
    
    .records-stats {
        grid-template-columns: 1fr;
    }
    
    .record-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
}

@media (max-width: 480px) {
    .game-icon {
        font-size: 3rem;
    }
    
    .result-icon {
        font-size: 3rem;
    }
    
    .click-btn {
        width: 200px;
        height: 200px;
    }
    
    .result-score {
        font-size: 2.5rem;
    }
    
    .countdown-number {
        font-size: 5rem;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
}

/* アニメーション効果 */
.pulse-effect {
    animation: pulse 0.5s ease-out;
}

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