/* 초 맞추기 게임 스타일 */
.timer-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 80px;
    min-height: 100vh;
    padding-bottom: calc(50px + 20px); /* 스크롤버튼 + 띠배너1번 + 띠배너여백 + 고정배너 + 여백 */
}

.timer-header {
    text-align: center;
    margin-bottom: 40px;
}

.timer-title {
    font-size: 42px;
    font-weight: 700;
    color: #2D2D2D;
    margin-bottom: 12px;
    text-shadow: 0 2px 4px rgba(255, 255, 255, 0.8), 0 0 10px rgba(255, 182, 193, 0.5);
}

.timer-subtitle {
    font-size: 18px;
    color: #5A5A5A;
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* 게임 영역 */
.game-area {
    animation: fadeInUp 0.6s ease;
}

/* 타이머 표시 */
.timer-display {
    background: white;
    border-radius: var(--radius-xl);
    padding: 50px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 30px;
}

.timer-value {
    font-size: 64px;
    font-weight: 700;
    color: var(--text-dark);
    font-family: 'Courier New', monospace;
    margin-bottom: 16px;
    letter-spacing: 2px;
}

.timer-target {
    font-size: 18px;
    color: var(--text-medium);
    font-weight: 500;
}

/* 결과 표시 */
.result-display {
    background: white;
    border-radius: var(--radius-xl);
    padding: 40px 30px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease;
}

.result-display.hidden {
    display: none;
}

.result-icon {
    font-size: 64px;
    margin-bottom: 20px;
    animation: bounce 0.6s ease;
}

.result-message {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.result-message.success {
    color: #4CAF50;
}

.result-message.fail {
    color: #F44336;
}

.result-diff {
    font-size: 18px;
    color: var(--text-medium);
    font-weight: 500;
}

/* 버튼 영역 */
.button-area {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.game-btn {
    padding: 18px 40px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
    font-family: 'Pretendard', sans-serif;
    min-width: 140px;
}

.game-btn.hidden {
    display: none;
}

.start-btn {
    background: var(--gradient-1);
    color: white;
}

.start-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.stop-btn {
    background: #F44336;
    color: white;
}

.stop-btn:hover {
    background: #E53935;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.reset-btn {
    background: #9E9E9E;
    color: white;
}

.reset-btn:hover {
    background: #757575;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

/* 게임 설명 */
.game-info {
    background: white;
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
}

.info-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.info-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.info-list li {
    padding: 12px 0;
    padding-left: 24px;
    position: relative;
    color: var(--text-medium);
    font-size: 16px;
    line-height: 1.6;
}

.info-list li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-pink);
    font-weight: 700;
    font-size: 20px;
}

/* 랭킹 섹션 */
.ranking-section {
    animation: fadeInUp 0.6s ease 0.2s both;
}

.ranking-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.ranking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.ranking-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
}

.reset-ranking-btn {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: var(--radius-sm);
    color: var(--text-medium);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Pretendard', sans-serif;
}

.reset-ranking-btn:hover {
    background: #ffebee;
    border-color: #f44336;
    color: #f44336;
}

.ranking-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #fafafa;
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
}

.ranking-item:hover {
    background: #f5f5f5;
    transform: translateX(4px);
}

.ranking-item.top {
    background: var(--gradient-2);
    border-left: 4px solid var(--primary-pink);
}

.ranking-rank {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    min-width: 40px;
}

.ranking-info {
    flex: 1;
    margin-left: 16px;
}

.ranking-time {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    font-family: 'Courier New', monospace;
}

.ranking-diff {
    font-size: 14px;
    color: var(--text-medium);
    margin-top: 4px;
}

.no-ranking {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
    font-size: 16px;
}

/* 애니메이션 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-20px);
    }
}

/* 반응형 */
@media (max-width: 768px) {
    .timer-container {
        padding: 20px 16px 80px;
        padding-bottom: calc(50px + 20px); /* 스크롤버튼 + 띠배너1번 + 띠배너여백 + 고정배너 + 여백 */
    }
    
    .timer-title {
        font-size: 32px;
    }
    
    .timer-value {
        font-size: 48px;
    }
    
    .timer-display {
        padding: 40px 20px;
    }
    
    .button-area {
        flex-direction: column;
        align-items: stretch;
    }
    
    .game-btn {
        width: 100%;
    }
    
    .ranking-card {
        padding: 20px;
    }
}
