/* static/css/style.css */
body {
    padding: 20px;
}

.timecode-button {
    margin: 5px;
}

#timecode-list {
    max-height: 300px;
    overflow-y: auto;
}

/* 영어 문장 학습기 스타일 */

/* 전체 페이지 스타일 */
body {
    font-family: 'Roboto', 'Noto Sans KR', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f7;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

/* 헤더 스타일 */
header {
    background-color: #2c3e50;
    color: white;
    padding: 1rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

/* 비디오 플레이어 섹션 */
.video-container {
    position: relative;
    width: 100%;
    margin: 20px 0;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

video {
    width: 100%;
    display: block;
}

.video-controls {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    flex-wrap: wrap;
    gap: 10px;
}

.video-controls button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.video-controls button:hover {
    background-color: #2980b9;
}

/* 문장 선택 섹션 */
.sentence-navigation {
    margin: 30px 0;
}

.sentence-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #2c3e50;
    font-weight: 600;
}

.search-container {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-container input {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.search-container button {
    background-color: #27ae60;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s;
}

.search-container button:hover {
    background-color: #219653;
}

/* 문장 버튼 그리드 */
.sentence-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-top: 15px;
}

.sentence-button {
    background-color: #ecf0f1;
    border: 1px solid #bdc3c7;
    color: #2c3e50;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.sentence-button:hover {
    background-color: #3498db;
    color: white;
    border-color: #3498db;
}

.sentence-button.active {
    background-color: #2980b9;
    color: white;
    border-color: #2980b9;
}

/* 현재 재생 중인 문장 표시 */
.current-sentence {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 15px;
    margin: 20px 0;
    border-radius: 6px;
    font-size: 1.1rem;
    text-align: center;
}

.current-sentence-number {
    font-weight: bold;
    color: #e74c3c;
}

/* 하단 정보 및 푸터 */
.info-section {
    margin: 30px 0;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

footer {
    text-align: center;
    padding: 20px 0;
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-top: 40px;
    border-top: 1px solid #eee;
}

/* 반응형 스타일 */
@media (max-width: 768px) {
    .sentence-grid {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }

    header h1 {
        font-size: 1.5rem;
    }

    .video-controls button {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .sentence-grid {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }

    .container {
        padding: 10px;
    }

    .search-container {
        flex-direction: column;
    }
}

/* 로딩 인디케이터 */
.loading {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.loading.active {
    display: flex;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
