/* public/css/style.css */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&family=Lateef:wght@400;700&family=Mirza:wght@400;700&display=swap');

:root {
    --primary-color: #007bff;
    --bg-color: #f8f9fa;
    --card-bg: #fff;
    --text-color: #333;
    --border-color: #e9ecef;
    --arabic-font: 'Lateef', serif;
    --arabic-font-size: 1.8rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    padding-bottom: 140px;
}

.container {
    max-width: 600px;
    margin: 0 auto;
    padding: 15px;
}

/* Header */
.lesson-header {
    text-align: center;
    margin-bottom: 20px;
}

.lesson-header h1 {
    font-size: 1.5rem;
    margin: 10px 0;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    cursor: pointer;
}

.toggle-icon {
    font-size: 1.2rem;
    color: #dc3545;
    /* Red color as in screenshot */
    transition: transform 0.3s;
    user-select: none;
}

.toggle-icon.collapsed {
    transform: rotate(-180deg);
}

/* Sound Cards General */
.sound-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 15px;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.sound-card.active {
    border-color: var(--primary-color);
    background-color: #e7f1ff;
}

/* Word List */
.word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
}

.word.sound-card {
    flex: 1 1 calc(50% - 10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 10px;
    margin-bottom: 0;
}

.word .item.ar {
    font-family: var(--arabic-font);
    font-size: var(--arabic-font-size);
    font-weight: bold;
    margin-bottom: 5px;
    color: #000;
}

.word .item.ru {
    font-size: 0.9rem;
    color: #666;
}

/* Sentence List */
.sentence.sound-card {
    display: flex;
    flex-direction: column;
}

.sentence .words {
    display: flex;
    /* flex-direction: row-reverse; */
    /* RTL for Arabic sentences structure if needed, or just keep normal */
    flex-wrap: wrap;
    justify-content: flex-end;
    /* Align right for Arabic */
    gap: 5px;
    margin-bottom: 10px;
}

.sentence .word {
    text-align: center;
}

.sentence .item.ar {
    font-family: var(--arabic-font);
    font-size: calc(var(--arabic-font-size) * 1.1);
    font-weight: bold;
    direction: rtl;
}

.sentence .item.ru {
    display: none;
    /* Usually word-by-word translation is hidden or small? User example showed block */
}

.sentence .perevod {
    font-size: 1rem;
    color: #555;
    border-top: 1px solid var(--border-color);
    padding-top: 10px;
    margin-top: 5px;
}

.sound.play {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 1.2rem;
    color: var(--primary-color);
    opacity: 0.5;
}

/* Utils */
.hidden {
    display: none !important;
}

/* Video */
.video-container {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
}

.video-container video {
    width: 100%;
    display: block;
}

/* Bottom Bar Placeholder */
/* Bottom Bar */
.bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid #ddd;
    padding: 10px 15px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
}

.bar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.main-controls {
    justify-content: center;
    border-bottom: 1px solid #f1f3f5;
    padding-bottom: 10px;
}

.main-controls .control-group {
    gap: 20px;
}

.control-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.center-controls {
    gap: 15px;
}

.btn-control {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-color);
    padding: 0 5px;
    transition: transform 0.1s;
}

.btn-control:active {
    transform: scale(0.95);
}

.btn-control.stop {
    color: #dc3545;
}

.select-wrapper select {
    padding: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    user-select: none;
}

/* Rounded groups for font controls */
.font-size-group {
    background: #f1f3f5;
    border-radius: 20px;
    display: flex;
    overflow: hidden;
}

.font-size-group .btn-control {
    width: 40px;
    height: 35px;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #333;
}

.font-size-group .btn-control:hover {
    background: #e9ecef;
}

.font-family-btn {
    background: #f1f3f5;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: #333;
}

.font-family-btn:hover {
    background: #e9ecef;
}

@media (max-width: 400px) {
    .bottom-bar {
        font-size: 0.8rem;
    }

    .btn-control {
        font-size: 1.2rem;
    }

    .search-group span {
        display: none;
        /* Hide text label on very small screens */
    }
}