/* ============================================
   ХИТАС ДЛЯ ДЕТЕЙ - STYLES
   ============================================ */

/* ============================================
   CSS VARIABLES
   ============================================ */
:root {
    /* Category Colors */
    --color-chumash: #FF6B6B;
    --color-tehillim: #4ECDC4;
    --color-tanya: #45B7D1;
    --color-rambam: #96CEB4;
    --color-hayom: #FFEAA7;
    --color-idea: #DFE6E9;
    
    /* Theme Colors */
    --color-primary: #667eea;
    --color-secondary: #764ba2;
    --color-success: #4CAF50;
    --color-error: #f44336;
    --color-warning: #ff9800;
    
    /* Text Colors */
    --color-text-dark: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    
    /* Background Colors */
    --color-bg-primary: #ffffff;
    --color-bg-secondary: #f8f9fa;
    --color-bg-tertiary: #e9ecef;
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 15px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 25px rgba(0,0,0,0.15);
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 10px;
    --radius-lg: 15px;
    
    /* Spacing */
    --space-xs: 5px;
    --space-sm: 10px;
    --space-md: 15px;
    --space-lg: 20px;
    --space-xl: 30px;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 
                 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    min-height: 100vh;
    padding-bottom: 80px;
    overflow-x: hidden;
    line-height: 1.6;
    color: var(--color-text-dark);
}

/* ============================================
   HEADER
   ============================================ */
.app-header {
    background: linear-gradient(135deg, #FFA500, #FF6B6B);
    color: white;
    padding: var(--space-lg);
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-md);
    position: relative;
}

.bh-corner {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 1px;
}


.app-header h1 {
    font-size: 24px;
    margin-bottom: var(--space-xs);
    font-weight: 600;
}

.app-header p {
    font-size: 14px;
    opacity: 0.9;
}

/* ============================================
   CONTAINER & LAYOUT
   ============================================ */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-lg);
}

.card {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    background: var(--color-primary);
    color: white;
    border: none;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all var(--transition-fast);
    border: 2px solid transparent;
}

.btn:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-sm);
}

.btn:active {
    transform: scale(0.95);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn:focus {
    outline: none;
    border-color: rgba(255,255,255,0.5);
}

/* ============================================
   DATE CARD
   ============================================ */
.date-card h2 {
    color: var(--color-text-dark);
    font-size: 22px;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.dedication {
    color: var(--color-text-light);
    font-size: 14px;
    margin-bottom: var(--space-md);
    line-height: 1.5;
}

.date-navigation {
    display: flex;
    justify-content: center;
    gap: var(--space-sm);
    flex-wrap: wrap;
}

/* ============================================
   MAZEL TOV SECTION
   ============================================ */
.mazel-tov-section {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
    animation: fadeIn var(--transition-base);
}

.mazel-tov-section h3 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-md);
    text-align: center;
    font-size: 20px;
}

.mazel-tov-item {
    background: var(--color-bg-primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-sm);
    border-left: 4px solid #ffa726;
}

.mazel-tov-item:last-child {
    margin-bottom: 0;
}

.mazel-tov-item h4 {
    color: var(--color-primary);
    margin-bottom: var(--space-xs);
}

.mazel-tov-item p {
    color: var(--color-text-light);
    font-size: 14px;
    margin: 3px 0;
}

/* ============================================
   PROGRESS CARD
   ============================================ */
.progress-stats {
    display: flex;
    justify-content: space-around;
    margin-bottom: var(--space-md);
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.progress-stat {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.progress-stat .value {
    font-size: 28px;
    font-weight: bold;
    color: var(--color-primary);
    animation: countUp var(--transition-slow);
}

.progress-stat .label {
    font-size: 12px;
    color: var(--color-text-light);
    margin-top: var(--space-xs);
}

.progress-bar-container {
    background: var(--color-bg-tertiary);
    border-radius: var(--radius-md);
    height: 20px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--color-primary), var(--color-success));
    height: 100%;
    transition: width var(--transition-slow);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* ============================================
   TILES GRID
   ============================================ */
.tiles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.tile {
    background: var(--color-bg-primary);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    box-shadow: var(--shadow-md);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.tile::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition-base);
}

.tile:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.tile:hover::before {
    transform: scaleX(1);
}

.tile:active {
    transform: translateY(-2px);
}

.tile-header {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    margin-bottom: var(--space-md);
    padding-left: var(--space-sm);
    border-left: 4px solid currentColor;
}

.tile-icon {
    font-size: 32px;
}

.tile-title-group {
    flex: 1;
}

.tile-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--color-text-dark);
}

.tile-subtitle {
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: 3px;
}

.tile-preview {
    font-size: 14px;
    color: var(--color-text-light);
    line-height: 1.6;
    margin: var(--space-md) 0;
    max-height: 80px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.tile-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-md);
    border-top: 1px solid var(--color-bg-tertiary);
}

.tile-points {
    font-weight: 600;
    color: var(--color-primary);
    font-size: 16px;
}

.tile-status {
    padding: 5px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.tile-status.completed {
    background: #e8f5e9;
    color: var(--color-success);
}

.tile-status.pending {
    background: #fff3e0;
    color: var(--color-warning);
}

/* Category-specific tile colors */
.tile[data-category="chumash"] { color: var(--color-chumash); }
.tile[data-category="tehillim"] { color: var(--color-tehillim); }
.tile[data-category="tanya"] { color: var(--color-tanya); }
.tile[data-category="rambam"] { color: var(--color-rambam); }
.tile[data-category="hayom-yom"] { color: var(--color-hayom); }
.tile[data-category="idea"] { color: var(--color-idea); }

/* ============================================
   SECTION VIEW (FULLSCREEN)
   ============================================ */
.section-view {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg-primary);
    z-index: 200;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.section-view.active {
    display: block;
    animation: slideUp var(--transition-base);
}

.section-header {
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: white;
    padding: var(--space-lg);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.section-header .btn {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.section-header h2 {
    font-size: 20px;
    text-align: center;
    flex: 1;
    margin: 0 var(--space-sm);
}

.section-content {
    padding: var(--space-xl) var(--space-lg);
    max-width: 800px;
    margin: 0 auto;
}

.content-title {
    color: var(--color-text-dark);
    margin-bottom: var(--space-lg);
    font-size: 24px;
    font-weight: 600;
}

.content-paragraph {
    color: var(--color-text-dark);
    line-height: 1.8;
    margin-bottom: var(--space-lg);
    font-size: 16px;
}

.content-paragraph.heading {
    font-size: 20px;
    font-weight: 600;
    color: var(--color-primary);
    margin-top: var(--space-lg);
}

.content-paragraph.highlight {
    background: linear-gradient(120deg, #f8f9fa 0%, #e9ecef 100%);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-primary);
    font-weight: 500;
}

.content-paragraph.teaching {
    background: linear-gradient(120deg, #e3f2fd 0%, #bbdefb 100%);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-tanya);
}

.content-paragraph.quote {
    font-style: italic;
    border-left: 4px solid var(--color-hayom);
    padding-left: var(--space-md);
    color: var(--color-text-light);
}

.content-paragraph.example,
.content-paragraph.explanation,
.content-paragraph.note {
    background: var(--color-bg-secondary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    font-size: 15px;
}

.paragraph-title {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: var(--space-sm);
}

/* ============================================
   GAME CONTAINER
   ============================================ */
.game-container {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-lg);
    padding: var(--space-xl) var(--space-lg);
    margin-top: var(--space-xl);
}

.game-menu {
    text-align: center;
}

.game-menu h3 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-lg);
    font-size: 22px;
}

.game-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.game-button {
    background: var(--color-bg-primary);
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: var(--space-md) 25px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-base);
    min-width: 120px;
}

.game-button:hover {
    background: var(--color-primary);
    color: white;
    transform: scale(1.05);
}

/* ============================================
   QUIZ GAME
   ============================================ */
.quiz-game,
.truefalse-game,
.match-game,
.reflection-game {
    display: none;
}

.quiz-game.active,
.truefalse-game.active,
.match-game.active,
.reflection-game.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

.quiz-question,
.reflection-question {
    font-size: 20px;
    color: var(--color-text-dark);
    margin-bottom: 25px;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.quiz-option {
    background: var(--color-bg-primary);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 16px;
    text-align: left;
    position: relative;
}

.quiz-option:hover:not(.disabled) {
    border-color: var(--color-primary);
    transform: translateX(5px);
    box-shadow: var(--shadow-sm);
}

.quiz-option.correct {
    background: #e8f5e9;
    border-color: var(--color-success);
    animation: pulse var(--transition-slow);
}

.quiz-option.incorrect {
    background: #ffebee;
    border-color: var(--color-error);
    animation: shake var(--transition-slow);
}

.quiz-option.disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.quiz-feedback {
    margin-top: var(--space-lg);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
    font-size: 16px;
    line-height: 1.6;
    display: none;
}

.quiz-feedback.show {
    display: block;
    animation: fadeIn var(--transition-base);
}

.quiz-feedback.success {
    background: #e8f5e9;
    color: var(--color-success);
}

.quiz-feedback.error {
    background: #ffebee;
    color: var(--color-error);
}

.feedback-title {
    font-size: 24px;
    margin-bottom: var(--space-sm);
}

/* ============================================
   TRUE/FALSE GAME
   ============================================ */
.truefalse-questions {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.truefalse-item {
    background: var(--color-bg-primary);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
}

.truefalse-statement {
    font-size: 16px;
    margin-bottom: var(--space-md);
    color: var(--color-text-dark);
    line-height: 1.6;
    font-weight: 500;
}

.truefalse-buttons {
    display: flex;
    gap: var(--space-sm);
}

.truefalse-button {
    flex: 1;
    padding: 12px;
    border: 2px solid #e0e0e0;
    background: var(--color-bg-primary);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
    font-size: 16px;
    font-weight: 500;
}

.truefalse-button:hover:not(.disabled) {
    border-color: var(--color-primary);
    transform: scale(1.05);
}

.truefalse-button.correct {
    background: #e8f5e9;
    border-color: var(--color-success);
}

.truefalse-button.incorrect {
    background: #ffebee;
    border-color: var(--color-error);
}

.truefalse-button.disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.truefalse-explanation {
    margin-top: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
    font-size: 14px;
    color: var(--color-text-light);
    display: none;
}

.truefalse-explanation.show {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* ============================================
   MATCH GAME
   ============================================ */
.match-instruction {
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: var(--space-lg);
    font-size: 16px;
    font-weight: 600;
}

.match-pairs {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--space-md);
    align-items: start;
}

.match-column {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.match-column-left {
    background: linear-gradient(135deg, #e3f2fd 0%, #f5f5f5 100%);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 2px solid #2196F3;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.1);
}

.match-column-right {
    background: linear-gradient(135deg, #fff3e0 0%, #f5f5f5 100%);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 2px solid #FF9800;
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.1);
}

.match-column-header {
    text-align: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--color-text-dark);
    margin-bottom: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.match-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: var(--color-primary);
    opacity: 0.5;
    padding: var(--space-md) 0;
}

.match-items-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.match-item {
    background: white;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    border: 2px solid #e0e0e0;
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
    font-size: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.match-item:hover:not(.matched):not(.disabled) {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.match-item.selected {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.4);
}

.match-item.matched {
    background: #4CAF50;
    color: white;
    border-color: var(--color-success);
    cursor: default;
    animation: matchSuccess var(--transition-slow);
}

.match-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@keyframes matchSuccess {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ============================================
   REFLECTION GAME
   ============================================ */
.reflection-textarea {
    width: 100%;
    min-height: 150px;
    padding: var(--space-md);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
    transition: border-color var(--transition-base);
}

.reflection-textarea:focus {
    outline: none;
    border-color: var(--color-primary);
}

.reflection-save {
    margin-top: var(--space-md);
    width: 100%;
}

/* ============================================
   VIEWS
   ============================================ */
.view {
    display: none;
    padding-bottom: var(--space-lg);
}

.view.active {
    display: block;
    animation: fadeIn var(--transition-base);
}

/* ============================================
   PROFILE VIEW
   ============================================ */
.profile-header {
    text-align: center;
}

.profile-header h2 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-lg);
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-lg);
}

.profile-stat {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: var(--space-lg);
    border-radius: var(--radius-md);
    text-align: center;
}

.profile-stat .value {
    font-size: 32px;
    font-weight: bold;
    color: var(--color-primary);
}

.profile-stat .label {
    font-size: 14px;
    color: var(--color-text-light);
    margin-top: var(--space-sm);
}

.achievements h2 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-md);
}

.achievement-item {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: var(--radius-md);
    transition: transform var(--transition-fast);
}

.achievement-item:hover {
    transform: translateX(5px);
}

.achievement-icon {
    font-size: 32px;
}

.achievement-info {
    flex: 1;
}

.achievement-info h3 {
    color: var(--color-text-dark);
    margin-bottom: 3px;
}

.achievement-info p {
    color: var(--color-text-light);
    font-size: 14px;
}

.achievement-status {
    font-size: 28px;
}

/* ============================================
   STREAK CARD (Огонёк) - КРИТИЧНО
   ============================================ */
.streak-card {
    background: linear-gradient(135deg, #FF6B6B 0%, #FF8E53 100%);
    color: white;
}

.streak-card h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.streak-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-lg);
    padding: var(--space-lg) 0;
}

.streak-flame {
    font-size: 80px;
    animation: flameFlicker 2s infinite;
}

@keyframes flameFlicker {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 1; }
    50% { transform: scale(1.1) rotate(5deg); opacity: 0.9; }
}

.streak-counter {
    text-align: center;
}

.streak-value {
    font-size: 48px;
    font-weight: bold;
    color: white;
}

.streak-label {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.9);
    margin-top: var(--space-xs);
}

/* ============================================
   LEVEL CARD (Уровни)
   ============================================ */
.level-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.level-card h2 {
    color: white;
    margin-bottom: var(--space-md);
}

.level-display {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    margin-bottom: var(--space-md);
}

.level-icon {
    font-size: 64px;
}

.level-info {
    flex: 1;
}

.level-name {
    font-size: 32px;
    font-weight: bold;
    color: white;
    margin-bottom: var(--space-xs);
}

.level-progress-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.9);
}

.level-description {
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
    padding-top: var(--space-md);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
}

/* ============================================
   WEEKLY BADGES (Значки за недели)
   ============================================ */
.weekly-badges h2 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-md);
}

.weekly-badge-count {
    font-size: 18px;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
    text-align: center;
}

.weekly-badge-count span {
    font-size: 24px;
    font-weight: bold;
    color: var(--color-primary);
}

.weekly-badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: var(--space-md);
}

.weekly-badge-item {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    padding: var(--space-md);
    border-radius: var(--radius);
    text-align: center;
    color: white;
    transition: transform var(--transition-fast);
}

.weekly-badge-item:hover {
    transform: translateY(-5px);
}

.week-number {
    font-size: 14px;
    margin-bottom: var(--space-sm);
    opacity: 0.9;
}

.week-badges {
    display: flex;
    justify-content: center;
    gap: var(--space-xs);
}

.badge-icon {
    font-size: 28px;
}

.no-badges {
    text-align: center;
    color: var(--color-text-light);
    padding: var(--space-lg);
}

/* ============================================
   SHARE PROGRESS (Поделиться)
   ============================================ */
.share-progress h2 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-md);
}

.share-buttons {
    display: flex;
    gap: var(--space-md);
}

.share-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md);
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all var(--transition-fast);
}

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

.share-btn.whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.share-btn.telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
    color: white;
}

.share-icon {
    font-size: 24px;
}

/* ============================================
   SETTINGS VIEW
   ============================================ */
.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: transform var(--transition-fast);
}

.setting-item:hover {
    transform: translateX(5px);
}

.setting-info h3 {
    color: var(--color-text-dark);
    margin-bottom: var(--space-xs);
}

.setting-info p {
    color: var(--color-text-light);
    font-size: 14px;
}

.toggle-switch {
    position: relative;
    width: 60px;
    height: 30px;
    background: #ccc;
    border-radius: 15px;
    cursor: pointer;
    transition: background var(--transition-base);
}

.toggle-switch.active {
    background: var(--color-primary);
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: white;
    border-radius: 50%;
    transition: left var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.toggle-switch.active::after {
    left: 33px;
}

/* ============================================
   BOTTOM NAVIGATION
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--color-bg-primary);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-around;
    padding: 10px 0 max(10px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    cursor: pointer;
    padding: var(--space-xs) var(--space-md);
    border-radius: var(--radius-sm);
    transition: all var(--transition-base);
    color: var(--color-text-light);
}

.nav-item:hover {
    background: var(--color-bg-secondary);
}

.nav-item.active {
    color: var(--color-primary);
}

.nav-icon {
    font-size: 24px;
}

.nav-label {
    font-size: 12px;
    font-weight: 500;
}

/* ============================================
   LOADING STATE
   ============================================ */
.loading {
    text-align: center;
    padding: 50px 20px;
    color: white;
    font-size: 18px;
}

.loading::after {
    content: '...';
    animation: dots 1.5s steps(4, end) infinite;
}

/* ============================================
   ANIMATIONS
   ============================================ */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.02);
    }
}

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }
    25% {
        transform: translateX(-10px);
    }
    75% {
        transform: translateX(10px);
    }
}

@keyframes dots {
    0%, 20% {
        content: '.';
    }
    40% {
        content: '..';
    }
    60%, 100% {
        content: '...';
    }
}

@keyframes countUp {
    from {
        transform: scale(0.5);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ============================================
   AUTHENTICATION UI
   ============================================ */
.auth-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.auth-button {
    background: white;
    color: var(--color-primary);
    padding: var(--space-md) var(--space-xl);
    border: none;
    border-radius: var(--radius-lg);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.auth-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
}

.user-name {
    flex: 1;
    font-size: 18px;
    font-weight: 600;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    font-weight: 600;
}

.logout-btn:hover {
    background: white;
    color: var(--color-primary);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: var(--space-xl);
    border-radius: var(--radius-lg);
    max-width: 400px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.modal-close:hover {
    color: #000;
}

.modal-content h2 {
    margin-bottom: var(--space-lg);
    color: var(--color-primary);
    text-align: center;
}

.modal-input {
    width: 100%;
    padding: var(--space-md);
    margin-bottom: var(--space-md);
    border: 2px solid #e0e0e0;
    border-radius: var(--radius-md);
    font-size: 15px;
    transition: border-color var(--transition-base);
}

.modal-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.modal-btn {
    width: 100%;
    padding: var(--space-md);
    margin-bottom: var(--space-sm);
    border: none;
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-base);
}

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

.modal-btn.primary:hover {
    background: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.modal-btn.google {
    background: white;
    color: #444;
    border: 2px solid #ddd;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
}

.modal-btn.google:hover {
    background: #f8f8f8;
    border-color: #bbb;
}

.modal-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-links {
    margin-top: var(--space-lg);
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}

.modal-links a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-fast);
}

.modal-links a:hover {
    color: var(--color-secondary);
    text-decoration: underline;
}

.modal-error {
    display: none;
    background: #ffebee;
    color: #c62828;
    padding: var(--space-md);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-md);
    border-left: 4px solid #c62828;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */
.section-open .app-header,
.section-open .container,
.section-open .bottom-nav {
    display: none;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */
@media (max-width: 768px) {
    .tiles-grid {
        grid-template-columns: 1fr;
    }

    .match-pairs {
        grid-template-columns: 1fr;
        gap: var(--space-sm);
    }

    .match-separator {
        transform: rotate(90deg);
        font-size: 24px;
        padding: var(--space-sm) 0;
    }

    .match-column-left,
    .match-column-right {
        padding: var(--space-sm);
    }

    .match-column-header {
        font-size: 12px;
    }

    .app-header h1 {
        font-size: 20px;
    }

    .section-header h2 {
        font-size: 16px;
    }

    .game-buttons {
        flex-direction: column;
    }

    .game-button {
        width: 100%;
    }

    .profile-stats {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: var(--space-sm);
    }

    .card {
        padding: var(--space-md);
    }

    .content-title {
        font-size: 20px;
    }

    .quiz-question {
        font-size: 18px;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

/* Скрываем print-only-view на экране */
.print-only-view {
    display: none;
}

/* Стили для печатного представления */
@media print {
    /* Скрываем навигацию и интерактивные элементы */
    .bottom-nav,
    .date-navigation,
    .date-navigation-bottom,
    .game-container,
    .section-header button,
    .app-header,
    .progress-card,
    .nav-item,
    #speakBtn,
    #closeSectionBtn {
        display: none !important;
    }

    /* Базовые стили для печати */
    body {
        background: white !important;
        padding: 0 !important;
        margin: 0 !important;
        color: #000 !important;
    }

    /* Показываем print-only-view только при печати */
    .print-only-view {
        display: block !important;
    }

    /* Скрываем основной контент при печати дневного содержимого */
    body.printing-daily .container,
    body.printing-daily .view,
    body.printing-daily .section-view {
        display: none !important;
    }

    /* При печати секции показываем только section-view */
    body.printing-section .container,
    body.printing-section .view:not(#sectionView),
    body.printing-section .bottom-nav {
        display: none !important;
    }

    /* Стили для section-view при печати */
    .section-view {
        position: static !important;
        display: block !important;
    }

    .section-header {
        background: #333 !important;
        color: white !important;
        padding: 15px !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .section-content {
        padding: 20px !important;
    }

    /* Стили для печатного представления */
    .print-header {
        text-align: center;
        margin-bottom: 30px;
        padding-bottom: 20px;
        border-bottom: 2px solid #333;
    }

    .print-header h1 {
        font-size: 24px;
        margin-bottom: 10px;
        color: #333;
    }

    .print-header h2 {
        font-size: 18px;
        margin-bottom: 10px;
        color: #666;
    }

    .print-header .dedication {
        font-size: 14px;
        color: #888;
        font-style: italic;
    }

    /* Мазаль Тов для печати */
    .print-mazel-tov {
        margin: 20px 0;
        padding: 15px;
        background: #f9f9f9 !important;
        border-radius: 8px;
        page-break-inside: avoid;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-mazel-tov h3 {
        text-align: center;
        margin-bottom: 15px;
        font-size: 18px;
    }

    /* Секции для печати */
    .print-section {
        margin-bottom: 30px;
        page-break-inside: avoid;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 15px;
    }

    .print-section-header {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 15px;
        padding-bottom: 10px;
        border-bottom: 2px solid #333;
        border-left: 4px solid #667eea;
        padding-left: 10px;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-section-header .section-icon {
        font-size: 24px;
    }

    .print-section-header h3 {
        font-size: 18px;
        margin: 0;
        color: #333;
    }

    .print-section-header .section-subtitle {
        font-size: 14px;
        color: #666;
        margin: 0;
    }

    .print-section-content {
        line-height: 1.8;
    }

    .print-section-content h4 {
        font-size: 16px;
        margin: 15px 0 10px 0;
        color: #333;
    }

    .print-paragraph {
        margin-bottom: 12px;
        font-size: 14px;
        line-height: 1.7;
        color: #333;
    }

    .print-paragraph.heading {
        font-size: 16px;
        font-weight: bold;
        margin-top: 15px;
        color: #000;
    }

    .print-paragraph.highlight {
        background: #f5f5f5 !important;
        padding: 10px;
        border-left: 3px solid #667eea;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    .print-paragraph.quote {
        font-style: italic;
        padding-left: 15px;
        border-left: 3px solid #999;
        color: #555;
    }

    /* Футер для печати */
    .print-footer {
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
        text-align: center;
        font-size: 12px;
        color: #888;
    }

    .print-footer p {
        margin: 5px 0;
    }

    /* Общие стили */
    .card {
        page-break-inside: avoid;
        box-shadow: none !important;
    }

    /* Контент параграфы */
    .content-paragraph {
        page-break-inside: avoid;
    }

    .content-paragraph.highlight,
    .content-paragraph.teaching {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }

    /* Убираем анимации для печати */
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}
