/**
 * TTS 플레이어 스타일
 * 오늘의 운세 결과 페이지용
 */

/* ========================================
   TTS 플레이어 컨테이너
======================================== */
.tts-player-container {
    background: var(--bg-section);
    border-radius: 16px;
    border: 1px solid var(--border-light);
    padding: 20px;
    margin-bottom: 16px;
}

/* ========================================
   컨트롤 영역 (플레이 버튼 + 프로그레스바)
======================================== */
.tts-controls {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

/* 플레이/일시정지 버튼 */
.tts-play-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.tts-play-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(139, 92, 246, 0.4);
}

.tts-play-btn:active {
    transform: scale(0.95);
}

.tts-play-btn .material-symbols-outlined {
    font-size: 24px;
}

.tts-play-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    box-shadow: none;
}

/* 재생 중 상태 */
.tts-play-btn.playing {
    background: linear-gradient(135deg, #EC4899 0%, #8B5CF6 100%);
    animation: playingPulse 1.5s ease-in-out infinite;
}

@keyframes playingPulse {
    0%, 100% {
        box-shadow: 0 4px 12px rgba(236, 72, 153, 0.3);
    }
    50% {
        box-shadow: 0 4px 20px rgba(236, 72, 153, 0.5);
    }
}

/* 프로그레스바 영역 */
.tts-progress-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* 프로그레스바 */
.tts-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(139, 92, 246, 0.2);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.tts-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #8B5CF6, #EC4899);
    border-radius: 3px;
    width: 0%;
    transition: width 0.3s ease;
}

/* 시간 표시 */
.tts-time {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-muted);
}

/* ========================================
   현재 읽는 부분 표시
======================================== */
.tts-current-section {
    text-align: center;
    padding: 16px;
    background: var(--bg-card);
    border-radius: 12px;
    margin-bottom: 16px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.tts-section-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.tts-current-text {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    font-style: italic;
}

.tts-current-text:before {
    content: '"';
}

.tts-current-text:after {
    content: '"';
}

/* 대기 상태 */
.tts-current-section.idle .tts-section-name {
    color: var(--text-muted);
}

.tts-current-section.idle .tts-current-text {
    color: var(--text-secondary);
    font-style: normal;
}

.tts-current-section.idle .tts-current-text:before,
.tts-current-section.idle .tts-current-text:after {
    content: '';
}

/* ========================================
   결과 보기 토글
======================================== */
.tts-toggle-results {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px;
    background: transparent;
    border: 1px dashed var(--border-light);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tts-toggle-results:hover {
    background: var(--bg-section);
    border-color: var(--primary);
    color: var(--primary);
}

.tts-toggle-results .material-symbols-outlined {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.tts-toggle-results.expanded .material-symbols-outlined {
    transform: rotate(180deg);
}

/* ========================================
   결과 컨텐츠 영역
======================================== */
.tts-results-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.tts-results-content.expanded {
    max-height: 3000px;
}

.tts-results-divider {
    height: 1px;
    background: var(--border-light);
    margin: 16px 0;
}

/* ========================================
   다크 모드
======================================== */
html.dark .tts-player-container {
    background: rgba(42, 45, 60, 0.5);
}

html.dark .tts-current-section {
    background: rgba(42, 45, 60, 0.7);
}

html.dark .tts-progress-bar {
    background: rgba(139, 92, 246, 0.15);
}

/* ========================================
   반응형
======================================== */
@media (max-width: 380px) {
    .tts-player-container {
        padding: 16px;
    }

    .tts-play-btn {
        width: 44px;
        height: 44px;
    }

    .tts-play-btn .material-symbols-outlined {
        font-size: 22px;
    }

    .tts-current-text {
        font-size: 14px;
    }
}
