:root {
    --primary-color: #e74c3c; /* אדום פראמדיק */
    --primary-dark: #c0392b;
    --secondary-color: #34495e;
    --bg-color: #ecf0f1;
    --card-bg: #ffffff;
    --text-color: #2c3e50;
    --success: #2ecc71;
    --error: #e74c3c;
    --radius: 12px;
    --shadow: 0 4px 6px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    direction: rtl;
    height: 100vh;
    overflow: hidden; /* מניעת גלילה של כל העמוד באפליקציה */
}

/* --- Header --- */
.main-header {
    background-color: var(--secondary-color);
    color: white;
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.icon-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* --- Main Layout --- */
.app-container {
    height: calc(100vh - 60px);
    overflow-y: auto;
    position: relative;
}

/* הסתרת סקציות לא פעילות */
.hidden-section {
    display: none !important;
}

.active-section {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Dashboard Menu (Grid) --- */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 15px;
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.menu-card {
    background: var(--card-bg);
    border: none;
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
    min-height: 120px;
}

.menu-card:active {
    transform: scale(0.95);
}

.menu-card .icon {
    font-size: 2.5rem;
}

.menu-card .label {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--secondary-color);
}

.highlight-card {
    border: 2px solid var(--primary-color);
    background-color: #fff5f5;
}

/* --- Placeholder Sections --- */
.placeholder-content {
    text-align: center;
    padding: 50px 20px;
}

/* --- Quiz Section Styles --- */
#quiz-section {
    padding: 15px;
    max-width: 800px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: white;
    padding: 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.filter-container {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.large-select {
    padding: 8px 15px;
    font-size: 1rem;
    border-radius: 8px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    min-width: 150px;
}

/* Stats Bar */
.stats-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.stat-box {
    flex: 1;
    background: var(--secondary-color);
    color: white;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    display: flex;
    flex-direction: column;
}

.stat-label { font-size: 0.8rem; opacity: 0.8; }
.stat-value { font-size: 1.2rem; font-weight: bold; }

/* Question Card */
.question-card {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    text-align: center;
}

#question-text {
    font-size: 1.4rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

/* Answers Grid & Buttons */
.answers-grid {
    display: grid;
    grid-template-columns: 1fr; /* בנייד - עמודה אחת */
    gap: 15px;
}

@media (min-width: 600px) {
    .answers-grid {
        grid-template-columns: 1fr 1fr; /* במסך גדול יותר - 2 עמודות */
    }
}

.btn-answer {
    background: white;
    border: 2px solid #ddd;
    color: var(--text-color);
    padding: 15px;
    font-size: 1.1rem; /* טקסט גדול וקריא */
    border-radius: 10px;
    cursor: pointer;
    min-height: 60px; /* גובה מינימלי ללחיצה נוחה */
    transition: all 0.2s;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.btn-answer:active {
    transform: scale(0.98);
    background-color: #f0f0f0;
}

/* מצבי תשובה */
.btn-answer.correct {
    background-color: var(--success);
    color: white;
    border-color: var(--success);
}

.btn-answer.wrong {
    background-color: var(--error);
    color: white;
    border-color: var(--error);
    opacity: 0.7;
}

.feedback-text {
    margin-top: 20px;
    font-weight: bold;
    min-height: 25px;
}

/* --- Modal (Result Screen) --- */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes popIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.final-score-circle {
    width: 120px;
    height: 120px;
    background: var(--secondary-color);
    color: white;
    border-radius: 50%;
    margin: 20px auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2.5rem;
    font-weight: bold;
    border: 5px solid var(--primary-color);
}

.total-label {
    font-size: 0.9rem;
    font-weight: normal;
    opacity: 0.9;
}

.cynical-text {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-dark);
    margin: 20px 0;
    padding: 15px;
    background: #f8d7da;
    border-radius: 10px;
    border-right: 5px solid var(--primary-color);
}

.action-buttons-row {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.btn-large {
    padding: 12px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    flex: 1;
}

.btn-large.primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-large.secondary {
    background-color: #95a5a6;
    color: white;
}

.back-to-menu {
    margin-top: 20px;
    padding: 10px 20px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}