/**
 * Reaction Test Styles
 * 반응속도 테스트 전용 스타일 (단일 컬럼 레이아웃)
 *
 * @package Zipper
 */

/* ===== 단일 컬럼 레이아웃 ===== */
.rt-main-layout {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.rt-test-col {
    width: 100%;
}

.rt-result-col {
    width: 100%;
}

/* ===== 테스트 영역 ===== */
.rt-test-zone {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    -webkit-user-select: none;
}

/* 상태별 색상 */
.rt-test-zone.waiting {
    background: #e8e4dc;
    border: 3px solid #d4af37;
}

.rt-test-zone.ready {
    background: #e74c3c;
    border: 3px solid #c0392b;
}

.rt-test-zone.go {
    background: #27ae60;
    border: 3px solid #229954;
}

.rt-test-zone.too-early {
    background: #f39c12;
    border: 3px solid #e67e22;
}

.rt-test-zone.result {
    background: rgba(52, 152, 219, 0.1);
    border: 3px solid #3498db;
}

/* 테스트 존 내용 */
.rt-test-content {
    text-align: center;
    padding: 20px;
}

.rt-test-message {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 16px;
}

.rt-test-zone.waiting .rt-test-message {
    color: #2d2a26;
}

.rt-test-zone.ready .rt-test-message,
.rt-test-zone.go .rt-test-message,
.rt-test-zone.too-early .rt-test-message {
    color: #fff;
}

.rt-test-zone.result .rt-test-message {
    color: #3498db;
}

.rt-test-time {
    font-size: 48px;
    font-weight: 700;
    color: #3498db;
    margin-bottom: 12px;
}

.rt-test-label {
    font-size: 14px;
    opacity: 0.8;
}

.rt-test-zone.waiting .rt-test-label {
    color: #5f5a56;
}

.rt-test-zone.ready .rt-test-label,
.rt-test-zone.go .rt-test-label,
.rt-test-zone.too-early .rt-test-label {
    color: #fff;
}

.rt-test-zone.result .rt-test-label {
    color: #3498db;
}

/* 시작 버튼 */
.rt-start-btn {
    padding: 14px 28px;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.rt-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.rt-start-btn:active {
    transform: translateY(0);
}

/* 진행 상태 */
.rt-progress {
    text-align: center;
    margin-top: 16px;
    padding: 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
}

.rt-progress-text {
    font-size: 14px;
    color: #5f5a56;
    font-weight: 600;
}

.rt-progress-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.rt-progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e8e4dc;
    transition: all 0.3s;
}

.rt-progress-dot.completed {
    background: #27ae60;
}

.rt-progress-dot.current {
    background: #3498db;
    transform: scale(1.2);
}

/* ===== 결과 영역 ===== */

/* 결과 그리드 (가로 배치) */
.rt-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

.rt-result-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.rt-result-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* 평균 결과 카드 */
.rt-average-result {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    margin-bottom: 0;
}

.rt-average-value {
    font-size: 48px;
    font-weight: 700;
    color: #d4af37;
    line-height: 1;
    margin-bottom: 8px;
}

.rt-average-value .unit {
    font-size: 24px;
    font-weight: 500;
    color: #b8860b;
}

.rt-average-label {
    font-size: 14px;
    color: #5f5a56;
    margin-bottom: 12px;
}

.rt-average-rating {
    display: inline-block;
    padding: 6px 14px;
    background: #fff;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.rt-average-rating.excellent {
    color: #27ae60;
    border-color: rgba(39, 174, 96, 0.3);
    background: rgba(39, 174, 96, 0.05);
}

.rt-average-rating.good {
    color: #3498db;
    border-color: rgba(52, 152, 219, 0.3);
    background: rgba(52, 152, 219, 0.05);
}

.rt-average-rating.average {
    color: #f39c12;
    border-color: rgba(243, 156, 18, 0.3);
    background: rgba(243, 156, 18, 0.05);
}

.rt-average-rating.slow {
    color: #e74c3c;
    border-color: rgba(231, 76, 60, 0.3);
    background: rgba(231, 76, 60, 0.05);
}

/* 통계 그리드 */
.rt-stats-section {
    margin-bottom: 0;
}

.rt-stats-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-stats-title i {
    color: #d4af37;
}

.rt-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.rt-stat-card {
    background: #fff;
    border: 1px solid #e8e4dc;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
}

.rt-stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #2d2a26;
    margin-bottom: 4px;
}

.rt-stat-value .unit {
    font-size: 14px;
    font-weight: 500;
    color: #5f5a56;
}

.rt-stat-label {
    font-size: 12px;
    color: #5f5a56;
}

/* 최근 기록 */
.rt-history-section {
    margin-bottom: 0;
    flex: 1;
}

.rt-history-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-history-title i {
    color: #3498db;
}

.rt-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 250px;
    overflow-y: auto;
}

.rt-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: #faf9f7;
    border: 1px solid #e8e4dc;
    border-radius: 6px;
}

.rt-history-rank {
    font-size: 11px;
    font-weight: 600;
    color: #a09a94;
    min-width: 20px;
}

.rt-history-time {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: #2d2a26;
}

.rt-history-date {
    font-size: 11px;
    color: #a09a94;
}

.rt-history-item.best {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(184, 134, 11, 0.1) 100%);
    border-color: rgba(212, 175, 55, 0.3);
}

.rt-history-item.best .rt-history-rank {
    color: #d4af37;
}

.rt-history-item.best .rt-history-time {
    color: #d4af37;
}

/* 액션 버튼 */
.rt-actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.rt-btn {
    flex: 1;
    padding: 12px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.rt-btn-retry {
    background: linear-gradient(135deg, #d4af37 0%, #b8860b 100%);
    color: #fff;
}

.rt-btn-retry:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

.rt-btn-clear {
    background: #fff;
    color: #5f5a56;
    border: 1px solid #e8e4dc;
}

.rt-btn-clear:hover {
    border-color: #e74c3c;
    color: #e74c3c;
}

/* 반응속도 가이드 */
.rt-guide-section {
    background: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 8px;
    padding: 14px;
    margin-bottom: 0;
}

.rt-guide-title {
    font-size: 13px;
    font-weight: 600;
    color: #3498db;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rt-guide-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.rt-guide-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #5f5a56;
}

.rt-guide-color {
    width: 32px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.rt-guide-color.excellent {
    background: #27ae60;
}

.rt-guide-color.good {
    background: #3498db;
}

.rt-guide-color.average {
    background: #f39c12;
}

.rt-guide-color.slow {
    background: #e74c3c;
}

/* 대기 상태 */
.rt-waiting {
    text-align: center;
    padding: 40px 20px;
    color: #a09a94;
    background: #faf9f7;
    border: 1px dashed #e8e4dc;
    border-radius: 12px;
}

.rt-waiting i {
    font-size: 48px;
    margin-bottom: 12px;
    display: block;
}

.rt-waiting p {
    font-size: 14px;
}

/* 숨김 */
.rt-hidden {
    display: none !important;
}

/* ===== 반응형 - 태블릿 ===== */
@media (max-width: 900px) {
    .rt-test-zone {
        height: 350px;
    }

    .rt-stats-grid {
        gap: 8px;
    }
}

/* ===== 반응형 - 모바일 ===== */
@media (max-width: 768px) {
    .rt-main-layout {
        gap: 16px;
    }

    .rt-result-grid {
        grid-template-columns: 1fr;
    }

    .rt-test-zone {
        height: 300px;
    }

    .rt-test-message {
        font-size: 20px;
    }

    .rt-test-time {
        font-size: 40px;
    }

    .rt-average-value {
        font-size: 40px;
    }
}

/* ===== 반응형 - 작은 모바일 ===== */
@media (max-width: 480px) {
    .rt-test-zone {
        height: 250px;
    }

    .rt-test-message {
        font-size: 18px;
    }

    .rt-test-time {
        font-size: 36px;
    }

    .rt-average-value {
        font-size: 36px;
    }

    .rt-average-value .unit {
        font-size: 20px;
    }

    .rt-stats-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .rt-stat-card {
        padding: 10px;
    }

    .rt-stat-value {
        font-size: 20px;
    }

    .rt-actions {
        flex-direction: column;
    }

    .rt-btn {
        width: 100%;
    }
}
