/* app/static/css/style.css - העיצוב של Planily */
/* ============================================== */
/* צבעים: סגול 💜 + ורוד 🩷                       */
/* כיוון: RTL (ימין לשמאל) לעברית                 */

/* ---------- צבעים ---------- */
:root {
    /* הצבעים הראשיים של Planily */
    --planily-purple: #7C3AED;        /* סגול ראשי */
    --planily-purple-light: #A78BFA;  /* סגול בהיר */
    --planily-purple-dark: #5B21B6;   /* סגול כהה */
    --planily-pink: #EC4899;          /* ורוד ראשי */
    --planily-pink-light: #F9A8D4;    /* ורוד בהיר */
    --planily-gradient: linear-gradient(135deg, var(--planily-purple), var(--planily-pink));
    --planily-bg: #FAF5FF;            /* רקע סגלגל עדין */
}

/* ---------- מצב כהה (Dark Mode) ---------- */
[data-theme="dark"] {
    --planily-bg: #1a1a2e;
    --dark-card: #16213e;
    --dark-card-hover: #1a2745;
    --dark-text: #e2e8f0;
    --dark-text-muted: #94a3b8;
    --dark-border: #2d3748;
    --dark-input-bg: #1e293b;
}

/* ---------- גוף הדף ---------- */
body {
    background-color: var(--planily-bg);
    font-family: 'Segoe UI', Tahoma, Arial, sans-serif;
    min-height: 100vh;
    transition: background-color 0.3s ease, color 0.3s ease;
}

[data-theme="dark"] body {
    color: var(--dark-text);
}

[data-theme="dark"] .card {
    background: var(--dark-card) !important;
    border-color: var(--dark-border) !important;
}

[data-theme="dark"] .card .card-body {
    color: var(--dark-text);
}

[data-theme="dark"] .text-muted {
    color: var(--dark-text-muted) !important;
}

[data-theme="dark"] .bottom-nav {
    background: #0f172a;
    border-top-color: var(--dark-border);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
    background-color: var(--dark-input-bg);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
    background-color: var(--dark-input-bg);
    color: var(--dark-text);
    border-color: var(--planily-purple);
}

[data-theme="dark"] .modal-content {
    background: var(--dark-card);
    color: var(--dark-text);
}

[data-theme="dark"] .list-group-item {
    background: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

[data-theme="dark"] .alert {
    border-color: var(--dark-border);
}

[data-theme="dark"] .table {
    color: var(--dark-text);
    --bs-table-bg: transparent;
}

[data-theme="dark"] .badge.bg-light {
    background-color: var(--dark-input-bg) !important;
    color: var(--dark-text) !important;
}

[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5, [data-theme="dark"] h6 {
    color: var(--dark-text);
}

/* ---------- כפתורים ---------- */
/* הופכים את כפתורי Bootstrap הרגילים לצבעים שלנו */
.btn-primary {
    background: var(--planily-gradient) !important;
    border: none !important;
    border-radius: 12px;
    padding: 10px 24px;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.4);
}

.btn-outline-primary {
    color: var(--planily-purple) !important;
    border-color: var(--planily-purple) !important;
    border-radius: 12px;
}

.btn-outline-primary:hover,
.btn-outline-primary.active,
.btn-check:checked + .btn-outline-primary {
    background: var(--planily-gradient) !important;
    border-color: var(--planily-purple) !important;
    color: white !important;
}

/* ---------- כרטיסים ---------- */
.card {
    border-radius: 16px;
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: 0 2px 12px rgba(124, 58, 237, 0.1) !important;
}

/* ---------- סרגל ניווט תחתון ---------- */
.bottom-nav {
    background: white;
    border-top: 2px solid var(--planily-purple-light);
    padding: 8px 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

.bottom-nav .nav-link {
    color: #9CA3AF;
    font-size: 0.75rem;
    padding: 4px 12px;
    border-radius: 12px;
    transition: all 0.2s;
}

.bottom-nav .nav-link:hover,
.bottom-nav .nav-link.active {
    color: var(--planily-purple);
    background: rgba(124, 58, 237, 0.1);
}

.bottom-nav .nav-link.active i {
    color: var(--planily-pink);
}

.bottom-nav .nav-link i {
    font-size: 1.3rem;
}

/* ---------- דף כניסה ---------- */
.user-select-btn {
    min-width: 90px;
    border-radius: 16px !important;
    padding: 12px 16px !important;
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-select-btn:hover {
    transform: scale(1.05);
}

.btn-check:checked + .user-select-btn {
    transform: scale(1.08);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

/* ---------- דף הקמת משפחה ---------- */
.member-card {
    border-right: 4px solid var(--planily-purple) !important;
    transition: transform 0.2s;
}

.member-card:hover {
    transform: translateX(-4px);
}

/* ---------- הודעות מערכת ---------- */
.alert {
    border-radius: 12px;
    border: none;
}

.alert-success {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    color: #065F46;
}

.alert-danger {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    color: #991B1B;
}

.alert-info {
    background: linear-gradient(135deg, #EDE9FE, #DDD6FE);
    color: #5B21B6;
}

/* ---------- כותרות ---------- */
h1, h2, h3, h4, h5 {
    color: var(--planily-purple-dark);
}

/* ---------- שדות טופס ---------- */
.form-control:focus,
.form-select:focus {
    border-color: var(--planily-purple-light);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15);
}

/* ---------- משימות ---------- */
.task-card {
    transition: transform 0.15s, box-shadow 0.15s;
    border-right: 3px solid var(--planily-purple-light) !important;
}

.task-card:hover {
    transform: translateX(-3px);
    box-shadow: 0 3px 12px rgba(124, 58, 237, 0.15) !important;
}

.task-done {
    opacity: 0.6;
    border-right-color: #D1D5DB !important;
}

.status-btn {
    width: 32px;
    height: 32px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- רספונסיבי (מותאם לנייד) ---------- */
@media (max-width: 576px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ========== תזכורות (Reminders) ========== */
.reminder-tabs .nav-link {
    color: var(--planily-purple);
    border-radius: 20px;
    padding: 6px 16px;
    font-size: 0.9rem;
    font-weight: 500;
}
.reminder-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--planily-purple), var(--planily-pink));
    color: white;
}

.reminder-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
    border-right: 4px solid var(--planily-purple);
    transition: all 0.2s;
}
.reminder-card:hover {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.15);
}

.reminder-card.reminder-inactive {
    opacity: 0.55;
    border-right-color: #adb5bd;
}

.reminder-card.reminder-past {
    border-right-color: #dc3545;
    background: #fff5f5;
}

.reminder-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.reminder-info {
    display: flex;
    gap: 8px;
    align-items: center;
}

.reminder-type-badge {
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 500;
}
.reminder-type-personal {
    background: #f3e8ff;
    color: #7c3aed;
}
.reminder-type-direct {
    background: #fce7f3;
    color: #db2777;
}
.reminder-type-group {
    background: #e0f2fe;
    color: #0284c7;
}

.reminder-title {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #1f2937;
}

.reminder-desc {
    font-size: 0.85rem;
    margin-bottom: 8px;
}

.reminder-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.8rem;
    color: #6b7280;
    align-items: center;
}

.reminder-meta i {
    margin-left: 4px;
}

.avatar-small {
    font-size: 1.1rem;
}

.recipient-chip {
    display: inline-block;
    background: #f3e8ff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.78rem;
    margin: 2px;
}

/* טופס תזכורת */
.reminder-form .form-label {
    font-weight: 600;
    color: #374151;
}

.reminder-type-selector .form-check {
    margin-bottom: 8px;
}
.reminder-type-selector .form-check-label {
    font-size: 0.95rem;
}

.recipients-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recipient-check {
    display: flex;
    align-items: center;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px 14px;
    transition: all 0.2s;
    cursor: pointer;
}
.recipient-check:has(input:checked) {
    border-color: var(--planily-purple);
    background: #f3e8ff;
}

.recipient-label {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.recipient-avatar {
    font-size: 1.3rem;
}

.empty-state .empty-icon {
    font-size: 3.5rem;
    margin-bottom: 12px;
}

/* ========== קניות (Shopping) ========== */
.shopping-lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 12px;
}

.shopping-list-card {
    display: block;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
    border-right: 4px solid var(--planily-pink);
    transition: all 0.2s;
    color: inherit;
}
.shopping-list-card:hover {
    box-shadow: 0 4px 16px rgba(124, 58, 237, 0.18);
    transform: translateY(-2px);
}

.shopping-list-card-body {
    padding: 16px;
}

.shopping-list-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.shopping-list-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--planily-purple);
    background: #f3e8ff;
    padding: 2px 10px;
    border-radius: 10px;
    white-space: nowrap;
}

.shopping-progress {
    height: 6px;
    border-radius: 3px;
    background: #e5e7eb;
    margin-bottom: 8px;
}
.shopping-progress .progress-bar {
    background: linear-gradient(90deg, var(--planily-purple), var(--planily-pink));
    border-radius: 3px;
    transition: width 0.4s;
}

.shopping-list-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: #6b7280;
}

/* הוספת פריט */
.shopping-add-item .shopping-quantity {
    max-width: 90px;
}

.shopping-stats {
    text-align: center;
}

/* פריט בודד */
.shopping-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: white;
    border-radius: 12px;
    margin-bottom: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: all 0.15s;
}
.shopping-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.shopping-item-bought {
    opacity: 0.55;
}
.shopping-item-bought .shopping-item-name {
    text-decoration: line-through;
    color: #9ca3af;
}

.shopping-check-btn {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #d1d5db;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.15s;
}
.shopping-check-btn:hover {
    color: var(--planily-purple);
}
.shopping-check-btn.checked {
    color: #22c55e;
}

.shopping-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.shopping-item-name {
    font-size: 0.95rem;
    font-weight: 500;
    color: #1f2937;
}

.shopping-item-qty {
    font-size: 0.78rem;
    color: var(--planily-purple);
    background: #f3e8ff;
    padding: 1px 8px;
    border-radius: 8px;
    white-space: nowrap;
}

.shopping-item-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.shopping-item-adder {
    font-size: 1.1rem;
}

/* ========== לוח הודעות (Board) ========== */
.board-compose-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.08);
}

.board-compose-avatar {
    font-size: 1.8rem;
    line-height: 1;
}

.board-compose-input {
    resize: none;
    font-size: 0.95rem;
}
.board-compose-input:focus {
    box-shadow: none;
}

/* הודעה בודדת */
.board-message {
    background: white;
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(124, 58, 237, 0.06);
    transition: box-shadow 0.2s;
}
.board-message:hover {
    box-shadow: 0 4px 14px rgba(124, 58, 237, 0.12);
}

.board-pinned {
    border: 2px solid #fbbf24;
    background: #fffbeb;
}

.board-msg-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.board-msg-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

.board-msg-avatar {
    font-size: 2rem;
    line-height: 1;
}

.board-msg-content {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #1f2937;
    margin-bottom: 12px;
    word-wrap: break-word;
}

/* לייקים ותגובות */
.board-msg-actions {
    display: flex;
    gap: 16px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.board-action-btn {
    background: none;
    border: none;
    color: #6b7280;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 8px;
    transition: all 0.15s;
}
.board-action-btn:hover {
    background: #f3e8ff;
    color: var(--planily-purple);
}

.board-liked {
    color: #ec4899 !important;
}
.board-liked:hover {
    background: #fce7f3;
}

/* תגובות */
.board-comments {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #f3f4f6;
}

.board-comment {
    padding: 8px 12px;
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 6px;
}

.board-comment-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    margin-bottom: 3px;
}

.board-comment-avatar {
    font-size: 1rem;
}

.board-comment-text {
    font-size: 0.88rem;
    color: #374151;
    padding-right: 26px;
}

.board-comment-form {
    margin-top: 8px;
}

/* ========== לוח שנה (Calendar) ========== */
.cal-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
}

.cal-month-title {
    font-weight: 700;
    color: var(--planily-purple);
    min-width: 140px;
    text-align: center;
}

/* גריד */
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.cal-header {
    margin-bottom: 4px;
}

.cal-day-name {
    text-align: center;
    font-weight: 600;
    font-size: 0.8rem;
    color: #6b7280;
    padding: 6px 0;
}

.cal-cell {
    min-height: 70px;
    background: white;
    border-radius: 8px;
    padding: 4px;
    cursor: pointer;
    transition: all 0.15s;
    overflow: hidden;
}
.cal-cell:hover {
    background: #f3e8ff;
    box-shadow: 0 2px 6px rgba(124, 58, 237, 0.12);
}

.cal-empty {
    background: transparent;
    cursor: default;
}
.cal-empty:hover {
    background: transparent;
    box-shadow: none;
}

.cal-today {
    border: 2px solid var(--planily-purple);
}

.cal-day-number {
    font-size: 0.82rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 2px;
    text-align: center;
}

.cal-today-number {
    background: var(--planily-purple);
    color: white;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2px;
    font-size: 0.75rem;
}

.cal-event-dot {
    font-size: 0.6rem;
    padding: 1px 4px;
    border-radius: 4px;
    margin-bottom: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

/* צבעי אירועים */
.cal-color-purple { background: #f3e8ff; color: #7c3aed; }
.cal-color-pink { background: #fce7f3; color: #db2777; }
.cal-color-blue { background: #dbeafe; color: #2563eb; }
.cal-color-green { background: #dcfce7; color: #16a34a; }
.cal-color-orange { background: #ffedd5; color: #ea580c; }
.cal-color-red { background: #fee2e2; color: #dc2626; }

.cal-color-purple-bar { border-right: 4px solid #7c3aed; background: #f3e8ff; }
.cal-color-pink-bar { border-right: 4px solid #db2777; background: #fce7f3; }
.cal-color-blue-bar { border-right: 4px solid #2563eb; background: #dbeafe; }
.cal-color-green-bar { border-right: 4px solid #16a34a; background: #dcfce7; }
.cal-color-orange-bar { border-right: 4px solid #ea580c; background: #ffedd5; }
.cal-color-red-bar { border-right: 4px solid #dc2626; background: #fee2e2; }

.cal-more {
    font-size: 0.6rem;
    color: #6b7280;
    text-align: center;
}

/* רשימת אירועים */
.cal-events-list {
    margin-bottom: 20px;
}

.cal-event-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: white;
    border-radius: 12px;
    margin-bottom: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.cal-event-date-col {
    text-align: center;
    min-width: 40px;
}

.cal-event-day {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--planily-purple);
    line-height: 1;
}

.cal-event-month-label {
    font-size: 0.65rem;
    color: #9ca3af;
}

.cal-event-color-bar {
    width: 4px;
    height: 36px;
    border-radius: 2px;
    flex-shrink: 0;
}

.cal-event-details {
    flex: 1;
}

.cal-event-title {
    font-weight: 500;
    font-size: 0.9rem;
    color: #1f2937;
}

.cal-event-actions {
    display: flex;
    gap: 2px;
}

/* בוחר צבע */
.cal-color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.cal-color-option {
    cursor: pointer;
}

.cal-color-option input {
    display: none;
}

.cal-color-swatch {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    transition: all 0.15s;
    border: 2px solid transparent;
}

.cal-color-option input:checked + .cal-color-swatch {
    border-color: #374151;
    font-weight: 600;
}

@media (max-width: 576px) {
    .cal-cell {
        min-height: 52px;
        padding: 2px;
    }
    .cal-event-dot {
        font-size: 0.5rem;
        padding: 0 2px;
    }
    .cal-day-number {
        font-size: 0.72rem;
    }
}

/* ========================================== */
/* ⚙️ הגדרות - Settings                     */
/* ========================================== */

.settings-page .page-header h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.settings-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.settings-card .card-title {
    font-weight: 700;
    color: var(--planily-purple);
}

/* רשת ערכות הצבעים */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.theme-option-form {
    margin: 0;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    background: none;
    border: none;
    padding: 8px;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    width: 100%;
}

.theme-option:hover {
    background: rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.theme-option.active {
    background: rgba(0,0,0,0.06);
}

.theme-preview {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: relative;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.25s ease;
}

.theme-option:hover .theme-preview {
    transform: scale(1.1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.theme-option.active .theme-preview {
    box-shadow: 0 0 0 3px white, 0 0 0 5px var(--planily-purple);
}

.theme-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.theme-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: #555;
}

/* תצוגה מקדימה */
.preview-section {
    padding: 16px;
    background: var(--planily-bg);
    border-radius: 12px;
}

.preview-gradient-bar {
    background: var(--planily-gradient);
    color: white;
    padding: 12px 20px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
    letter-spacing: 1px;
}

/* אודות */
.app-logo-big {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 2px;
}

/* רספונסיבי */
@media (max-width: 576px) {
    .theme-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
    .theme-preview {
        width: 48px;
        height: 48px;
    }
    .theme-name {
        font-size: 0.7rem;
    }
}

/* ---------- כפתור מצב כהה ---------- */
.dark-mode-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--planily-purple-light);
    background: var(--planily-bg);
    color: var(--planily-purple);
    font-size: 1.4rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-mode-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.dark-mode-toggle.active {
    background: var(--planily-gradient);
    border-color: transparent;
    color: white;
}

/* ========================================== */
/* 📊 דשבורד חכם - Dashboard                */
/* ========================================== */

.dashboard-page .dashboard-header h2 {
    font-size: 1.6rem;
    font-weight: 700;
}

.dashboard-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.stat-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--planily-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.points-widget {
    display: block;
    text-decoration: none;
    background: var(--planily-gradient);
    color: white;
    border-radius: 16px;
    padding: 8px 16px;
    text-align: center;
    transition: transform 0.2s;
}

.points-widget:hover {
    transform: scale(1.05);
    color: white;
}

.points-widget-number {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1;
}

.mood-strip {
    border-right: 4px solid var(--planily-pink);
}

.mood-family-item {
    min-width: 50px;
}

.mood-family-emoji {
    font-size: 1.5rem;
}

.event-mini-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.quick-link {
    border-radius: 16px !important;
    padding: 12px 8px !important;
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.quick-link:hover {
    transform: translateY(-2px);
}

/* ========================================== */
/* 🏆 נקודות ופרסים - Points                */
/* ========================================== */

.points-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.points-card.first-place {
    border: 2px solid var(--planily-purple-light);
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.03), rgba(236, 72, 153, 0.03));
}

.rank-badge {
    min-width: 40px;
    text-align: center;
}

.rank-medal {
    font-size: 2rem;
}

.rank-number {
    font-size: 1.3rem;
    font-weight: 700;
    color: #9CA3AF;
}

.level-badge {
    font-size: 0.75rem;
    color: var(--planily-purple);
    font-weight: 600;
}

.level-num-badge {
    font-size: 0.65rem;
    color: #888;
    margin-right: 6px;
}

/* רשת כל הדרגות */
.levels-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.level-item {
    text-align: center;
    padding: 12px 6px;
    border-radius: 14px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.level-unlocked {
    background: linear-gradient(135deg, rgba(124,58,237,0.08), rgba(236,72,153,0.08));
    border-color: var(--primary-color);
}

.level-locked {
    opacity: 0.45;
    filter: grayscale(0.5);
}

.level-item-emoji {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.level-item-name {
    font-weight: 700;
    font-size: 0.8rem;
    color: var(--text-color);
}

.level-item-points {
    font-size: 0.7rem;
    color: #888;
    margin-top: 2px;
}

[data-theme="dark"] .level-unlocked {
    background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(236,72,153,0.15));
}

@media (max-width: 576px) {
    .levels-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    .level-item-emoji {
        font-size: 1.4rem;
    }
    .level-item-name {
        font-size: 0.7rem;
    }
}

.points-total {
    min-width: 70px;
}

.points-number {
    font-size: 1.8rem;
    font-weight: 800;
    background: var(--planily-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.points-action-badge {
    background: rgba(124, 58, 237, 0.1) !important;
    color: var(--planily-purple) !important;
    font-size: 0.75rem;
    border-radius: 8px;
    padding: 4px 8px;
}

.points-guide-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.points-guide-row:last-child {
    border-bottom: none;
}

/* ========================================== */
/* 😊 מצב רוח - Mood                        */
/* ========================================== */

.mood-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.mood-card .card-title {
    font-weight: 700;
    color: var(--planily-purple);
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.mood-choice {
    cursor: pointer;
}

.mood-choice input[type="radio"] {
    display: none;
}

.mood-emoji-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 12px 8px;
    border-radius: 16px;
    border: 2px solid transparent;
    background: #f8f9fa;
    transition: all 0.25s ease;
}

.mood-choice input:checked + .mood-emoji-btn {
    border-color: var(--mood-color);
    background: color-mix(in srgb, var(--mood-color) 15%, white);
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
}

.mood-emoji-btn:hover {
    background: rgba(0,0,0,0.04);
    transform: translateY(-2px);
}

.mood-big-emoji {
    font-size: 2rem;
}

.mood-label {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
}

.mood-status-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: 1rem;
}

.family-mood-row {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.family-mood-row:last-child {
    border-bottom: none;
}

.mood-history {
    max-height: 300px;
    overflow-y: auto;
}

.mood-history-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.03);
}

.mood-history-emoji {
    font-size: 1.3rem;
}

@media (max-width: 576px) {
    .mood-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 6px;
    }
    .mood-big-emoji {
        font-size: 1.6rem;
    }
    .mood-emoji-btn {
        padding: 8px 4px;
    }
}


/* ============================================
   🎯 אתגר שבועי - Weekly Challenge
   ============================================ */

/* כרטיס אתגר פעיל */
.active-challenge {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 20px;
    padding: 25px;
    color: white;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.active-challenge::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    pointer-events: none;
}

.challenge-header {
    display: flex;
    align-items: center;
    gap: 15px;
}

.challenge-emoji {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.challenge-meta {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    opacity: 0.9;
}

.challenge-meta i {
    margin-left: 4px;
}

/* משתתפים */
.challenge-participants h5 {
    color: white;
}

.participant-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.participant-count {
    font-size: 0.85rem;
    opacity: 0.85;
}

.challenge-progress {
    height: 22px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.25);
}

.challenge-progress .progress-bar {
    background: rgba(255, 255, 255, 0.85);
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.8rem;
    border-radius: 11px;
    transition: width 0.5s ease;
}

.challenge-progress .progress-bar.bg-success {
    background: #2ecc71 !important;
    color: white;
}

/* כפתורי פעולה */
.challenge-btn-plus {
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.challenge-btn-plus:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    background: white;
    color: var(--primary-color);
}

.challenge-btn-join {
    background: white;
    color: var(--primary-color);
    border: none;
    border-radius: 50px;
    padding: 15px 40px;
    font-weight: 700;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: challenge-pulse 2s ease-in-out infinite;
}

@keyframes challenge-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.challenge-btn-join:hover {
    background: white;
    color: var(--secondary-color);
    transform: scale(1.08);
}

.challenge-completed-badge {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    border-radius: 50px;
    padding: 15px 30px;
    font-size: 1.3rem;
    font-weight: 700;
    display: inline-block;
    animation: challenge-glow 1.5s ease-in-out infinite alternate;
}

@keyframes challenge-glow {
    from { box-shadow: 0 0 5px rgba(255,255,255,0.3); }
    to { box-shadow: 0 0 20px rgba(255,255,255,0.6); }
}

/* אין אתגר פעיל */
.challenge-empty {
    padding: 40px 20px;
}

.challenge-empty-icon {
    font-size: 4rem;
    margin-bottom: 15px;
    opacity: 0.5;
}

/* יצירת אתגר */
.challenge-create-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.challenge-create-card .card-header {
    background: var(--primary-color);
    color: white;
    border-radius: 16px 16px 0 0 !important;
}

.challenge-template-btn {
    background: var(--light-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 6px 14px;
    margin: 3px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.challenge-template-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.challenge-templates {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.challenge-btn-create {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.challenge-btn-create:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    color: white;
}

/* היסטוריה */
.challenge-history-card {
    border-radius: 16px;
    border: none;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.challenge-history-card .card-header {
    background: var(--card-bg);
    border-radius: 16px 16px 0 0 !important;
}

.challenge-history-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.challenge-history-item:last-child {
    border-bottom: none;
}

/* דארק מוד */
[data-theme="dark"] .active-challenge {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .challenge-template-btn {
    background: #2d2d2d;
    border-color: #444;
    color: #ddd;
}

[data-theme="dark"] .challenge-template-btn:hover {
    background: var(--primary-color);
    color: white;
}

[data-theme="dark"] .challenge-create-card,
[data-theme="dark"] .challenge-history-card {
    background: #1e1e1e;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

/* ריספונסיב */
@media (max-width: 576px) {
    .challenge-emoji {
        font-size: 2.2rem;
    }
    .challenge-meta {
        font-size: 0.8rem;
        gap: 10px;
    }
    .challenge-btn-plus {
        padding: 10px 20px;
        font-size: 1rem;
    }
    .challenge-btn-join {
        padding: 12px 28px;
        font-size: 1rem;
    }
}


/* ============================================
   📱 תפריט "עוד" - More Menu
   ============================================ */
.more-menu-offcanvas {
    border-radius: 20px 20px 0 0 !important;
    max-height: 70vh;
}

.more-menu-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.more-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 14px 8px;
    border-radius: 16px;
    background: var(--light-bg, #f8f9fa);
    text-decoration: none;
    color: var(--text-color, #333);
    transition: all 0.2s ease;
    font-size: 0.8rem;
    text-align: center;
}

.more-menu-item i {
    font-size: 1.5rem;
    color: var(--primary-color, var(--planily-purple));
}

.more-menu-item:hover {
    background: var(--primary-color, var(--planily-purple));
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.more-menu-item:hover i {
    color: white;
}

[data-theme="dark"] .more-menu-offcanvas {
    background: #1e1e1e;
}

[data-theme="dark"] .more-menu-item {
    background: #2d2d2d;
    color: #ddd;
}

@media (max-width: 400px) {
    .more-menu-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
}


/* ============================================
   🎨 אווטאר - DiceBear Avatar Builder
   ============================================ */

/* Inline avatar (used everywhere) */
.avatar-inline {
    vertical-align: middle;
    object-fit: cover;
}

/* Big preview on builder page */
.avatar-preview-wrapper {
    display: inline-block;
    padding: 8px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color, #7c3aed), var(--secondary-color, #ec4899));
    box-shadow: 0 6px 25px rgba(0,0,0,0.2);
}

.avatar-preview-big {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: block;
}

.avatar-section-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

/* Style selector (big cards) */
.avatar-style-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.avatar-style-option input { display: none; }

.avatar-style-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 14px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--light-bg, #f8f9fa);
    font-size: 0.75rem;
    text-align: center;
}

.avatar-style-preview {
    width: 52px;
    height: 52px;
    border-radius: 50%;
}

.avatar-style-option input:checked + .avatar-style-btn {
    border-color: var(--primary-color, #7c3aed);
    background: rgba(124,58,237,0.1);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}

/* Color buttons */
.avatar-colors-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.avatar-color-option input { display: none; }

.avatar-color-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.2s ease;
}

.avatar-color-option input:checked + .avatar-color-btn {
    border-color: #333;
    transform: scale(1.15);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Scrollable mini-image grids (hair, eyes, mouth) */
.avatar-scroll-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 220px;
    overflow-y: auto;
    padding: 4px;
}

.avatar-mini-option input { display: none; }

.avatar-mini-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    background: var(--light-bg, #f8f9fa);
    overflow: hidden;
}

.avatar-mini-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 10px;
}

.avatar-none-btn {
    font-size: 1.3rem;
}

.avatar-mini-option input:checked + .avatar-mini-btn {
    border-color: var(--primary-color, #7c3aed);
    background: rgba(124,58,237,0.1);
    transform: scale(1.1);
    box-shadow: 0 2px 8px rgba(124,58,237,0.25);
}

/* Save button */
.avatar-save-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--planily-pink)));
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 700;
    font-size: 1.1rem;
}

.avatar-save-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Family gallery */
.avatar-family-grid {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    justify-content: center;
}

.avatar-family-item {
    text-align: center;
}

.avatar-family-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    box-shadow: 0 3px 12px rgba(0,0,0,0.15);
}

@media (max-width: 576px) {
    .avatar-style-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .avatar-scroll-grid {
        grid-template-columns: repeat(5, 1fr);
    }
    .avatar-mini-btn {
        width: 46px;
        height: 46px;
    }
    .avatar-mini-img {
        width: 42px;
        height: 42px;
    }
}


/* ============================================
   ⏱️ טיימר - Family Timer
   ============================================ */
.timer-active-card {
    background: linear-gradient(135deg, var(--primary-color, #7c3aed), var(--secondary-color, #ec4899));
    border-radius: 24px;
    padding: 30px 20px;
    color: white;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.timer-emoji {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.timer-digits {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.timer-unit {
    text-align: center;
}

.timer-num {
    font-size: 3.5rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.timer-sep {
    font-size: 2.5rem;
    font-weight: 700;
    opacity: 0.6;
    animation: timer-blink 1s ease-in-out infinite;
}

@keyframes timer-blink {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 0.1; }
}

.timer-done {
    animation: timer-pulse-done 0.5s ease-in-out 3;
    background: linear-gradient(135deg, #10b981, #06b6d4) !important;
}

@keyframes timer-pulse-done {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

.timer-empty {
    padding: 40px 20px;
}

.timer-empty-icon {
    font-size: 4rem;
    opacity: 0.4;
}

.timer-create-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.timer-create-card .card-header {
    background: var(--card-bg, white);
    border-radius: 16px 16px 0 0 !important;
    font-weight: 700;
}

.timer-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.timer-quick-btn {
    border-radius: 20px;
    background: var(--light-bg, #f3f4f6);
    border: 1px solid var(--border-color, #e5e7eb);
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.timer-quick-btn:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.timer-start-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--planily-pink)));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 12px;
    font-weight: 700;
    font-size: 1.1rem;
}

.timer-start-btn:hover {
    color: white;
    transform: translateY(-2px);
}

.timer-history-item {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.timer-history-item:last-child {
    border-bottom: none;
}

[data-theme="dark"] .timer-create-card {
    background: #1e1e1e;
}


/* ============================================
   💬 צ'אט - Family Chat
   ============================================ */
.chat-window {
    height: calc(100vh - 220px);
    overflow-y: auto;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.chat-bubble {
    max-width: 78%;
    padding: 10px 14px;
    border-radius: 18px;
    font-size: 0.95rem;
    word-wrap: break-word;
    position: relative;
}

.chat-mine {
    align-self: flex-start;
    background: var(--primary-color, #7c3aed);
    color: white;
    border-bottom-right-radius: 6px;
}

.chat-other {
    align-self: flex-end;
    background: var(--light-bg, #f3f4f6);
    color: var(--text-color, #333);
    border-bottom-left-radius: 6px;
}

.chat-sender {
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 4px;
    opacity: 0.8;
}

.chat-time {
    font-size: 0.65rem;
    opacity: 0.6;
    text-align: left;
    margin-top: 3px;
}

.chat-mine .chat-time {
    text-align: right;
}

.chat-input-bar {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    display: flex;
    gap: 8px;
    padding: 10px 16px;
    background: var(--card-bg, white);
    border-top: 1px solid var(--border-color, #eee);
    z-index: 1000;
}

.chat-input-bar .form-control {
    border-radius: 24px;
    padding: 10px 18px;
}

.chat-send-btn {
    background: var(--primary-color, #7c3aed);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-send-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

[data-theme="dark"] .chat-other {
    background: #2d2d2d;
    color: #ddd;
}

[data-theme="dark"] .chat-input-bar {
    background: #1a1a1a;
    border-color: #333;
}


/* ============================================
   📸 תמונות - Photo Album
   ============================================ */
.photos-upload-card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.photos-upload-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color, var(--planily-pink)));
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
}

.photos-upload-btn:hover {
    color: white;
    transform: translateY(-2px);
}

.photos-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.photo-card {
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background: var(--card-bg, white);
}

.photo-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.photo-img:hover {
    transform: scale(1.05);
}

.photo-info {
    padding: 8px 10px;
}

.photo-caption {
    font-size: 0.85rem;
    font-weight: 600;
}

/* Lightbox */
.photo-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.photo-lightbox.active {
    display: flex;
}

.photo-lightbox-content {
    text-align: center;
    max-width: 95%;
}

.photo-lightbox img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 5px 30px rgba(0,0,0,0.5);
}

[data-theme="dark"] .photo-card {
    background: #1e1e1e;
}

[data-theme="dark"] .photos-upload-card {
    background: #1e1e1e;
}

@media (max-width: 576px) {
    .photos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .photo-img {
        height: 140px;
    }
    .timer-num {
        font-size: 2.5rem;
    }
}

/* ============================
   🧩 חידת היום - Daily Riddle
   ============================ */

.riddle-page {
    max-width: 600px;
    margin: 0 auto;
}

.riddle-card {
    background: var(--card-bg, #fff);
    border-radius: 24px;
    padding: 32px 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.08);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s;
}

.riddle-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--planily-gradient);
}

.riddle-solved {
    border: 2px solid #2ecc71;
}

.riddle-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #2ecc71;
    color: #fff;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.riddle-icon {
    font-size: 3.5rem;
    margin-bottom: 16px;
    animation: riddle-float 3s ease-in-out infinite;
}

@keyframes riddle-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.riddle-question {
    font-size: 1.25rem;
    font-weight: 700;
    line-height: 1.8;
    margin-bottom: 24px;
    color: var(--bs-body-color);
}

.riddle-form .form-control {
    border-radius: 12px 0 0 12px;
    padding: 12px 16px;
    font-size: 1rem;
    border: 2px solid #eee;
}

.riddle-form .form-control:focus {
    border-color: var(--planily-purple);
    box-shadow: 0 0 0 3px var(--planily-purple-light);
}

.riddle-form .btn-gradient {
    border-radius: 0 12px 12px 0;
    padding: 12px 20px;
    background: var(--planily-gradient);
    border: none;
    color: #fff;
    font-weight: 700;
}

.riddle-answer-reveal {
    padding: 16px;
    animation: riddle-pop 0.5s ease;
}

.riddle-correct-icon {
    font-size: 3rem;
    margin-bottom: 8px;
}

.riddle-answer-text {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.riddle-points {
    color: #f39c12;
    font-weight: 700;
}

@keyframes riddle-pop {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.riddle-solvers {
    background: var(--card-bg, #fff);
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.riddle-solver-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(var(--bs-primary-rgb, 124,58,237), 0.08);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.riddle-info {
    padding: 12px;
}

/* Dark mode riddle */
[data-theme="dark"] .riddle-card {
    background: #2d2d2d;
}
[data-theme="dark"] .riddle-solvers {
    background: #2d2d2d;
}
[data-theme="dark"] .riddle-form .form-control {
    background: #333;
    border-color: #555;
    color: #eee;
}

/* ============================
   🎮 Games - משחקים
   ============================ */

.games-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    max-width: 500px;
    margin: 0 auto;
}

.game-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    border-radius: 20px;
    background: var(--card-bg, #fff);
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.game-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    text-decoration: none;
    color: inherit;
}
.game-card-icon { font-size: 3rem; margin-bottom: 10px; }
.game-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 4px; }
.game-card-desc { font-size: 0.8rem; opacity: 0.6; }

/* --- Tic Tac Toe --- */
.ttt-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    max-width: 320px;
    margin: 0 auto;
    background: var(--bs-primary, #7c3aed);
    padding: 6px;
    border-radius: 16px;
}
.ttt-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    background: var(--card-bg, #fff);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.15s, transform 0.15s;
    user-select: none;
}
.ttt-cell:hover { background: rgba(var(--bs-primary-rgb, 124,58,237), 0.08); }
.ttt-cell.ttt-x { color: #e74c3c; }
.ttt-cell.ttt-o { color: #3498db; }
.ttt-cell.ttt-win {
    background: rgba(46, 204, 113, 0.2);
    animation: ttt-pulse 0.6s ease-in-out infinite alternate;
}
@keyframes ttt-pulse { from { transform: scale(1); } to { transform: scale(1.08); } }

.ttt-score { display: flex; justify-content: center; gap: 20px; }
.ttt-score-item {
    display: flex; flex-direction: column; align-items: center;
    padding: 8px 16px; background: var(--card-bg, #fff);
    border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    font-size: 0.85rem; font-weight: 600;
}
.ttt-score-num { font-size: 1.5rem; font-weight: 800; color: var(--bs-primary, #7c3aed); }

.ttt-difficulty { display: flex; gap: 8px; justify-content: center; }
.ttt-diff-btn {
    flex: 1; padding: 10px 8px; border: 2px solid #ddd; border-radius: 12px;
    background: var(--card-bg, #fff); font-size: 0.9rem; font-weight: 600;
    cursor: pointer; transition: all 0.2s;
}
.ttt-diff-btn:hover { border-color: var(--bs-primary, #7c3aed); }
.ttt-diff-btn.active { border-color: var(--bs-primary, #7c3aed); background: var(--bs-primary, #7c3aed); color: #fff; }

.ttt-win-modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6); display: flex; align-items: center; justify-content: center; z-index: 9999;
}
.ttt-win-content {
    background: var(--card-bg, #fff); border-radius: 24px; padding: 32px 40px;
    text-align: center; box-shadow: 0 16px 48px rgba(0,0,0,0.2); animation: ttt-pop 0.3s ease;
}
.ttt-win-emoji { font-size: 4rem; margin-bottom: 8px; }
.ttt-win-text { font-size: 1.4rem; font-weight: 700; }
@keyframes ttt-pop { from { transform: scale(0.5); opacity: 0; } to { transform: scale(1); opacity: 1; } }

/* --- Chess --- */
.chess-board-wrapper { display: flex; justify-content: center; }
.chess-board {
    display: grid; grid-template-columns: repeat(8, 1fr);
    width: 100%; max-width: 360px; aspect-ratio: 1;
    border-radius: 8px; overflow: hidden; box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.chess-cell {
    display: flex; align-items: center; justify-content: center;
    font-size: clamp(1.5rem, 5vw, 2.5rem); cursor: pointer;
    transition: background 0.15s; user-select: none; position: relative;
}
.chess-light { background: #f0d9b5; }
.chess-dark { background: #b58863; }
.chess-selected { background: rgba(255, 255, 0, 0.5) !important; }
.chess-valid::after {
    content: ''; position: absolute; width: 28%; height: 28%;
    background: rgba(0, 0, 0, 0.2); border-radius: 50%;
}
.chess-capture { background: rgba(255, 0, 0, 0.3) !important; }
.chess-last-move { background: rgba(155, 199, 0, 0.4) !important; }
.chess-piece-white, .chess-piece-black { filter: drop-shadow(1px 1px 1px rgba(0,0,0,0.3)); }

.chess-captured {
    display: flex; align-items: center; gap: 6px; padding: 4px 8px;
    font-size: 0.85rem; max-width: 360px; margin: 0 auto;
}
.chess-captured-label { font-weight: 600; font-size: 0.75rem; white-space: nowrap; }
.chess-captured-pieces { font-size: 1.1rem; letter-spacing: 2px; }

.chess-promo-options { display: flex; gap: 12px; justify-content: center; }
.chess-promo-btn {
    font-size: 2.5rem; background: var(--card-bg, #fff); border: 2px solid #ddd;
    border-radius: 12px; padding: 8px 14px; cursor: pointer;
    transition: transform 0.15s, border-color 0.15s;
}
.chess-promo-btn:hover { transform: scale(1.15); border-color: var(--bs-primary, #7c3aed); }

/* --- Memory Game --- */
.memory-board {
    display: grid;
    gap: 8px;
    max-width: 380px;
    margin: 0 auto;
    perspective: 600px;
}
.memory-card {
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
}
.memory-card-inner {
    width: 100%;
    height: 100%;
    transition: transform 0.5s;
    transform-style: preserve-3d;
    position: relative;
}
.memory-card.flipped .memory-card-inner,
.memory-card.matched .memory-card-inner {
    transform: rotateY(180deg);
}
.memory-card-front, .memory-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.memory-card-front {
    background: linear-gradient(135deg, var(--bs-primary, #7c3aed), rgba(var(--bs-primary-rgb, 124,58,237), 0.7));
    color: #fff;
}
.memory-card-back {
    background: var(--card-bg, #fff);
    transform: rotateY(180deg);
}
.memory-card.matched .memory-card-back {
    background: rgba(46, 204, 113, 0.15);
    border: 2px solid #2ecc71;
}

/* --- Snake Game --- */
.snake-container {
    position: relative;
    max-width: 320px;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}
.snake-container canvas {
    display: block;
    width: 100%;
    height: auto;
}
.snake-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}
.snake-overlay-text {
    text-align: center;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.snake-controls {
    display: grid;
    grid-template-columns: repeat(3, 60px);
    gap: 6px;
    justify-content: center;
}
.snake-ctrl-btn {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    border: 2px solid #ddd;
    background: var(--card-bg, #fff);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.1s;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.snake-ctrl-btn:active {
    transform: scale(0.9);
}

/* --- 2048 Game --- */
.g2048-board {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    max-width: 340px;
    margin: 0 auto;
    background: #bbada0;
    padding: 10px;
    border-radius: 12px;
}
.g2048-tile {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 800;
    border-radius: 8px;
    background: #cdc1b4;
    color: #776e65;
    transition: all 0.15s;
}
.g2048-tile-2 { background: #eee4da; }
.g2048-tile-4 { background: #ede0c8; }
.g2048-tile-8 { background: #f2b179; color: #fff; }
.g2048-tile-16 { background: #f59563; color: #fff; }
.g2048-tile-32 { background: #f67c5f; color: #fff; }
.g2048-tile-64 { background: #f65e3b; color: #fff; }
.g2048-tile-128 { background: #edcf72; color: #fff; font-size: 1.4rem; }
.g2048-tile-256 { background: #edcc61; color: #fff; font-size: 1.4rem; }
.g2048-tile-512 { background: #edc850; color: #fff; font-size: 1.4rem; }
.g2048-tile-1024 { background: #edc53f; color: #fff; font-size: 1.2rem; }
.g2048-tile-2048 { background: #edc22e; color: #fff; font-size: 1.2rem; box-shadow: 0 0 20px rgba(237,194,46,0.6); }

/* --- Hangman Game --- */
.hangman-drawing {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}
.hangman-drawing canvas {
    border-radius: 12px;
    background: var(--card-bg, #fff);
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}
.hangman-word {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
    direction: rtl;
}
.hangman-letter {
    width: 40px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    border-bottom: 3px solid var(--bs-primary, #7c3aed);
    color: transparent;
    transition: color 0.3s;
}
.hangman-letter.revealed {
    color: inherit;
}
.hangman-keyboard {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: 400px;
    margin: 0 auto;
}
.hangman-key {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid #ddd;
    background: var(--card-bg, #fff);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}
.hangman-key:hover:not(:disabled) {
    border-color: var(--bs-primary, #7c3aed);
    transform: scale(1.05);
}
.hangman-key:disabled {
    opacity: 0.4;
    cursor: default;
}
.hangman-key-correct {
    background: #2ecc71 !important;
    color: #fff !important;
    border-color: #27ae60 !important;
}
.hangman-key-wrong {
    background: #e74c3c !important;
    color: #fff !important;
    border-color: #c0392b !important;
}

/* --- Minesweeper Game --- */
.mines-board {
    display: grid;
    gap: 2px;
    max-width: 380px;
    margin: 0 auto;
    background: #bbb;
    padding: 4px;
    border-radius: 8px;
}
.mines-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.8rem, 3vw, 1.1rem);
    font-weight: 700;
    background: linear-gradient(145deg, #d4d4d4, #c0c0c0);
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    transition: background 0.1s;
    box-shadow: inset 1px 1px 2px rgba(255,255,255,0.4), inset -1px -1px 2px rgba(0,0,0,0.15);
}
.mines-cell:hover:not(.mines-revealed) {
    background: linear-gradient(145deg, #e0e0e0, #ccc);
}
.mines-revealed {
    background: #e8e8e8 !important;
    box-shadow: inset 0 0 1px rgba(0,0,0,0.1);
    cursor: default;
}
.mines-boom {
    background: #ff4444 !important;
}

/* Dark mode games */
[data-theme="dark"] .game-card { background: #2d2d2d; }
[data-theme="dark"] .ttt-cell { background: #2d2d2d; }
[data-theme="dark"] .ttt-score-item { background: #2d2d2d; }
[data-theme="dark"] .ttt-diff-btn { background: #2d2d2d; border-color: #555; }
[data-theme="dark"] .ttt-diff-btn.active { background: var(--bs-primary, #7c3aed); border-color: var(--bs-primary, #7c3aed); }
[data-theme="dark"] .ttt-win-content, [data-theme="dark"] .chess-promo-btn { background: #333; }
[data-theme="dark"] .chess-light { background: #769656; }
[data-theme="dark"] .chess-dark { background: #4e7837; }
[data-theme="dark"] .memory-card-back { background: #2d2d2d; }
[data-theme="dark"] .snake-ctrl-btn { background: #2d2d2d; border-color: #555; }
[data-theme="dark"] .g2048-board { background: #5a524a; }
[data-theme="dark"] .g2048-tile { background: #3c3a32; color: #ccc; }
[data-theme="dark"] .hangman-drawing canvas { background: #2d2d2d; }
[data-theme="dark"] .hangman-key { background: #2d2d2d; border-color: #555; }
[data-theme="dark"] .mines-cell { background: linear-gradient(145deg, #444, #3a3a3a); box-shadow: inset 1px 1px 2px rgba(255,255,255,0.1), inset -1px -1px 2px rgba(0,0,0,0.3); }
[data-theme="dark"] .mines-revealed { background: #2a2a2a !important; }
[data-theme="dark"] .mines-board { background: #555; }

/* === Wordle === */
.wordle-board { display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 0 auto 15px; }
.wordle-row { display: flex; gap: 6px; }
.wordle-cell { width: 56px; height: 56px; border: 2px solid #ccc; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; font-weight: bold; transition: all 0.3s; background: white; }
.wordle-cell.filled { border-color: #888; animation: wordle-pop 0.15s ease; }
.wordle-cell.correct { background: #6aaa64; color: white; border-color: #6aaa64; }
.wordle-cell.present { background: #c9b458; color: white; border-color: #c9b458; }
.wordle-cell.absent { background: #787c7e; color: white; border-color: #787c7e; }
@keyframes wordle-pop { 0% { transform: scale(1); } 50% { transform: scale(1.1); } 100% { transform: scale(1); } }
.wordle-keyboard { display: flex; flex-direction: column; align-items: center; gap: 5px; max-width: 500px; margin: 0 auto; }
.wordle-kb-row { display: flex; gap: 4px; justify-content: center; }
.wordle-key { min-width: 32px; height: 44px; border: none; border-radius: 6px; background: #d3d6da; font-size: 1rem; font-weight: bold; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.wordle-key:hover { filter: brightness(0.9); }
.wordle-key.wide { min-width: 56px; font-size: 0.8rem; }
.wordle-key.correct { background: #6aaa64; color: white; }
.wordle-key.present { background: #c9b458; color: white; }
.wordle-key.absent { background: #787c7e; color: white; }
.wordle-msg { font-size: 1.1rem; font-weight: bold; min-height: 30px; }
[data-theme="dark"] .wordle-cell { background: #333; border-color: #555; color: #eee; }
[data-theme="dark"] .wordle-key { background: #555; color: #eee; }

/* === Number Guessing === */
.numguess-therm { width: 60px; height: 200px; border: 3px solid #ccc; border-radius: 30px 30px 40px 40px; position: relative; overflow: hidden; background: #f9f9f9; margin: 0 auto; }
.numguess-fill { position: absolute; bottom: 0; width: 100%; border-radius: 0 0 37px 37px; transition: height 0.6s ease, background 0.4s ease; }
.numguess-label { font-size: 1.5rem; margin-top: 8px; }
.numguess-history { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; max-width: 350px; margin: 0 auto; }
.numguess-guess { padding: 4px 10px; border-radius: 12px; font-weight: bold; font-size: 0.9rem; border: 2px solid; }
[data-theme="dark"] .numguess-therm { background: #333; border-color: #555; }

/* === Color by Numbers === */
.coloring-palette { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.coloring-color-btn { width: 44px; height: 44px; border-radius: 50%; border: 3px solid transparent; cursor: pointer; position: relative; transition: all 0.2s; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
.coloring-color-btn:hover { transform: scale(1.1); }
.coloring-color-btn.active { border-color: #333; transform: scale(1.15); box-shadow: 0 3px 10px rgba(0,0,0,0.3); }
.coloring-color-num { color: white; font-weight: bold; font-size: 0.9rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); }
.coloring-board-wrapper { display: flex; justify-content: center; }
.coloring-board { display: grid; gap: 2px; max-width: 350px; width: 100%; }
.coloring-cell { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; font-size: 0.85rem; font-weight: bold; color: #555; background: #f0f0f0; border-radius: 4px; cursor: pointer; transition: all 0.2s; border: 1px solid #ddd; user-select: none; }
.coloring-cell:hover:not(.coloring-empty):not(.coloring-correct) { filter: brightness(0.92); }
.coloring-empty { background: white; border-color: transparent; cursor: default; }
.coloring-correct { border-color: transparent; }
@keyframes coloring-pop { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes coloring-shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
[data-theme="dark"] .coloring-cell { background: #444; border-color: #555; color: #bbb; }
[data-theme="dark"] .coloring-empty { background: #2d2d2d; }
[data-theme="dark"] .coloring-color-btn.active { border-color: #eee; }

/* === Simon Says === */
.simon-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; max-width: 280px; margin: 0 auto; }
.simon-btn { width: 100%; aspect-ratio: 1; border: none; border-radius: 20px; cursor: pointer; transition: all 0.15s; opacity: 0.7; box-shadow: 0 4px 12px rgba(0,0,0,0.2); }
.simon-btn:hover { opacity: 0.85; }
.simon-red { background: #c92a2a; }
.simon-green { background: #2b8a3e; }
.simon-blue { background: #1864ab; }
.simon-yellow { background: #e67700; }
.simon-btn.simon-active { opacity: 1; transform: scale(1.05); box-shadow: 0 0 30px rgba(255,255,255,0.4); }
.simon-red.simon-active { background: #ff6b6b; }
.simon-green.simon-active { background: #69db7c; }
.simon-blue.simon-active { background: #74c0fc; }
.simon-yellow.simon-active { background: #ffe066; }
.simon-msg { font-size: 1.2rem; font-weight: bold; min-height: 30px; }
[data-theme="dark"] .simon-btn { box-shadow: 0 4px 12px rgba(0,0,0,0.4); }

/* === Puzzle 15 === */
.p15-board-wrap { display: flex; justify-content: center; }
.p15-board { display: grid; gap: 4px; background: #dee2e6; padding: 6px; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.p15-tile { display: flex; align-items: center; justify-content: center; font-weight: bold; border-radius: 8px; cursor: pointer; transition: all 0.15s; user-select: none; background: linear-gradient(145deg, #667eea, #764ba2); color: white; box-shadow: 0 2px 6px rgba(0,0,0,0.15); }
.p15-tile:hover:not(.p15-empty) { transform: scale(1.05); filter: brightness(1.1); }
.p15-tile:active:not(.p15-empty) { transform: scale(0.95); }
.p15-empty { background: transparent !important; box-shadow: none !important; cursor: default; }
[data-theme="dark"] .p15-board { background: #444; }
[data-theme="dark"] .p15-tile { background: linear-gradient(145deg, #5a67d8, #6b46c1); }

/* === Reaction Time === */
.react-zone { width: 100%; max-width: 400px; height: 250px; margin: 0 auto; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s; background: linear-gradient(145deg, #e9ecef, #dee2e6); user-select: none; box-shadow: 0 4px 15px rgba(0,0,0,0.1); }
.react-zone:hover { transform: scale(1.02); }
.react-icon { font-size: 3.5rem; margin-bottom: 10px; }
.react-text { font-size: 1.3rem; font-weight: bold; }
.react-time { font-size: 2.5rem; font-weight: bold; margin-top: 5px; }
.react-waiting { background: linear-gradient(145deg, #ffe3e3, #ffc9c9); }
.react-ready { background: linear-gradient(145deg, #d3f9d8, #b2f2bb); animation: react-pulse 0.5s ease infinite alternate; }
.react-early { background: linear-gradient(145deg, #fff3bf, #ffe066); }
.react-amazing { background: linear-gradient(145deg, #d0bfff, #b197fc); color: white; }
.react-great { background: linear-gradient(145deg, #d3f9d8, #8ce99a); }
.react-good { background: linear-gradient(145deg, #c5f6fa, #99e9f2); }
.react-ok { background: linear-gradient(145deg, #fff3bf, #ffd43b); }
.react-slow { background: linear-gradient(145deg, #ffe3e3, #ffa8a8); }
@keyframes react-pulse { from { transform: scale(1); } to { transform: scale(1.03); } }
.react-results { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.react-result-badge { padding: 4px 12px; border-radius: 20px; font-weight: bold; font-size: 0.85rem; }
.badge-amazing { background: #d0bfff; color: #5f3dc4; }
.badge-great { background: #d3f9d8; color: #2b8a3e; }
.badge-good { background: #c5f6fa; color: #0c8599; }
.badge-ok { background: #fff3bf; color: #e67700; }
.badge-slow { background: #ffe3e3; color: #c92a2a; }
[data-theme="dark"] .react-zone { background: linear-gradient(145deg, #333, #444); }
[data-theme="dark"] .react-waiting { background: linear-gradient(145deg, #4a2020, #5a2a2a); }
[data-theme="dark"] .react-ready { background: linear-gradient(145deg, #1a4a25, #2a5a35); }

/* Click Speed */
.cs-big-btn { width: 200px; height: 200px; border-radius: 50%; font-size: 1.5rem; font-weight: bold; border: 4px solid rgba(0,0,0,0.1); background: linear-gradient(145deg, #4dabf7, #228be6); color: #fff; cursor: pointer; transition: transform 0.05s, box-shadow 0.05s; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto; user-select: none; }
.cs-big-btn:active, .cs-active { transform: scale(0.93) !important; box-shadow: 0 2px 8px rgba(34,139,230,0.3) !important; }
.cs-big-btn:hover { transform: scale(1.03); box-shadow: 0 8px 24px rgba(34,139,230,0.4); }
.cs-btn-wrap { position: relative; display: flex; justify-content: center; margin: 20px 0; }
.cs-progress { height: 8px; border-radius: 4px; background: #e9ecef; overflow: hidden; max-width: 300px; margin: 0 auto; }
.cs-progress-bar { height: 100%; background: linear-gradient(90deg, #51cf66, #fcc419, #ff6b6b); border-radius: 4px; transition: width 0.1s; }
[data-theme="dark"] .cs-big-btn { background: linear-gradient(145deg, #3b8dd9, #1c7ed6); border-color: rgba(255,255,255,0.1); }
[data-theme="dark"] .cs-progress { background: #495057; }

/* Odd Emoji Out */
.oeo-board { display: grid; gap: 10px; max-width: 400px; margin: 0 auto; justify-items: center; }
.oeo-cell { width: 55px; height: 55px; display: flex; align-items: center; justify-content: center; border-radius: 14px; background: linear-gradient(145deg, #f8f9fa, #e9ecef); cursor: pointer; font-size: 1.8rem; transition: transform 0.15s, background 0.2s, box-shadow 0.2s; user-select: none; box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.oeo-cell:hover { transform: scale(1.12); box-shadow: 0 4px 14px rgba(0,0,0,0.15); }
.oeo-correct { background: linear-gradient(145deg, #d3f9d8, #b2f2bb) !important; transform: scale(1.2) !important; box-shadow: 0 0 20px rgba(81,207,102,0.5) !important; pointer-events: none; }
.oeo-wrong { background: #ffe3e3 !important; animation: math-shake 0.3s; pointer-events: none; opacity: 0.6; }
.oeo-answer { background: linear-gradient(145deg, #fff3bf, #ffe066) !important; animation: oeo-pulse 0.5s ease infinite alternate; }
@keyframes oeo-pulse { to { transform: scale(1.15); box-shadow: 0 0 16px rgba(252,196,25,0.6); } }
.bg-orange { background: #fd7e14 !important; color: #fff; }
[data-theme="dark"] .oeo-cell { background: linear-gradient(145deg, #343a40, #2b3035); box-shadow: 0 2px 8px rgba(0,0,0,0.2); }

/* Calculator */
.calc-container { max-width: 340px; margin: 0 auto; }
.calc-display { background: linear-gradient(145deg, #212529, #343a40); border-radius: 16px; padding: 20px 16px 12px; margin-bottom: 12px; text-align: left; direction: ltr; overflow: hidden; }
.calc-expression { color: #adb5bd; font-size: 0.95rem; min-height: 24px; word-break: break-all; }
.calc-result { color: #fff; font-size: 3rem; font-weight: bold; word-break: break-all; line-height: 1.1; }
.calc-buttons { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-btn { height: 60px; border-radius: 14px; border: none; font-size: 1.4rem; font-weight: 600; cursor: pointer; background: linear-gradient(145deg, #f8f9fa, #e9ecef); color: #212529; transition: transform 0.08s, box-shadow 0.08s; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.calc-btn:hover { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.calc-btn:active { transform: scale(0.95); }
.calc-op { background: linear-gradient(145deg, #e7f5ff, #d0ebff); color: #228be6; font-size: 1.5rem; }
.calc-fn { background: linear-gradient(145deg, #f3f0ff, #e5dbff); color: #7048e8; }
.calc-eq { background: linear-gradient(145deg, #228be6, #1c7ed6); color: #fff; font-size: 1.6rem; }
.calc-eq:hover { background: linear-gradient(145deg, #339af0, #228be6); }
.calc-zero { grid-column: span 2; }
.calc-history { background: #f8f9fa; border-radius: 12px; padding: 12px; margin-top: 8px; max-height: 200px; overflow-y: auto; }
.calc-history-item { padding: 6px 10px; border-radius: 8px; cursor: pointer; direction: ltr; text-align: left; font-size: 0.9rem; color: #495057; transition: background 0.15s; }
.calc-history-item:hover { background: #e9ecef; }
[data-theme="dark"] .calc-btn { background: linear-gradient(145deg, #495057, #3e444a); color: #f8f9fa; box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
[data-theme="dark"] .calc-op { background: linear-gradient(145deg, #1c3f5e, #1a3550); color: #74c0fc; }
[data-theme="dark"] .calc-fn { background: linear-gradient(145deg, #2e2048, #3a2860); color: #b197fc; }
[data-theme="dark"] .calc-history { background: #343a40; }
[data-theme="dark"] .calc-history-item { color: #dee2e6; }
[data-theme="dark"] .calc-history-item:hover { background: #495057; }

/* Emoji Catch */
.ec-target-label { font-size: 0.9rem; color: #868e96; }
.ec-target { font-size: 3rem; margin: 4px 0; }
@keyframes ec-bounce { 0% { transform: scale(0.5); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
.ec-board { display: grid; gap: 8px; max-width: 400px; margin: 0 auto; justify-items: center; }
.ec-cell { display: flex; align-items: center; justify-content: center; border-radius: 12px; background: linear-gradient(145deg, #f8f9fa, #e9ecef); cursor: pointer; transition: transform 0.1s, background 0.2s; user-select: none; box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.ec-cell:hover { transform: scale(1.1); }
@keyframes ec-pop { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.ec-correct { background: #d3f9d8 !important; transform: scale(0.8); pointer-events: none; }
.ec-wrong { background: #ffe3e3 !important; animation: math-shake 0.3s; pointer-events: none; }
[data-theme="dark"] .ec-cell { background: linear-gradient(145deg, #343a40, #2b3035); box-shadow: 0 2px 6px rgba(0,0,0,0.2); }
[data-theme="dark"] .ec-target-label { color: #adb5bd; }

@media (max-width: 576px) {
    .ttt-cell { font-size: 2.2rem; }
    .chess-board { max-width: 100%; }
    .g2048-tile { font-size: 1.2rem; }
    .hangman-key { width: 34px; height: 34px; font-size: 0.95rem; }
    .hangman-letter { width: 32px; height: 40px; font-size: 1.3rem; }
    .wordle-cell { width: 48px; height: 48px; font-size: 1.3rem; }
    .wordle-key { min-width: 26px; height: 38px; font-size: 0.9rem; }
    .coloring-cell { font-size: 0.75rem; }
    .coloring-color-btn { width: 36px; height: 36px; }
    .simon-board { max-width: 220px; gap: 8px; }
    .react-zone { height: 200px; }
    .react-icon { font-size: 2.5rem; }
    .react-time { font-size: 2rem; }
    .cs-big-btn { width: 160px; height: 160px; font-size: 1.2rem; }
    .oeo-cell { width: 44px; height: 44px; font-size: 1.4rem; }
    .calc-btn { height: 52px; font-size: 1.2rem; }
    .ec-cell { border-radius: 8px; }
}

/* ============================
   🧩 Feature Picker - בחירת פיצ'רים
   ============================ */

.features-page {
    max-width: 600px;
    margin: 0 auto;
}

.features-welcome-emoji {
    font-size: 4rem;
    animation: riddle-float 3s ease-in-out infinite;
}

.features-section-title {
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid rgba(var(--bs-primary-rgb, 124,58,237), 0.15);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.feature-card {
    position: relative;
    padding: 16px 12px;
    border-radius: 16px;
    background: var(--card-bg, #fff);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    border: 2px solid transparent;
    cursor: pointer;
}

.feature-mandatory {
    opacity: 0.7;
    cursor: default;
    border-color: #2ecc71;
}

.feature-optional:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.1);
}

.feature-checkbox {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feature-checkbox:checked ~ .feature-card-check .feature-unchecked { display: none; }
.feature-checkbox:checked ~ .feature-card-check .feature-checked { display: inline; color: #2ecc71; }
.feature-checkbox:not(:checked) ~ .feature-card-check .feature-unchecked { display: inline; color: #ccc; }
.feature-checkbox:not(:checked) ~ .feature-card-check .feature-checked { display: none; }

.feature-checkbox:checked ~ .feature-card-emoji { transform: scale(1.1); }

.feature-card input:checked + .feature-card-check ~ * {
    /* selected state */
}

label.feature-optional:has(input:checked) {
    border-color: var(--planily-purple, #7c3aed);
    background: rgba(var(--bs-primary-rgb, 124,58,237), 0.05);
}

.feature-card-check {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 1.2rem;
}

.feature-card-emoji {
    font-size: 2.2rem;
    margin-bottom: 8px;
    transition: transform 0.2s;
}

.feature-card-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.feature-card-desc {
    font-size: 0.7rem;
    color: #888;
    line-height: 1.3;
}

.features-submit-btn {
    background: var(--planily-gradient);
    border: none;
    color: #fff;
    border-radius: 16px;
    font-weight: 700;
    padding: 14px 40px;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}
.features-submit-btn:hover {
    transform: translateY(-2px);
    color: #fff;
}

[data-theme="dark"] .feature-card {
    background: #2d2d2d;
}
[data-theme="dark"] label.feature-optional:has(input:checked) {
    background: rgba(var(--bs-primary-rgb, 124,58,237), 0.15);
}

@media (max-width: 400px) {
    .features-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .feature-card { padding: 12px 8px; }
    .feature-card-emoji { font-size: 1.8rem; }
}

