:root {
    --primary-color: #2d5f3f;
    --secondary-color: #1e4029;
    --accent-color: #5a9367;
    --text-color: #2c3e50;
    --background-color: #faf9f7;
    --card-background: #ffffff;
    --border-radius: 12px;
    --font-display: 'Crimson Pro', serif;
    --font-body: 'Lato', sans-serif;
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-medium: 0 8px 30px rgba(0, 0, 0, 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
    flex-grow: 1;
}

.lesson-card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    margin-bottom: 40px;
}

.lesson-card h1 {
    font-family: var(--font-display);
    color: var(--primary-color);
    text-align: center;
    padding: 40px 30px 30px;
    font-size: clamp(1.75rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.2;
}

.lesson-image-container {
    display: flex;
    justify-content: center;
    padding: 0 30px;
}

.lesson-image {
    max-width: 80%;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: var(--shadow-medium);
}

.lesson-content-wrapper {
    display: flex;
    justify-content: center;
    padding: 40px 30px;
}

.lesson-content {
    max-width: 80%;
    font-size: clamp(1.05rem, 2.5vw, 1.15rem);
    line-height: 1.8;
    text-align: justify;
    color: var(--text-color);
}

.lesson-content p {
    margin-bottom: 1.2em;
}

.audio-player {
    padding: 30px;
    text-align: center;
    background: linear-gradient(to bottom, rgba(93, 147, 103, 0.03), transparent);
}

.audio-player audio {
    width: 100%;
    max-width: 600px;
    border-radius: 50px;
    outline: none;
}

.video-player {
    width: 100%;
    max-width: 600px;
    border-radius: 10px;
}

.media-toggle {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.song-lyrics {
    background: linear-gradient(135deg, #f5f7fa 0%, #e8ebe9 100%);
    padding: 30px;
    margin: 30px;
    border-radius: var(--border-radius);
    border-left: 4px solid var(--accent-color);
}

.song-lyrics h4 {
    font-family: var(--font-display);
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
}

.song-lyrics p {
    font-size: clamp(1rem, 2.5vw, 1.1rem);
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

.song-cover {
    text-align: center;
    margin-bottom: 20px;
}

.song-cover__img {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
}

.reactions-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 30px;
    border-top: 1px solid #e0e0e0;
}

.reaction-button {
    display: flex;
    align-items: center;
    gap: 10px;
    background: transparent;
    border: 2px solid #ddd;
    border-radius: 50px;
    padding: 12px 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    font-size: 1.05rem;
}

.reaction-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.reaction-button.like-btn {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.reaction-button.like-btn:hover,
.reaction-button.like-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.reaction-button.dislike-btn {
    color: #e74c3c;
    border-color: #e74c3c;
}

.reaction-button.dislike-btn:hover,
.reaction-button.dislike-btn.active {
    background-color: #e74c3c;
    color: white;
}

.reaction-icon {
    font-size: 1.5em;
}

.reaction-count {
    font-weight: 700;
    min-width: 20px;
}

footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: #fff;
    padding: 50px 20px 30px;
    margin-top: 60px;
}

.footer-content {
    max-width: 900px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.footer-links a,
.footer-links button {
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    background-color: rgba(255, 255, 255, 0.15);
    border: none;
    cursor: pointer;
    font-size: 1.05rem;
    font-family: var(--font-body);
    backdrop-filter: blur(10px);
}

.footer-links a:hover,
.footer-links button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.footer-link--radio {
    background-color: rgba(255, 255, 255, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.35);
}

.share-wrapper {
    text-align: center;
}

.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background-color: #25D366;
    padding: 14px 28px;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    margin: 20px 0;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1.05rem;
}

.share-button:hover {
    background-color: #1DA851;
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

.share-button svg {
    width: 24px;
    height: 24px;
    fill: white;
}

.footer-panel {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.footer-panel__title {
    font-family: var(--font-display);
    color: white;
    margin-bottom: 0.75rem;
    font-size: clamp(1.35rem, 4vw, 1.6rem);
    text-align: center;
    font-weight: 600;
}

.footer-panel__intro {
    text-align: center;
    margin-bottom: 1.25rem;
    font-size: 1.05rem;
    opacity: 0.92;
    line-height: 1.5;
}

.search-form {
    display: flex;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.search-input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    font-size: 1.05rem;
    font-family: var(--font-body);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-color);
    transition: all 0.3s ease;
    min-height: 3rem;
}

.search-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.6);
    background: white;
}

.search-button {
    padding: 14px 32px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-body);
    min-height: 3rem;
}

.search-button:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
    box-shadow: var(--shadow-soft);
}

.word-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
    justify-content: center;
    text-align: center;
}

.word-cloud a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    line-height: 1.3;
    padding: 0.2rem 0.35rem;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.word-cloud a:hover,
.word-cloud a:focus-visible {
    opacity: 0.85;
    text-decoration: underline;
    transform: translateY(-1px);
}

.word-cloud__link--size-1 { font-size: 1rem; }
.word-cloud__link--size-2 { font-size: 1.2rem; }
.word-cloud__link--size-3 { font-size: 1.45rem; }
.word-cloud__link--size-4 { font-size: 1.7rem; }
.word-cloud__link--size-5 { font-size: 2rem; }

.word-cloud-empty {
    text-align: center;
    font-size: 1.05rem;
    opacity: 0.9;
    padding: 0.5rem 0;
}

.related-lessons ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.related-lessons li a {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    display: block;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 1.05rem;
    line-height: 1.35;
}

.related-lessons li a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.search-message {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    color: #856404;
    border-radius: var(--border-radius);
    margin: 20px 0;
    font-size: 1.05rem;
}

.empty-state {
    padding: 40px;
    text-align: center;
    font-size: 1.125rem;
}

.is-hidden {
    display: none !important;
}

.btn-video {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-medium);
    position: relative;
    overflow: hidden;
}

.btn-video:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-audio {
    background: #2d5f3f;
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-size: 1.05rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-audio:hover {
    background: #1e4029;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .lesson-card h1 {
        padding: 30px 20px 20px;
    }

    .lesson-image {
        max-width: 95%;
    }

    .lesson-content-wrapper {
        padding: 30px 20px;
    }

    .lesson-content {
        max-width: 95%;
    }

    .song-lyrics {
        margin: 20px 15px;
        padding: 20px;
    }

    .footer-links {
        flex-direction: column;
        align-items: center;
    }

    .search-form {
        flex-direction: column;
    }

    .reactions-container {
        flex-direction: column;
        gap: 15px;
    }

    .related-lessons ul {
        flex-direction: column;
        align-items: center;
    }

    .word-cloud__link--size-4 { font-size: 1.5rem; }
    .word-cloud__link--size-5 { font-size: 1.75rem; }
}
