/* Reset וגופנים */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    direction: rtl;
}

/* מסכים */
.screen {
    display: none;
    min-height: 100vh;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* מסך פתיחה */
#splashScreen {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

#splashScreen::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background:
        radial-gradient(circle at 20% 50%, rgba(255, 215, 0, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 105, 180, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(64, 224, 208, 0.3) 0%, transparent 50%);
    animation: rotate 20s linear infinite;
}

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

.splash-container {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 40px;
}

.animated-menorah {
    font-size: 6em;
    animation: bounce 2s ease-in-out infinite;
    display: block;
    margin-bottom: 20px;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.splash-title {
    font-size: 3em;
    color: white;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    margin-bottom: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.splash-subtitle {
    font-size: 2em;
    color: #FFD700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 40px;
}

.animated-elements {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
}

.float-element {
    position: absolute;
    font-size: 3em;
    animation: float 3s ease-in-out infinite;
}

.float-element:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.float-element:nth-child(2) {
    top: 60%;
    right: 15%;
    animation-delay: 1s;
}

.float-element:nth-child(3) {
    bottom: 20%;
    left: 20%;
    animation-delay: 2s;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-30px) rotate(10deg); }
}

/* כפתורים */
.btn-primary {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 50px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
}

.splash-btn {
    margin: 20px 0;
}

.link-secondary {
    color: white;
    text-decoration: underline;
    font-size: 1.1em;
    cursor: pointer;
    display: block;
    margin-top: 20px;
    transition: color 0.3s;
}

.link-secondary:hover {
    color: #FFD700;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* כפתור חזרה */
.btn-back {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    margin-bottom: 20px;
    transition: background 0.3s;
}

.btn-back:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* טפסים */
.form-container {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 600px;
    margin: 20px auto;
}

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

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: #333;
    font-size: 1.1em;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1em;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-left: 10px;
    cursor: pointer;
}

/* הודעות שגיאה */
.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    text-align: center;
    font-weight: bold;
}

/* ניווט */
.navbar {
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-btn {
    background: none;
    border: none;
    padding: 12px 20px;
    font-size: 1em;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s;
    font-weight: bold;
    color: #667eea;
}

.nav-btn:hover,
.nav-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* כותרות */
h1, h2 {
    color: white;
    text-align: center;
    margin: 20px 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.form-container h2 {
    color: #667eea;
    text-shadow: none;
}

/* מידע יום */
.header-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.day-info {
    font-size: 1.3em;
    color: #764ba2;
    font-weight: bold;
    margin: 15px 0;
}

.welcome-message {
    font-size: 1.1em;
    color: #555;
    margin-top: 10px;
}

/* משימות */
.tasks-container {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.task-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s, box-shadow 0.3s;
    border-right: 6px solid #667eea;
}

.task-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.task-card.completed {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    border-right-color: #4caf50;
}

.task-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-title {
    font-size: 1.4em;
    font-weight: bold;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-icon {
    font-size: 1.5em;
}

.task-status {
    font-size: 2em;
}

.task-description {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.task-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-weight: bold;
}

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

.task-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* הודעת השלמה */
.completion-message {
    background: linear-gradient(135deg, #d4fc79 0%, #96e6a1 100%);
    color: #1b5e20;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    font-size: 1.3em;
    font-weight: bold;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.5s ease-out;
}

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

/* היסטוריה */
.history-container {
    display: grid;
    gap: 20px;
}

.history-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
}

.history-card:hover {
    transform: translateX(-5px);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.15);
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.history-title {
    font-size: 1.3em;
    font-weight: bold;
    color: #667eea;
}

.history-status {
    font-size: 1.5em;
}

.history-date {
    color: #888;
    font-size: 0.9em;
}

/* זוכים */
.winners-container {
    display: grid;
    gap: 20px;
}

.winner-card {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: winnerGlow 2s ease-in-out infinite;
}

@keyframes winnerGlow {
    0%, 100% { box-shadow: 0 8px 30px rgba(255, 215, 0, 0.4); }
    50% { box-shadow: 0 8px 40px rgba(255, 215, 0, 0.8); }
}

.winner-day {
    font-size: 1.2em;
    margin-bottom: 15px;
    font-weight: bold;
}

.winner-family {
    font-size: 1.8em;
    margin: 10px 0;
    font-weight: bold;
}

.winner-prize {
    font-size: 1.3em;
    margin-top: 15px;
    background: rgba(255, 255, 255, 0.2);
    padding: 10px;
    border-radius: 10px;
}

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

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 20px;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    animation: slideDown 0.3s;
}

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

.modal-close {
    color: #aaa;
    float: left;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

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

#modalTitle {
    color: #667eea;
    margin-bottom: 15px;
}

#modalDescription {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

#modalTaskContent {
    margin: 20px 0;
}

/* העלאת קבצים */
.file-upload-container {
    border: 3px dashed #667eea;
    border-radius: 15px;
    padding: 30px;
    text-align: center;
    background: #f8f9fa;
    transition: all 0.3s;
    cursor: pointer;
}

.file-upload-container:hover {
    background: #e9ecef;
    border-color: #764ba2;
}

.file-upload-container input[type="file"] {
    display: none;
}

.file-preview {
    margin-top: 20px;
    max-width: 100%;
}

.file-preview img,
.file-preview video {
    max-width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* חידון */
.quiz-container {
    margin: 20px 0;
}

.quiz-question {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.quiz-options {
    display: grid;
    gap: 10px;
}

.quiz-option {
    display: flex;
    align-items: center;
    padding: 15px;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s;
}

.quiz-option:hover {
    border-color: #667eea;
    background: #f8f9fa;
}

.quiz-option input[type="radio"] {
    margin-left: 10px;
    cursor: pointer;
}

/* כפתורים נוספים */
.btn-secondary {
    background: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1em;
    transition: background 0.3s;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-danger:hover {
    background: #c82333;
}

/* Responsive */
@media (max-width: 768px) {
    .splash-title {
        font-size: 2em;
    }

    .splash-subtitle {
        font-size: 1.5em;
    }

    .btn-primary {
        font-size: 1.1em;
        padding: 12px 30px;
    }

    .navbar {
        flex-wrap: wrap;
    }

    .nav-btn {
        font-size: 0.9em;
        padding: 8px 12px;
    }

    .task-title {
        font-size: 1.2em;
    }

    .modal-content {
        margin: 10% 5%;
        padding: 20px;
    }
}

/* אנימציות נוספות */
@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading spinner */
.loading {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

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