/**
 * עיצוב עיקרי לתוסף התהילים
 * מבוסס על העיצובים שהעלת מפיגמה
 */

/* === משתנים גלובליים === */
:root {
    --tehillim-primary: #C0805F;
    --tehillim-bg: #FBFAF8;
    --tehillim-shadow: #F3EAE0;
    --tehillim-text: #333333;
    --tehillim-white: #FFFFFF;
    --tehillim-border-radius: 20px;
    --tehillim-spacing: 16px;
    --tehillim-font-family: 'Ploni', 'Assistant', sans-serif;
    --tehillim-heading-font: 'Ambivalenti', 'Assistant', sans-serif;
}

/* === בסיס === */
.tehillim-plugin * {
    box-sizing: border-box;
}

.tehillim-plugin {
    font-family: var(--tehillim-font-family);
    color: var(--tehillim-text);
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* === כפתורים בסיסיים === */
.tehillim-plugin button {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    border: none;
    padding: 5px 14px;
    border-radius: var(--tehillim-border-radius);
    font-family: var(--tehillim-font-family);
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    outline: none !important;
}

.tehillim-plugin button:hover {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    transform: translateY(-1px);
}

.tehillim-plugin button:active {
    transform: translateY(0);
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

.tehillim-plugin button:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

.tehillim-plugin button:focus:not(:hover) {
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
    outline: none !important;
    border: none !important;
}

/* מניעת צבעי focus/active לא רצויים */
.tehillim-plugin button:active:focus,
.tehillim-plugin button:focus:active {
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

.tehillim-plugin button.active {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
}

/* === אפשרויות תהילים === */
.tehillim-options-container {
    background: var(--tehillim-bg);
    padding: var(--tehillim-spacing);
    border-radius: var(--tehillim-border-radius);
    margin-bottom: var(--tehillim-spacing);
}

.tehillim-options-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: var(--tehillim-spacing);
}

.tehillim-option-btn {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    padding: 16px 20px;
    border-radius: var(--tehillim-border-radius);
    font-size: 16px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tehillim-option-btn:hover,
.tehillim-option-btn.active {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
}

/* === אזור בחירה === */
.tehillim-selection-area {
    margin-top: var(--tehillim-spacing);
    padding: var(--tehillim-spacing);
    background: var(--tehillim-white);
    border-radius: var(--tehillim-border-radius);
    border: 1px solid var(--tehillim-shadow);
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === בוחר ספרים === */
.books-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.book-btn {
    padding: 12px 16px;
    font-size: 14px;
}

/* === רשת פרקים === */
.chapters-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    gap: 8px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--tehillim-shadow);
    border-radius: var(--tehillim-border-radius);
    background: var(--tehillim-white);
}

.chapter-btn {
    padding: 8px 4px;
    font-size: 14px;
    min-height: 40px;
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.chapter-btn:hover {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    transform: scale(1.05);
}

/* === תצוגת תהילים === */
.tehillim-display-container {
    background: var(--tehillim-bg);
    border-radius: var(--tehillim-border-radius);
    overflow: hidden;
    margin: var(--tehillim-spacing) 0;
}

.tehillim-header {
    position: relative;
}

.display-header {
    text-align: center;
    margin-bottom: var(--tehillim-spacing);
}

.display-header h2 {
    font-family: var(--tehillim-heading-font);
    color: var(--tehillim-primary);
    font-size: 24px;
    margin: 0;
    font-weight: 600;
}

.display-header .date-info {
    color: var(--tehillim-text);
    font-size: 16px;
    margin-top: 8px;
}

/* === בקרת גודל פונט === */
.font-size-control {
    position: absolute;
    top: var(--tehillim-spacing);
    left: var(--tehillim-spacing);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.font-size-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--tehillim-shadow);
    border: 2px solid var(--tehillim-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    padding: 0;
}

.font-size-btn img {
    width: 20px;
    height: 20px;
    filter: brightness(0) saturate(100%) invert(64%) sepia(17%) saturate(1815%) hue-rotate(344deg) brightness(91%) contrast(87%);
    transition: filter 0.3s ease;
}

.font-size-btn:hover img {
    filter: brightness(0) saturate(100%) invert(100%);
}

.font-size-btn:hover {
    background: var(--tehillim-primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(192, 128, 95, 0.3);
}

.font-size-btn:active {
    transform: scale(0.95);
    background: var(--tehillim-primary) !important;
}

/* כפתורי זום במצב כהה */
.dark-theme .font-size-btn,
.tehillim-plugin.dark-theme .font-size-btn,
.tehillim-display-container.dark-theme .font-size-btn {
    background: #333;
    border-color: var(--tehillim-primary);
}

.dark-theme .font-size-btn:hover,
.tehillim-plugin.dark-theme .font-size-btn:hover,
.tehillim-display-container.dark-theme .font-size-btn:hover {
    background: var(--tehillim-primary);
}

/* === תוכן תהילים === */
.tehillim-content {
    padding: var(--tehillim-spacing);
    width: 100%;
    max-width: none;
}

.loading-spinner {
    text-align: center;
    padding: 40px;
}

.spinner {
    border: 3px solid var(--tehillim-shadow);
    border-top: 3px solid var(--tehillim-primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.tehillim-text {
    font-size: 18px;
    line-height: 1.8;
    color: var(--tehillim-text);
    background: var(--tehillim-white);
    padding: 50px;
    border-radius: 20px;
    width: 100%;
    max-width: none;
}

/* === פרק תהילים === */
.tehillim-chapter {
    margin-bottom: 32px;
}

.chapter-header {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 0px solid var(--tehillim-shadow);
    position: relative;
}



.audio-player-btn {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.3s ease;
}

.audio-player-btn:hover {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    transform: scale(1.1);
}

.audio-player-btn.playing {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    animation: audioPlaying 1.5s ease-in-out infinite alternate;
}

@keyframes audioPlaying {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.audio-player-btn.no-audio {
    opacity: 0.5;
    cursor: not-allowed;
}

/* === אייקון לוטי לשמע === */
.audio-player-container {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 50%;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.audio-player-container:hover {
    background: rgba(226, 180, 135, 0.1);
    transform: scale(1.1);
}

.audio-lottie {
    pointer-events: none;
    transition: all 0.3s ease;
}

.audio-player-container.playing .audio-lottie {
    transform: scale(1.1);
}

.audio-lottie-disabled {
    pointer-events: none;
    opacity: 0.5;
}

/* מצב כהה לאייקון לוטי */
.dark-theme .audio-player-container:hover,
.tehillim-plugin.dark-theme .audio-player-container:hover,
.tehillim-display-container.dark-theme .audio-player-container:hover {
    background: rgba(226, 180, 135, 0.2);
}

/* === פסוקים === */
.tehillim-verses {
    line-height: 1.5;
    text-align: justify;
    text-justify: inter-word;
    margin-top: 10px; /* מקום לאייקון הלוטי */
}

/* פסוקים בקבוצה */
.chapter-content {
    margin-top: 50px; /* מקום לאייקון הלוטי */
}

.verse-line {
    margin-bottom: 8px;
}

/* תצוגה שורות נפרדות */
.tehillim-verses.lines-mode .verse,
.chapter-content.lines-mode .verse-line {
    display: block;
    margin-bottom: 12px;
    padding: 8px 0;
    text-align: justify;
}

/* תצוגה רצופה */
.tehillim-verses.continuous-mode .verse,
.chapter-content.continuous-mode .verse-line {
    display: inline;
}

.tehillim-verses.continuous-mode .verse:not(:last-child)::after,
.chapter-content.continuous-mode .verse-line:not(:last-child)::after {
    content: ' ';
}

.verse-number {
    font-size: 14px;
    color: var(--tehillim-primary);
    font-weight: 600;
    margin-left: 6px;
}

.verse-text {
    text-align: justify;
    text-justify: inter-word;
}

.chapter-number {
    background: #F3EAE0;
    color: var(--tehillim-primary);
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 50px;
    font-size: 18px;
    display: inline-block;
    margin-left: 4px;
}

/* === בקרות ניווט === */
.tehillim-controls-container {
    padding: var(--tehillim-spacing);
    border-radius: var(--tehillim-border-radius);
    margin-top: var(--tehillim-spacing);
}

.navigation-controls {
    display: flex;
    gap: 12px;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--tehillim-spacing);
}

.nav-btn {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    padding: 12px 20px;
    border-radius: var(--tehillim-border-radius);
    font-size: 16px;
    font-weight: 500;
    min-width: 120px;
}

.complete-chapter-btn {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    padding: 16px 32px;
    border-radius: var(--tehillim-border-radius);
    font-size: 18px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(192, 128, 95, 0.3);
    transform: translateY(0);
    transition: all 0.3s ease;
}

.complete-chapter-btn:hover {
    background: #A86B47;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(192, 128, 95, 0.4);
}

.additional-controls {
    text-align: center;
}

.select-other-btn {
    background: transparent;
    color: var(--tehillim-primary);
    border: 2px solid var(--tehillim-primary);
    padding: 10px 24px;
    font-size: 14px;
}

.select-other-btn:hover {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
}

/* === הגדרות תצוגה === */
.tehillim-settings-container {
    background: var(--tehillim-white);
    padding: var(--tehillim-spacing);
    border-radius: var(--tehillim-border-radius);
    border: 1px solid var(--tehillim-shadow);
    margin: var(--tehillim-spacing) 0;
}

.tehillim-settings-container h3 {
    font-family: var(--tehillim-heading-font);
    color: var(--tehillim-primary);
    font-size: 20px;
    margin: 0 0 20px 0;
    text-align: center;
}

.settings-row {
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.settings-row label {
    font-weight: 500;
    color: var(--tehillim-text);
    min-width: 80px;
}

.settings-row select {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    border: none;
    padding: 8px 16px;
    border-radius: var(--tehillim-border-radius);
    font-size: 14px;
    min-width: 150px;
    cursor: pointer;
}

.display-mode-buttons,
.theme-buttons {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.display-mode-btn,
.theme-btn {
    padding: 8px 16px;
    border: 2px solid var(--tehillim-primary);
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    border-radius: var(--tehillim-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    outline: none !important;
}

.display-mode-btn.active,
.theme-btn.active {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
}

.display-mode-btn:hover,
.theme-btn:hover {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    transform: translateY(-1px);
}

.display-mode-btn:focus,
.theme-btn:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

.display-mode-btn:active,
.theme-btn:active {
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
    transform: translateY(0);
}

/* הגדרות במצב כהה */
.dark-theme .display-mode-btn,
.dark-theme .theme-btn,
.tehillim-plugin.dark-theme .display-mode-btn,
.tehillim-plugin.dark-theme .theme-btn {
    background: #333;
    border-color: var(--tehillim-primary);
    color: #e0e0e0;
}

.dark-theme .display-mode-btn.active,
.dark-theme .theme-btn.active,
.tehillim-plugin.dark-theme .display-mode-btn.active,
.tehillim-plugin.dark-theme .theme-btn.active {
    background: var(--tehillim-primary);
    color: #fff;
}

/* === טופס קבוצה === */
.tehillim-group-form-container {
    background: var(--tehillim-white);
    padding: 24px;
    border-radius: var(--tehillim-border-radius);
    border: 1px solid var(--tehillim-shadow);
    max-width: 600px;
    margin: 0 auto;
}

.group-form .form-row {
    margin-bottom: 20px;
}

.group-form label {
    display: block;
    font-weight: 500;
    color: var(--tehillim-text);
    margin-bottom: 8px;
}

.group-form input,
.group-form select,
.group-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--tehillim-shadow);
    border-radius: var(--tehillim-border-radius);
    font-size: 16px;
    font-family: var(--tehillim-font-family);
    transition: border-color 0.3s ease;
}

.group-form input:focus,
.group-form select:focus,
.group-form textarea:focus {
    outline: none;
    border-color: var(--tehillim-primary);
}

.group-form textarea {
    resize: vertical;
    min-height: 80px;
}

/* === בחירת פרקים בטופס === */
.chapters-selection {
    background: var(--tehillim-bg);
    padding: 16px;
    border-radius: var(--tehillim-border-radius);
    margin-top: 12px;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    cursor: pointer;
}

.radio-option input,
.checkbox-option input {
    width: auto;
    margin-left: 8px;
    transform: scale(1.2);
}

.books-selection,
.custom-chapters {
    margin-top: 16px;
    padding: 16px;
    background: var(--tehillim-white);
    border-radius: var(--tehillim-border-radius);
    border: 1px solid var(--tehillim-shadow);
}

.books-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
}

.books-checkboxes label {
    display: flex;
    align-items: center;
    padding: 8px;
    background: var(--tehillim-bg);
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.books-checkboxes label:hover {
    background: var(--tehillim-shadow);
}

.books-checkboxes input {
    margin-left: 8px;
    width: auto;
}

/* === כפתור שליחה === */
.form-submit {
    text-align: center;
    margin-top: 24px;
}

.submit-btn {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    padding: 16px 48px;
    font-size: 18px;
    font-weight: 600;
    border: none;
    border-radius: var(--tehillim-border-radius);
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(192, 128, 95, 0.3);
}

.submit-btn:hover {
    background: #A86B47;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(192, 128, 95, 0.4);
}

/* === פופאפ הצלחה === */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.popup-content {
    background: var(--tehillim-white);
    padding: 32px;
    border-radius: var(--tehillim-border-radius);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.popup-content h3 {
    color: var(--tehillim-primary);
    font-size: 24px;
    margin-bottom: 20px;
}

.group-link {
    display: flex;
    gap: 8px;
    margin: 20px 0;
}

.group-link input {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--tehillim-shadow);
    border-radius: var(--tehillim-border-radius);
    font-size: 14px;
}

.copy-btn {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    padding: 12px 20px;
    border: none;
    border-radius: var(--tehillim-border-radius);
    cursor: pointer;
    font-weight: 500;
}

/* === כפתורי שיתוף === */
.sharing-buttons {
    margin: 24px 0;
}

.sharing-buttons h4 {
    color: var(--tehillim-text);
    margin-bottom: 16px;
}

.sharing-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 10px 16px;
    border: none;
    border-radius: var(--tehillim-border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.whatsapp-btn { background: #25D366; color: white; }
.telegram-btn { background: #0088cc; color: white; }
.facebook-btn { background: #1877f2; color: white; }
.email-btn { background: #6c757d; color: white; }

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.close-popup-btn {
    background: var(--tehillim-shadow);
    color: var(--tehillim-primary);
    padding: 12px 24px;
    border: none;
    border-radius: var(--tehillim-border-radius);
    cursor: pointer;
    margin-top: 20px;
}

/* === פרטי קבוצה === */
/* === מידע קבוצה === */
.tehillim-group-info-container {
    background: var(--tehillim-bg);
    padding: var(--tehillim-spacing);
    border-radius: var(--tehillim-border-radius);
    margin: var(--tehillim-spacing) 0;
    text-align: center;
}

.group-title {
    font-family: var(--tehillim-heading-font);
    color: var(--tehillim-primary);
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.group-description {
    margin-top: 10px;
}

.group-description p {
    color: var(--tehillim-text);
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

/* === התקדמות קבוצה === */
.tehillim-group-progress-container {
    background: var(--tehillim-bg);
    padding: var(--tehillim-spacing);
    border-radius: var(--tehillim-border-radius);
    margin: var(--tehillim-spacing) 0;
}

.progress-bars-wrapper {
    position: relative;
    width: 100%;
}

.progress-bar-wrapper {
    position: relative;
    width: 100%;
}

.progress-bar {
    width: 100%;
    height: 25px;
    background-color: #F3EAE0;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.progress-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 1.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: absolute;
    top: 0;
    right: 0; /* הברים יתמלאו מימין לשמאל בסביבת RTL */
    overflow: hidden;
}

/* שכבה תחתונה - רקע כללי */
.background-fill {
    background-color: #F3EAE0;
    z-index: 1;
}

.chapters-fill {
    background: linear-gradient(45deg, 
        #C28263 0%, 
        #E8B088 25%, 
        #F5C899 50%, 
        #E8B088 75%, 
        #C28263 100%);
    background-size: 400% 400%;
    animation: shimmerChapters 4s ease-in-out infinite;
    z-index: 3;
}

.rounds-fill {
    background: linear-gradient(45deg, 
        #6B4B36 0%, 
        #8B6B56 25%, 
        #A68B76 50%, 
        #8B6B56 75%, 
        #6B4B36 100%);
    background-size: 400% 400%;
    animation: shimmerRounds 4s ease-in-out infinite;
    z-index: 2;
}

@keyframes shimmerChapters {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 0%;
    }
    75% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

@keyframes shimmerRounds {
    0% {
        background-position: 0% 50%;
    }
    25% {
        background-position: 100% 50%;
    }
    50% {
        background-position: 100% 0%;
    }
    75% {
        background-position: 0% 0%;
    }
    100% {
        background-position: 0% 50%;
    }
}

.progress-info {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.progress-text-right {
    text-align: right;
    flex: 1;
}

.progress-text-left {
    text-align: left;
    flex: 1;
}

/* אפקט זוהר עדין לברים */
.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        -90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0% {
        right: -100%;
    }
    50% {
        right: 100%;
    }
    100% {
        right: 100%;
    }
}

.completion-message,
.round-completion-message {
    text-align: center;
    padding: 15px;
    margin-top: 20px;
    background-color: #f0f8ff;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    animation: celebration 2s ease-in-out;
}

/* === ארכיון קבוצות === */
.tehillim-groups-archive-container {
    background: var(--tehillim-bg);
    padding: 24px;
    border-radius: var(--tehillim-border-radius);
}

.tehillim-groups-archive-container h2 {
    font-family: var(--tehillim-heading-font);
    color: var(--tehillim-primary);
    text-align: center;
    font-size: 32px;
    margin-bottom: 32px;
}

.no-groups {
    text-align: center;
    color: var(--tehillim-text);
    font-style: italic;
    padding: 40px;
}

.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* === כרטיס קבוצה === */
.group-card {
    background: var(--tehillim-white);
    border-radius: var(--tehillim-border-radius);
    padding: 20px;
    border: 1px solid var(--tehillim-shadow);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(192, 128, 95, 0.1);
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(192, 128, 95, 0.2);
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.group-card-header h3 {
    color: var(--tehillim-primary);
    font-size: 18px;
    margin: 0;
    flex: 1;
    line-height: 1.3;
}

.group-date {
    font-size: 12px;
    color: #666;
    background: var(--tehillim-shadow);
    padding: 4px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.group-card .group-description {
    background: var(--tehillim-bg);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 16px;
    font-size: 14px;
    line-height: 1.4;
}

/* === בר התקדמות מיני === */
.group-progress-mini {
    margin-bottom: 16px;
}

.progress-bar-mini {
    background: var(--tehillim-shadow);
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    border-radius: 4px;
}

.progress-text {
    font-size: 12px;
    color: var(--tehillim-text);
    font-weight: 500;
}

/* === תחתית כרטיס === */
.group-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--tehillim-shadow);
}

.participants-count {
    font-size: 12px;
    color: #666;
    background: var(--tehillim-bg);
    padding: 4px 8px;
    border-radius: 4px;
}

.join-group-btn {
    background: var(--tehillim-primary);
    color: var(--tehillim-white);
    padding: 8px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.join-group-btn:hover {
    background: #A86B47;
    transform: translateY(-1px);
}

/* === מצבי תצוגה === */
.tehillim-verses.lines-mode .verse,
.tehillim-text.lines-mode .verse-line,
.chapter-content.lines-mode .verse-line,
.lines-mode .verse-line {
    display: block;
    margin-bottom: 8px;
    line-height: 1.8;
    width: 100%;
}

.tehillim-verses.continuous-mode .verse,
.tehillim-text.continuous-mode .verse-line,
.chapter-content.continuous-mode .verse-line,
.continuous-mode .verse-line {
    display: inline;
    margin-bottom: 0;
    line-height: 1.6;
    width: auto;
}

.tehillim-verses.continuous-mode .verse:not(:last-child)::after,
.tehillim-text.continuous-mode .verse-line:not(:last-child)::after,
.chapter-content.continuous-mode .verse-line:not(:last-child)::after,
.continuous-mode .verse-line:not(:last-child)::after {
    content: " ";
    margin: 0 2px;
}

/* תצוגה מלאה למצב רצוף */
.continuous-mode .chapter-content,
.tehillim-display-container.continuous-mode .chapter-content,
.chapter-content.continuous-mode {
    text-align: justify;
    width: 100%;
    max-width: none;
    padding: 20px;
    font-size: inherit;
    line-height: 1.6;
}

/* תצוגה בשורות נפרדות */
.lines-mode .chapter-content,
.tehillim-display-container.lines-mode .chapter-content,
.chapter-content.lines-mode {
    width: 100%;
    max-width: none;
    padding: 20px;
    font-size: inherit;
    line-height: 1.8;
}

/* וידוא שהפונט והגדלות תואמות בכל המקרים */
.chapter-content,
.chapter-content .verse-line,
.chapter-content .verse-text,
.tehillim-text,
.tehillim-text .verse-line,
.tehillim-text .verse-text {
    font-family: inherit !important;
    font-size: inherit !important;
    line-height: inherit !important;
}

/* תיקון לתצוגת הפרקים הקבוצתית */
.chapter-container {
    width: 100%;
    max-width: none;
    margin-bottom: 30px;
}

.chapter-title {
    font-family: var(--tehillim-heading-font);
    color: var(--tehillim-primary);
    text-align: center;
    margin-bottom: 20px;
}

/* תיקון לתצוגת התהילים */
.tehillim-display-container {
    width: 100%;
    max-width: none;
}

.tehillim-content {
    width: 100%;
    max-width: none;
}

/* === מצב כהה === */
.dark-theme .tehillim-plugin,
.tehillim-plugin.dark-theme,
.tehillim-display-container.dark-theme {
    background: #1a1a1a;
    color: #e0e0e0;
}

.dark-theme .tehillim-plugin button,
.tehillim-plugin.dark-theme button,
.tehillim-display-container.dark-theme button {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

.dark-theme .tehillim-plugin button:hover,
.tehillim-plugin.dark-theme button:hover,
.tehillim-display-container.dark-theme button:hover {
    background: var(--tehillim-primary);
    color: #fff;
}

.dark-theme .tehillim-text,
.tehillim-plugin.dark-theme .tehillim-text,
.tehillim-display-container.dark-theme .tehillim-text {
    background: #2a2a2a;
    color: #e0e0e0;
}

.dark-theme .chapter-content,
.tehillim-plugin.dark-theme .chapter-content,
.tehillim-display-container.dark-theme .chapter-content {
    background: #2a2a2a;
    color: #e0e0e0;
}

.dark-theme .verse-number,
.tehillim-plugin.dark-theme .verse-number,
.tehillim-display-container.dark-theme .verse-number {
    color: var(--tehillim-primary);
}

.dark-theme .tehillim-settings-container,
.tehillim-plugin.dark-theme .tehillim-settings-container,
.tehillim-display-container.dark-theme .tehillim-settings-container {
    background: #2a2a2a;
    border: 1px solid #555;
}

.dark-theme .tehillim-settings-container select,
.tehillim-plugin.dark-theme .tehillim-settings-container select,
.tehillim-display-container.dark-theme .tehillim-settings-container select {
    background: #333;
    color: #e0e0e0;
    border: 1px solid #555;
}

/* === רספונסיביות === */
@media (max-width: 768px) {
    .tehillim-options-buttons {
        grid-template-columns: 1fr;
    }
    
    .chapters-grid-container {
        grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
    }

    .navigation-controls {
        flex-direction: column;
        gap: 8px;
    }

    .nav-btn {
        width: 100%;
    }

    .settings-row {
        flex-direction: column;
        align-items: stretch;
    }

    .display-mode-buttons,
    .theme-buttons {
        flex-wrap: wrap;
    }

    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .group-card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .group-card-footer {
        flex-direction: column;
        gap: 8px;
    }

    .join-group-btn {
        width: 100%;
        text-align: center;
    }
    
    /* עדכונים חדשים למובייל */
    .group-title {
        font-size: 20px;
        line-height: 1.3;
    }
    
    .progress-info {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }
    
    .progress-text-right,
    .progress-text-left {
        text-align: center;
        flex: none;
    }
}

@media (max-width: 480px) {
    .tehillim-plugin {
        font-size: 14px;
    }
    
    .tehillim-text {
        font-size: 16px;
        padding: 16px;
    }
    
    .chapter-title {
        font-size: 18px;
    }
    
    .popup-content {
        padding: 20px;
        margin: 20px;
    }
    
    .sharing-buttons {
        flex-direction: column;
    }
    
    .share-btn {
        width: 100%;
    }
}

/* === מניעת צבעים לא רצויים ברמה גלובלית === */
.tehillim-plugin *,
.tehillim-plugin *:focus,
.tehillim-plugin *:active,
.tehillim-plugin *:visited {
    box-shadow: none !important;
}

/* מניעת צבע #c36 או צבעים דומים */
.tehillim-plugin button:not(.active):active,
.tehillim-plugin .nav-btn:active,
.tehillim-plugin .complete-chapter-btn:active,
.tehillim-plugin .theme-btn:active,
.tehillim-plugin .display-mode-btn:active,
.tehillim-plugin .font-size-btn:active,
.tehillim-plugin .chapter-btn:active,
.tehillim-plugin .book-btn:active {
    background-color: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
    border-color: var(--tehillim-primary) !important;
}

/* כיסוי לכל מקרה של צבע לא רצוי */
.tehillim-plugin *[style*="#c36"],
.tehillim-plugin *[style*="rgb(204, 51, 102)"],
.tehillim-plugin *[style*="background:#c36"],
.tehillim-plugin *[style*="background-color:#c36"] {
    background-color: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

/* מניעת CSS inline לא רצוי */
.tehillim-plugin button[style] {
    background: var(--tehillim-shadow) !important;
    color: var(--tehillim-primary) !important;
}

.tehillim-plugin button[style]:hover {
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

.tehillim-plugin button[style].active {
    background: var(--tehillim-primary) !important;
    color: var(--tehillim-white) !important;
}

/* ביטול מוחלט של כל המסגרות והoutlines */
.tehillim-plugin button,
.display-mode-btn,
.theme-btn,
.complete-chapter-btn,
.nav-btn,
.chapter-btn,
.font-size-btn {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.tehillim-plugin button:focus,
.display-mode-btn:focus,
.theme-btn:focus,
.complete-chapter-btn:focus,
.nav-btn:focus,
.chapter-btn:focus,
.font-size-btn:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}