/* ==================== גמראפ - עיצוב מקצועי מתוקן ==================== */
/* Mobile-First Professional Design System V2 */

/* ==================== משתנים גלובליים ==================== */
:root {
    /* צבעי בסיס - חום עדין */
    --primary-olive: #5E503F;
    --primary-olive-hover: #4D4233;
    --primary-olive-light: #6F5E4C;
    --primary-olive-dark: #3E3429;
    
    /* צבעי זהב מתאימים */
    --primary-gold: #B8941F;
    --primary-gold-hover: #A0801A;
    --primary-gold-light: #D4AF37;
    --primary-gold-dark: #8C7016;
    
    /* צבעים משניים */
    --secondary-blue: #2C5F8D;
    --secondary-green: #4CAF50;
    --secondary-orange: #FF6B35;
    --secondary-purple: #7C3AED;
    
    /* צבעי רקע */
    --bg-dark: #1A1A1A;
    --bg-light: #FAFAFA;
    --bg-white: #FFFFFF;
    --bg-card: rgba(255, 255, 255, 0.95);
    --bg-overlay: rgba(26, 26, 26, 0.44); /* בהיר יותר ב-20% לנוחות העיניים */
    
    /* צבעי טקסט */
    --text-primary: #1A1A1A;
    --text-secondary: #555555;
    --text-light: #888888;
    --text-white: #FFFFFF;
    
    /* צללים */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 12px 36px rgba(0, 0, 0, 0.20);
    --shadow-olive: 0 8px 24px rgba(94, 80, 63, 0.25);
    --shadow-gold: 0 8px 24px rgba(184, 148, 31, 0.25);
    
    /* מרווחים */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-xxl: 48px;
    
    /* רדיוסים */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --radius-full: 50%;
    
    /* טיפוגרפיה */
    --font-primary: 'Assistant', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-secondary: 'Rubik', sans-serif;
    
    /* גדלי טקסט רספונסיביים */
    --text-xs: clamp(0.625rem, 1.5vw, 0.75rem);
    --text-sm: clamp(0.75rem, 2vw, 0.875rem);
    --text-base: clamp(0.875rem, 2.5vw, 1rem);
    --text-lg: clamp(1rem, 3vw, 1.125rem);
    --text-xl: clamp(1.125rem, 3.5vw, 1.25rem);
    --text-2xl: clamp(1.25rem, 4vw, 1.75rem);
    --text-3xl: clamp(1.5rem, 5vw, 2.25rem);
    
    /* אנימציות */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Z-Index */
    --z-background: -1;
    --z-base: 1;
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-overlay: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

/* ==================== מצב כהה משופר ==================== */
[data-theme="dark"] {
    --bg-primary: rgba(26, 26, 26, 0.95);
    --bg-secondary: rgba(33, 33, 33, 0.95);
    --bg-card: rgba(45, 45, 45, 0.85); /* יותר שקוף במצב כהה */
    --bg-light: rgba(55, 55, 55, 0.8);
    --bg-white: rgba(60, 60, 60, 0.9);
    --bg-overlay: rgba(0, 0, 0, 0.3); /* רקע יותר כהה במצב כהה */
    
    --text-primary: #f5f5f5;
    --text-secondary: #cccccc;
    --text-white: #ffffff;
    
    --primary-olive: #7A6B58;
    --primary-olive-light: #8A7B68;
    --primary-gold: #D4AF37;
    --primary-gold-light: #E5C876;
    
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.3);
    --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.4);
}

/* שקיפות מוגברת לרכיבים במצב כהה */
[data-theme="dark"] .daf-yomi-card {
    background: rgba(45, 45, 45, 0.8);
    border-color: rgba(212, 175, 55, 0.4);
}

[data-theme="dark"] .progress-section {
    background: rgba(45, 45, 45, 0.8);
}

[data-theme="dark"] .action-btn {
    background: rgba(45, 45, 45, 0.8);
    border-color: rgba(212, 175, 55, 0.3);
}

[data-theme="dark"] .stat-item {
    background: rgba(55, 55, 55, 0.7);
}

[data-theme="dark"] .control-btn {
    background: rgba(60, 60, 60, 0.85);
}

[data-theme="dark"] .progress-nav {
    background: rgba(60, 60, 60, 0.85);
}

/* תיקון צבעי טקסט בכפתורים במצב כהה */
[data-theme="dark"] .action-btn.select-masechet .btn-text.primary {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3); /* stroke לבן עדין */
    font-weight: 700;
}

[data-theme="dark"] .action-btn.select-masechet .btn-subtitle {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

[data-theme="dark"] .action-btn.select-masechet .achievement-badge-small {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

/* צבעים למצב כהה - כפתור מבחנים */
[data-theme="dark"] .action-btn.exams .btn-text {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

[data-theme="dark"] .action-btn.exams .btn-text.primary {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 700;
}

[data-theme="dark"] .action-btn.exams .btn-subtitle {
    color: #000000 !important; /* שחור ניגודי לרקע זהב */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* תיקון צבעי טקסט בכפתור זיכוי הרבים - עדין יותר וקריא */
.zikui-btn {
    color: rgba(26, 26, 26, 0.85) !important; /* צבע עדין יותר עם שקיפות */
}

.zikui-btn .zikui-main {
    color: rgba(26, 26, 26, 0.85) !important; /* צבע עדין יותר עם שקיפות */
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4); /* stroke עדין יותר */
    font-weight: 600; /* משקל פונט מאוזן */
}

.zikui-btn .btn-badge {
    color: rgba(26, 26, 26, 0.75) !important; /* עוד יותר עדין לטקסט משני */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* מצב כהה - אותו צבע עדין */
[data-theme="dark"] .zikui-btn {
    color: rgba(26, 26, 26, 0.85) !important; /* אותו צבע כמו במצב בהיר */
}

[data-theme="dark"] .zikui-btn .zikui-main {
    color: rgba(26, 26, 26, 0.85) !important; /* אותו צבע כמו במצב בהיר */
    text-shadow: 0 1px 3px rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

[data-theme="dark"] .zikui-btn .btn-badge {
    color: rgba(26, 26, 26, 0.75) !important; /* אותו צבע כמו במצב בהיר */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* ==================== איפוס וסגנונות בסיס ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    direction: rtl;
    font-size: 16px;
    scroll-behavior: smooth;
    height: 100%;
    overflow-x: hidden; /* מונע גלילה אופקית */
    width: 100%;
    max-width: 100%;
}

body {
    font-family: var(--font-primary);
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-light);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
    transition: background-color var(--transition-base), color var(--transition-base);
}

/* ==================== רקע מטושטש ==================== */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/Backgrounds/רקע.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(8px);
    z-index: var(--z-background);
}

.background-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-overlay);
    backdrop-filter: blur(5px);
    z-index: var(--z-background);
    transition: background var(--transition-base);
}

/* ==================== Header מקצועי ==================== */
.main-header {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #8B7355 0%, #A0956B 50%, #B8A678 100%);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(139, 115, 85, 0.4);
    z-index: var(--z-sticky);
    transition: all var(--transition-base);
    border-bottom: 1px solid rgba(184, 166, 120, 0.3);
    border-radius: 0 0 20px 20px;
    margin: 0 8px;
    position: relative;
    overflow: hidden;
}

/* אפקט זוהר עדין - רק במחשב */
@media (min-width: 1024px) {
    .main-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
        animation: headerShine 3s ease-in-out infinite;
        z-index: 1;
    }

    @keyframes headerShine {
        0% { left: -100%; }
        50% { left: 100%; }
        100% { left: 100%; }
    }
}

[data-theme="dark"] .main-header {
    background: linear-gradient(135deg, #2A2A2A 0%, #3A3A3A 50%, #4A4A4A 100%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .brand-title {
    background: linear-gradient(135deg, #FFFFFF 0%, #FFFEF7 25%, #FFE55C 50%, #FFD700 75%, #DAA520 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 3px 12px rgba(255, 215, 0, 0.5), 0 1px 4px rgba(0, 0, 0, 0.8);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.8));
}

[data-theme="dark"] .brand-subtitle {
    color: rgba(255, 255, 255, 0.85);
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

/* אפקט במצב כהה רק בדסקטופ */
@media (hover: hover) and (min-width: 1024px) {
    [data-theme="dark"] .brand-section:hover {
        background: rgba(255, 255, 255, 0.05);
        box-shadow: 0 4px 20px rgba(218, 165, 32, 0.3);
    }
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-md) var(--spacing-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* לוגו וטקסט */
.brand-section {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    transition: all 0.4s ease;
    padding: var(--spacing-xs);
    border-radius: var(--radius-lg);
    position: relative;
    z-index: 3; /* גבוה יותר מאנימציית ההדר */
}

/* אפקט לחיצה עדין לכל המסכים */
.brand-section:active {
    transform: scale(0.98);
    transition: transform 0.1s ease;
}

/* אפקטי hover רק בדסקטופ */
@media (hover: hover) and (min-width: 1024px) {
    .brand-section:hover {
        transform: translateY(-1px);
        background: rgba(255, 255, 255, 0.08);
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 20px rgba(218, 165, 32, 0.2);
    }

    .brand-section:hover .logo {
        transform: scale(1.15) rotate(5deg);
        filter: brightness(1.2) drop-shadow(0 0 15px rgba(255, 215, 0, 0.4));
    }

    .brand-section:hover .brand-title {
        filter: drop-shadow(0 2px 8px rgba(255, 215, 0, 0.6));
    }

    .brand-section:hover .brand-subtitle {
        opacity: 1;
        transform: translateX(-2px);
    }
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    z-index: 4; /* גבוה יותר מהכל */
    border-radius: var(--radius-md);
}

/* אפקטי לוגו רק בדסקטופ */
@media (hover: hover) and (min-width: 1024px) {
    .logo::before {
        content: '';
        position: absolute;
        top: -2px;
        left: -2px;
        right: -2px;
        bottom: -2px;
        background: linear-gradient(45deg, transparent, rgba(255, 215, 0, 0.3), transparent);
        border-radius: var(--radius-md);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .brand-section:hover .logo::before {
        opacity: 1;
        animation: logoGlow 2s ease-in-out infinite;
    }

    @keyframes logoGlow {
        0%, 100% { transform: scale(1); opacity: 0.3; }
        50% { transform: scale(1.1); opacity: 0.6; }
    }
}

.brand-text {
    display: block;
    position: relative;
    z-index: 4; /* גבוה יותר מהכל */
}

.brand-title {
    font-family: 'Frank Ruhl Libre', 'Heebo', serif;
    font-size: calc(var(--text-xl) * 1.2);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    letter-spacing: 0.02em;
    position: relative;
}

.brand-subtitle {
    font-family: 'Varela Round', 'Assistant', sans-serif;
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    line-height: 1.3;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
    font-weight: 500;
    letter-spacing: 0.03em;
    position: relative;
    opacity: 0.9;
    transition: all 0.3s ease;
}

/* תפריט דסקטופ */
.desktop-nav {
    display: none;
}

/* ==================== תוכן ראשי ==================== */
.main-content {
    padding: var(--spacing-sm) var(--spacing-xs);
    padding-bottom: calc(70px + var(--spacing-lg));
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: var(--z-base);
    width: 100%; /* וידוא רוחב מלא */
    box-sizing: border-box; /* כולל padding ברוחב */
}

.center-content {
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    box-sizing: border-box; /* כולל padding ברוחב */
}

/* ==================== מרווחים קטנים יותר במובייל ==================== */
.hero-section,
.daf-yomi-section,
.progress-section,
.action-buttons {
    margin-bottom: var(--spacing-md); /* קטן יותר במובייל */
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ==================== Hero Section משופר ==================== */
/* ==================== הודעות פתיחה משודרגות - קטן ואלגנטי ==================== */
.hero-section {
    text-align: center;
    animation: fadeInUp 0.8s ease both;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.dedication-message {
    background: rgba(184, 148, 31, 0.9);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md); /* padding מעט יותר גדול */
    border-radius: var(--radius-md);
    font-size: var(--text-sm); /* מעט יותר גדול */
    font-weight: 600;
    margin: 0 auto var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    display: inline-block; /* חזרה ל-inline-block לגבולות הטקסט */
    text-align: center;
    font-family: var(--font-secondary);
    white-space: nowrap; /* מונע שבירת שורות */
    max-width: fit-content; /* גודל לפי התוכן */
}

.achievement-badge {
    background: linear-gradient(135deg, var(--secondary-green), #66BB6A);
    color: var(--text-white);
    padding: var(--spacing-xs) var(--spacing-md); /* padding קטן יותר */
    border-radius: var(--radius-lg); /* פחות עגול */
    font-size: var(--text-xs); /* קטן יותר */
    font-weight: 600;
    margin-bottom: var(--spacing-sm);
    box-shadow: var(--shadow-sm);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    animation: bounceIn 1s ease 0.5s both;
}

.achievement-badge i {
    font-size: 1em; /* קטן יותר */
}

.welcome-message {
    font-size: var(--text-lg); /* קטן יותר */
    color: var(--text-white); /* לבן בכל המצבים */
    margin: 0;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); /* צל לקריאות טובה יותר */
}

.username {
    color: var(--primary-gold);
    font-weight: 700;
    font-family: var(--font-secondary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ==================== דף היומי - קטן ושקוף יותר ==================== */
.daf-yomi-section {
    animation: fadeInUp 0.8s ease 0.1s both;
}

.daf-yomi-card {
    background: rgba(255, 255, 255, 0.85); /* יותר שקוף */
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md); /* padding קטן יותר */
    box-shadow: var(--shadow-md); /* צל קטן יותר */
    border: 1px solid rgba(184, 148, 31, 0.3);
    transition: all var(--transition-base);
    max-width: 500px; /* רוחב קטן יותר */
    margin: 0 auto;
}

.daf-yomi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-gold);
    border-color: var(--primary-gold);
}

.daf-yomi-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.daf-yomi-header i {
    font-size: 1.3em;
    color: var(--primary-gold);
}

.daf-yomi-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.daf-yomi-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);
}

.daf-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.daf-name {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--primary-gold);
    font-family: var(--font-secondary);
}

.daf-date {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.daf-summary-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: none;
    font-size: var(--text-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
}

/* ==================== Progress Section - קטן ושקוף יותר ==================== */
.progress-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md); /* padding קטן יותר */
    background: rgba(255, 255, 255, 0.85); /* יותר שקוף */
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    animation: fadeInUp 0.8s ease 0.2s both;
    width: 100%;
    max-width: 500px; /* רוחב מוגבל */
    margin: 0 auto;
}

.stats-container {
    display: flex;
    justify-content: space-around;
    width: 100%;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.stat-item {
    background: rgba(250, 250, 250, 0.8); /* יותר שקוף */
    border-radius: var(--radius-md);
    padding: var(--spacing-sm); /* padding קטן יותר */
    flex-grow: 1;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.stat-icon {
    font-size: 20px; /* קטן יותר */
    margin-bottom: var(--spacing-xs);
    height: 35px; /* קטן יותר */
    width: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(250, 250, 250, 0.8);
    box-shadow: var(--shadow-sm);
}

.stat-icon .fa-users { color: var(--secondary-blue); }
.stat-icon.flame .fa-fire-alt { color: var(--secondary-orange); }

.stat-label {
    font-size: 12px; /* קטן יותר */
    color: var(--text-secondary);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.stat-value {
    font-size: 18px; /* קטן יותר */
    font-weight: 700;
    color: var(--text-primary);
}

.progress-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    width: 100%;
}

.progress-nav {
    width: 35px; /* קטן יותר */
    height: 35px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9);
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.progress-nav:hover {
    background: var(--primary-gold);
    color: var(--text-white);
    transform: scale(1.1);
}

.progress-circle-container {
    position: relative;
    width: 140px; /* קטן יותר */
    height: 140px;
}

.progress-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-info {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.progress-percentage {
    font-size: var(--text-xl); /* קטן יותר */
    font-weight: 700;
    color: var(--primary-gold);
    display: block;
}

.masechet-name {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
}

.continue-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg); /* padding קטן יותר */
    border-radius: var(--radius-xl);
    font-size: var(--text-sm); /* קטן יותר */
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    box-shadow: var(--shadow-md);
}

.continue-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ==================== כפתורי פעולה - קטנים יותר ושקופים ==================== */
.action-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 קוביות בשורה הראשונה */
    gap: var(--spacing-sm);
    width: 100%;
    max-width: 600px; /* רוחב מוגבל ל-3 כפתורים */
    margin: 0 auto;
    position: relative; /* כדי לאפשר מיקום מיוחד לכפתור בחר מסכת */
}

/* כפתור בחר מסכת בשורה השנייה ממורכז */
.action-btn.select-masechet {
    grid-column: 2; /* ממורכז בשורה השנייה */
    grid-row: 2; /* בשורה השנייה */
    justify-self: center; /* ממורכז אופקית */
    width: 100%;
    max-width: 200px; /* רוחב קבוע לכפתור */
}

.action-btn {
    background: rgba(255, 255, 255, 0.85); /* יותר שקוף */
    border: 2px solid rgba(184, 148, 31, 0.2);
    border-radius: var(--radius-lg);
    padding: var(--spacing-md); /* padding קטן יותר */
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm); /* gap קטן יותר */
    box-shadow: var(--shadow-sm);
}

.action-btn:hover {
    transform: translateY(-2px); /* hover קטן יותר */
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-gold);
    background: rgba(255, 255, 255, 0.95);
}

.action-btn.select-masechet {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    border-color: var(--primary-gold);
    position: relative;
    overflow: hidden; /* חזרה ל-hidden כדי להכיל את האנימציות */
}

/* אפקט זוהר לכפתור בחר מסכת */
.action-btn.select-masechet::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

.action-btn.select-masechet::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.action-btn.select-masechet:hover::after {
    width: 300px;
    height: 300px;
}

.btn-icon-wrapper {
    width: 50px; /* קטן יותר */
    height: 50px;
    border-radius: var(--radius-full);
    background: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3em; /* קטן יותר */
    color: var(--primary-gold);
    box-shadow: var(--shadow-sm);
    position: relative;
    z-index: 2;
}

.btn-icon-wrapper.primary {
    background: var(--text-white);
    color: var(--primary-gold);
}

.btn-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.btn-text {
    font-size: var(--text-base); /* קטן יותר */
    font-weight: 600;
    color: var(--text-primary);
    display: block;
    margin-bottom: var(--spacing-xs);
}

.btn-text.primary {
    color: var(--text-white);
}

.btn-subtitle {
    font-size: var(--text-xs); /* קטן יותר */
    color: var(--text-secondary);
    line-height: 1.3;
}

/* בדג' קטן בתוך כפתור בחר מסכת */
.achievement-badge-small {
    position: absolute;
    top: 4px;
    right: 4px;
    background: linear-gradient(135deg, var(--secondary-green), #66BB6A);
    color: var(--text-white);
    padding: 3px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 3px;
    animation: bounceIn 1s ease 0.5s both;
    z-index: 3;
    border: 1px solid var(--text-white);
}

/* עיצוב מיוחד לכפתור מבחנים - זהה לכפתור בחר מסכת */
.action-btn.exams {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    border-color: var(--primary-gold);
    position: relative;
    overflow: hidden;
}

.action-btn.exams .btn-icon-wrapper {
    background: var(--text-white);
    color: var(--primary-gold);
    box-shadow: var(--shadow-sm);
}

.action-btn.exams .btn-text {
    color: var(--text-white);
    font-weight: 600;
}

.action-btn.exams .btn-text.primary {
    color: var(--text-white);
}

.action-btn.exams .btn-subtitle {
    color: var(--text-secondary);
}

/* אפקט זוהר לכפתור מבחנים - זהה לכפתור בחר מסכת */
.action-btn.exams::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

.action-btn.exams::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.action-btn.exams:hover::after {
    width: 300px;
    height: 300px;
}

.action-btn.exams:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.achievement-badge-small i {
    font-size: 10px;
}

/* ==================== דף היומי עם אנימציות מיוחדות ==================== */
.daf-summary-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    border: none;
    font-size: var(--text-base);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-md);
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.daf-summary-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.daf-summary-btn.playing {
    background: linear-gradient(135deg, var(--secondary-green), #66BB6A);
    animation: pulse 2s ease-in-out infinite;
}

.daf-summary-btn .play-pause-icon {
    transition: all var(--transition-base);
}

.daf-summary-btn.playing .play-pause-icon {
    animation: spin 2s linear infinite;
}

/* אנימציית גלי סאונד כשמשמיע */
.daf-summary-btn.playing::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    animation: soundWave 1.5s ease-out infinite;
    pointer-events: none;
}

@keyframes soundWave {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 200%;
        height: 200%;
        opacity: 0;
    }
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(76, 222, 128, 0.7);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(76, 222, 128, 0);
    }
}

/* ==================== זיכוי הרבים ומצב כהה - קטן ואלגנטי ==================== */
.bottom-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    max-width: 400px; /* רוחב מוגבל */
    margin-left: auto;
    margin-right: auto;
}

.zikui-btn {
    background: linear-gradient(135deg, var(--primary-gold), var(--primary-gold-light));
    color: var(--text-white);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--radius-lg);
    font-size: var(--text-sm);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    box-shadow: var(--shadow-gold);
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 300px;
    justify-content: center;
    text-align: center;
}

.zikui-main {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
    position: relative;
    z-index: 2;
}

.zikui-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-gold);
}

.zikui-btn i {
    font-size: 1.1em;
}

/* אפקט זוהר לכפתור זיכוי הרבים - כמו בחר מסכת */
.zikui-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transform: rotate(45deg);
    animation: shimmer 3s ease-in-out infinite;
}

.zikui-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.zikui-btn:hover::after {
    width: 300px;
    height: 300px;
}

.btn-badge {
    font-size: var(--text-xs);
    font-weight: 400;
    opacity: 0.9;
    display: block;
    margin-top: var(--spacing-xs);
    position: relative;
    z-index: 2;
}

/* כפתורי נגישות ומצב כהה - קטן יותר */
.accessibility-controls {
    display: flex;
    justify-content: center;
    width: 100%;
}

.control-btn {
    width: 40px; /* קטן יותר */
    height: 40px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.9); /* יותר שקוף */
    border: 2px solid var(--primary-gold);
    color: var(--primary-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.control-btn:hover {
    background: var(--primary-gold);
    color: var(--text-white);
    transform: scale(1.05); /* hover קטן יותר */
}

.control-btn i {
    font-size: 1em; /* קטן יותר */
}

/* ==================== Mobile Navigation משופר ==================== */
.mobile-nav {
    position: fixed;
    bottom: 0; /* קבוע בתחתית המסך */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #8B7355 0%, #A0956B 50%, #B8A678 100%); /* כמו ההדר */
    backdrop-filter: blur(20px);
    border-radius: 20px 20px 0 0; /* עיגול רק בפינות העליונות */
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(139, 115, 85, 0.4); /* צל כלפי מעלה */
    border-top: 1px solid rgba(184, 166, 120, 0.3); /* גבול עליון */
    z-index: var(--z-sticky); /* קבוע אבל לא overlay */
    transition: all var(--transition-base);
    min-height: 60px; /* גובה קבוע */
    width: 100%;
    box-sizing: border-box;
}

/* הסרת אפקטי זוהר מיותרים לנב קבוע */
.mobile-nav::before {
    display: none; /* מסתיר את אפקט הזוהר */
}

/* הסרת אנימציות מיותרות לנב קבוע */
@keyframes navGlow {
    /* אנימציה מושבתת לנב קבוע */
}

@keyframes navShine {
    /* אנימציה מושבתת לנב קבוע */
}

[data-theme="dark"] .mobile-nav {
    background: linear-gradient(135deg, #2A2A2A 0%, #3A3A3A 50%, #4A4A4A 100%); /* כמו ההדר במצב כהה */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.6);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: rgba(255, 255, 255, 0.85);
    transition: all var(--transition-base);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-md);
    cursor: pointer;
    position: relative;
    z-index: 2;
    background: transparent;
    border: none;
    outline: none;
    min-width: 45px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-item i {
    font-size: 20px;
    margin-bottom: 2px;
    transition: all var(--transition-base);
}

.nav-text {
    font-size: var(--text-xs);
    font-weight: 500;
    margin: 0;
    text-align: center;
    line-height: 1;
    white-space: nowrap;
}

.nav-item:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

.nav-item.continue {
    /* הסרת הבועה - כפתור רגיל כמו כל השאר */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.85);
    font-weight: 500; /* כמו שאר הכפתורים */
}

.nav-item.continue:hover {
    /* הובר רגיל כמו שאר הכפתורים */
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    border: none;
}

.nav-item.active {
    /* זה יופיע רק כשהדף פעיל */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    color: #FFFFFF;
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-item {
    color: rgba(255, 255, 255, 0.7);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .nav-item:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .nav-item.active {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav-item.continue {
    /* מצב כהה - כפתור רגיל */
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500; /* כמו שאר הכפתורים */
}

[data-theme="dark"] .nav-item.continue:hover {
    /* הובר רגיל במצב כהה */
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    border: none;
}

/* ==================== אנימציות ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes shine {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(5px); }
}

@keyframes bounceIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.1);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==================== התאמות רספונסיביות ==================== */
@media (max-width: 360px) {
    /* מניעת תזוזה צידית במכשירים קטנים */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    /* שיפור ההדר במכשירים קטנים */
    .header-container {
        padding: var(--spacing-xs) var(--spacing-sm);
        min-height: 56px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        justify-content: flex-start; /* צמוד לימין במסכים קטנים */
    }
    
    .logo {
        height: 32px;
        width: 32px;
    }
    
    .brand-title {
        font-size: 16px;
    }
    
    .brand-subtitle {
        font-size: 10px;
    }
    
    .brand-section {
        gap: 6px;
    }
    
    /* נב קבוע במכשירים קטנים */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: var(--spacing-xs) var(--spacing-sm);
        border-radius: 12px 12px 0 0; /* עיגול קטן עוד יותר במכשירים קטנים */
        width: 100%;
        min-height: 56px;
        box-sizing: border-box;
    }
    
    .main-content {
        padding-bottom: 60px; /* מקום קטן יותר לנב במכשירים קטנים */
    }
    
    .nav-text {
        font-size: 10px;
    }

    .nav-item {
        padding: var(--spacing-xs) 4px;
        min-width: 40px;
    }

    .nav-item i {
        font-size: 16px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .header-container {
        padding: var(--spacing-md) var(--spacing-lg);
        min-height: 70px;
        justify-content: flex-start; /* צמוד לימין גם בטאבלט */
    }
    
    .logo {
        height: 45px;
        width: 45px;
    }
    
    .brand-title {
        font-size: 24px;
        letter-spacing: 0.01em;
    }
    
    .brand-subtitle {
        font-size: 14px;
        letter-spacing: 0.02em;
    }
    
    .main-content {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .progress-circle-container {
        width: 160px;
        height: 160px;
    }
    
    /* טאבלט: כפתורים בעמודה אחת למראה נקי ומסודר */
    .action-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-lg);
        max-width: 400px;
        margin: 0 auto;
    }
    
    .action-btn {
        width: 100%;
        max-width: 350px;
    }
    
    /* סדר מיוחד בטאבלט: מבחנים, חברותא, בחר מסכת, חברותא-בוט */
    .action-buttons .exams {
        order: 1;
    }
    
    .action-buttons .chavruta {
        order: 2;
    }
    
    .action-buttons .select-masechet {
        order: 3;
    }
    
    .action-buttons .bot {
        order: 4;
    }

    .hero-section,
    .daf-yomi-section,
    .progress-section,
    .action-buttons {
        margin-bottom: var(--spacing-lg);
    }
    
    .bottom-section {
        margin-bottom: var(--spacing-xl);
    }
}

@media (min-width: 768px) {
    .header-container {
        padding: var(--spacing-md) var(--spacing-lg);
        min-height: 70px;
    }
    
    .logo {
        height: 42px;
        width: 42px;
    }
    
    .brand-title {
        font-size: 20px;
    }
    
    .brand-subtitle {
        font-size: 12px;
    }
    
    .main-content {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .progress-circle-container {
        width: 160px;
        height: 160px;
    }

    .hero-section,
    .daf-yomi-section,
    .progress-section,
    .action-buttons {
        margin-bottom: var(--spacing-lg);
    }
    
    .bottom-section {
        margin-bottom: var(--spacing-xl);
    }
}

@media (min-width: 1024px) {
    .desktop-nav {
        display: block;
    }
    
    .nav-list {
        display: flex;
        list-style: none;
        gap: var(--spacing-md);
    }
    
    .nav-link {
        display: flex;
        align-items: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-sm) var(--spacing-md);
        color: rgba(255, 255, 255, 0.9);
        text-decoration: none;
        border-radius: var(--radius-md);
        font-weight: 500;
        font-size: var(--text-sm);
        transition: all var(--transition-base);
        position: relative;
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
        background: transparent;
        border: 1px solid transparent;
    }

    .nav-link:hover {
        background: rgba(255, 255, 255, 0.15);
        color: #FFFFFF;
        transform: translateY(-1px);
        border-color: rgba(255, 255, 255, 0.2);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .nav-link.active {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
        color: #FFFFFF;
        font-weight: 600;
        border: 1px solid rgba(255, 255, 255, 0.4);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
    
    [data-theme="dark"] .nav-link {
        color: rgba(255, 255, 255, 0.8);
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
    }

    [data-theme="dark"] .nav-link:hover {
        background: rgba(255, 255, 255, 0.1);
        color: #FFFFFF;
        border-color: rgba(255, 255, 255, 0.15);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6);
    }
    
    [data-theme="dark"] .nav-link.active {
        background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.08));
        color: #FFFFFF;
        border: 1px solid rgba(255, 255, 255, 0.2);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    }
    
    .mobile-nav {
        display: none;
    }
    
    .main-content {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
    
    .progress-circle-container {
        width: 200px;
        height: 200px;
    }
    
    .action-buttons {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-lg);
    }
}

@media (min-width: 1400px) {
    .main-content {
        padding: var(--spacing-xxl) var(--spacing-xl);
    }
    
    .center-content {
        max-width: 1200px;
    }

    .hero-section,
    .daf-yomi-section,
    .progress-section,
    .action-buttons {
        margin-bottom: calc(var(--spacing-xl) * 1.2);
    }
}

/* ==================== התאמות רספונסיביות למובייל ==================== */
@media (max-width: 768px) {
    /* מניעת תזוזה צידית */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100%;
    }
    
    /* שיפור ההדר במובייל */
    .main-header {
        padding: 0;
        margin: 0;
        border-radius: 0 0 16px 16px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .header-container {
        padding: var(--spacing-sm) var(--spacing-md);
        min-height: 60px;
        display: flex;
        align-items: center;
        justify-content: flex-start; /* צמוד לימין במובייל/טאבלט */
        width: 100%;
        box-sizing: border-box;
    }
    
    .brand-section {
        gap: var(--spacing-sm);
        display: flex;
        align-items: center;
        justify-content: flex-start; /* יישור לימין במובייל */
        margin-right: var(--spacing-xs); /* מרווח קטן מהקצה הימני */
    }
    
    .logo {
        height: 36px;
        width: 36px;
        flex-shrink: 0;
    }
    
    .brand-text {
        display: flex;
        flex-direction: column;
        align-items: flex-start; /* יישור הטקסט לימין במובייל */
        justify-content: center;
    }
    
    .brand-title {
        font-size: 18px;
        line-height: 1.1;
        margin: 0;
        font-weight: 700;
    }
    
    .brand-subtitle {
        font-size: 11px;
        line-height: 1.2;
        margin: 0;
        opacity: 0.9;
    }
    
    /* מרווחים קטנים יותר במובייל */
    .main-content {
        padding: var(--spacing-xs);
        padding-bottom: 70px; /* מקום לנב קבוע */
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .center-content {
        width: 100%;
        max-width: 100%;
        padding: 0;
        margin: 0 auto;
        box-sizing: border-box;
    }

    /* נב קבוע במובייל */
    .mobile-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        padding: var(--spacing-sm) var(--spacing-md);
        border-radius: 16px 16px 0 0; /* עיגול קטן יותר במובייל */
        width: 100%;
        box-sizing: border-box;
    }

    /* דף היומי קטן יותר במובייל */
    .daf-yomi-card {
        padding: var(--spacing-sm);
        max-width: 100%;
        margin: 0 auto; /* ממורכז */
        border-radius: var(--radius-xl); /* עיגוליות יותר גדולה במובייל */
    }
    
    .daf-yomi-title {
        font-size: var(--text-base);
    }

    .daf-name {
        font-size: var(--text-lg);
    }
    
    .daf-summary-btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: var(--text-sm);
    }
    
    /* Progress section קטן יותר במובייל */
    .progress-section {
        padding: var(--spacing-sm);
        max-width: 100%;
        margin: 0 auto var(--spacing-md) auto; /* ממורכז עם מרווח אחיד */
        display: flex;
        flex-direction: column;
        align-items: center;
        border-radius: var(--radius-xl); /* עיגוליות יותר גדולה במובייל */
    }
    
    .continue-btn {
        border-radius: var(--radius-xl); /* עיגוליות יותר גדולה במובייל */
    }
    
    .progress-circle-container {
        width: 120px;
        height: 120px;
    }
    
    .progress-percentage {
        font-size: var(--text-lg);
    }
    
    .stat-icon {
        width: 30px;
        height: 30px;
        font-size: 16px;
    }
    
    .stat-value {
        font-size: 16px;
    }
    
    .stat-label {
        font-size: 11px;
    }

    /* כפתורי פעולה במובייל - עמודה אחת במרכז עם סדר מיוחד */
    .action-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md); /* מרווח אחיד כמו בין החלקים */
        max-width: 100%;
        margin: 0 auto var(--spacing-md) auto; /* ממורכז עם מרווח אחיד */
        padding: 0;
    }
    
    /* סדר מיוחד במובייל: מבחנים, חברותא, בחר מסכת, חברותא-בוט */
    .action-buttons .exams {
        order: 1;
    }
    
    .action-buttons .chavruta {
        order: 2;
    }
    
    .action-buttons .select-masechet {
        order: 3;
    }
    
    .action-buttons .bot {
        order: 4;
    }
    
    .action-btn {
        padding: var(--spacing-sm);
        gap: var(--spacing-xs);
        min-height: auto; /* הסרת גובה מינימלי */
        width: 100%;
        max-width: 280px; /* רוחב קבוע לכל הכפתורים */
        border-radius: var(--radius-xl); /* עיגוליות יותר גדולה במובייל */
    }
    
    /* כפתור בחר מסכת במובייל - אותו גודל כמו שאר הכפתורים */
    .action-btn.select-masechet {
        grid-column: auto; /* ביטול המיקום המיוחד */
        grid-row: auto;
        justify-self: auto;
        width: 100%;
        max-width: 280px; /* אותו רוחב כמו שאר הכפתורים */
    }
    
    .btn-icon-wrapper {
        width: 40px; /* קטן יותר */
        height: 40px;
        font-size: 1.1em;
    }
    
    .btn-text {
        font-size: 12px; /* קטן יותר */
    }
    
    .btn-subtitle {
        font-size: 10px; /* קטן יותר */
    }
    
    /* בדג' קטן עוד יותר במובייל */
    .achievement-badge-small {
        top: 2px;
        right: 2px;
        padding: 2px 4px;
        font-size: 7px;
        border-radius: 6px;
        gap: 2px;
    }
    
    .achievement-badge-small i {
        font-size: 7px;
    }
    
    /* כפתור מבחנים במובייל - זהה לכפתור בחר מסכת */
    .action-btn.exams:hover {
        transform: translateY(-2px); /* hover קטן יותר במובייל */
        box-shadow: var(--shadow-lg);
    }
    
    .action-btn.exams .btn-icon-wrapper {
        box-shadow: var(--shadow-sm); /* צל זהה לכפתור בחר מסכת */
    }
    
    /* Bottom section קטן יותר במובייל עם מרווח מהצדדים */
    .bottom-section {
        max-width: 100%;
        margin: 0 auto var(--spacing-md) auto; /* ממורכז עם מרווח אחיד */
    }
    
    .zikui-btn {
        max-width: 100%;
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 12px;
        border-radius: var(--radius-xl); /* עיגוליות יותר גדולה במובייל */
    }
    
    .zikui-main {
        gap: 6px;
    }
    
    .btn-badge {
        font-size: 10px;
        margin-top: 2px;
    }
    
    .control-btn {
        width: 35px;
        height: 35px;
    }
    
    .control-btn i {
        font-size: 0.9em;
    }
    
    /* בדג'ים קטנים יותר במובייל */
    .dedication-message {
        font-size: 12px; /* מעט יותר גדול במובייל */
        padding: 6px var(--spacing-sm);
        margin: 0 auto var(--spacing-sm);
        display: inline-block;
        text-align: center;
        white-space: nowrap;
        max-width: fit-content;
    }
    
    .welcome-message {
        font-size: var(--text-base);
        text-align: center;
        margin: 0 auto;
    }
}

/* הסרת האפקט הכחול מכפתורים במצב טלפון/טאבלט */
* {
    -webkit-tap-highlight-color: transparent !important;
}

button, 
.btn, 
a, 
input[type="button"], 
input[type="submit"], 
input[type="reset"],
.clickable,
.interactive {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

button:focus, 
.btn:focus, 
a:focus, 
input[type="button"]:focus, 
input[type="submit"]:focus, 
input[type="reset"]:focus,
.clickable:focus,
.interactive:focus {
    outline: none !important;
    -webkit-tap-highlight-color: transparent !important;
}


