:root {
    --bg-color: #121212;
    --card-bg: #1e1e1e;
    --accent-color: #BB86FC;
    --text-primary: #E0E0E0;
    --text-secondary: #A0A0A0;
    --text-dim: #606060;
    --highlight-bg: #332b40;
}

body {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Noto Sans KR', sans-serif;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

header {
    text-align: center;
    padding: 1rem;
    background: #000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.5);
    z-index: 10;
}

header h1 {
    font-size: 1.2rem;
    margin: 0;
    color: var(--accent-color);
}

header p {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin: 0.2rem 0 0;
}

.player-container {
    background: #000;
    padding: 1rem;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid #333;
}

audio {
    width: 100%;
    max-width: 600px;
    outline: none;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 2rem 1rem;
    scroll-behavior: smooth;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.subtitle-card {
    background-color: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    width: 100%;
    max-width: 600px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    opacity: 0.6;
    cursor: pointer;
}

.subtitle-card.active {
    background-color: var(--highlight-bg);
    border-left-color: var(--accent-color);
    opacity: 1;
    transform: scale(1.02);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.subtitle-card:hover {
    opacity: 0.8;
}

.subtitle-card.active:hover {
    opacity: 1;
}

.line-ko {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.line-en {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    font-weight: 400;
}

.line-si {
    font-size: 0.85rem;
    color: var(--text-dim);
    font-family: 'Noto Sans Sinhala', sans-serif;
}

.speaker-tag {
    color: var(--accent-color);
    margin-right: 0.5rem;
    font-size: 0.9rem;
    font-weight: bold;
}

/* Scrollbar Styling */
main::-webkit-scrollbar {
    width: 8px;
}
main::-webkit-scrollbar-track {
    background: var(--bg-color);
}
main::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
main::-webkit-scrollbar-thumb:hover {
    background: #666;
}
