* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
}

body {
    background-color: #f4f2fa;
    color: #333;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.stage {
    display: none;
    width: 100%;
    max-width: 850px;
    animation: fadeIn 0.5s ease-in-out forwards;
}

.stage.active { display: block; }

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

/* --- Terminal Style --- */
.terminal-box {
    background-color: #1a1a24;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.3);
    overflow: hidden;
    color: #a6ebb5;
    font-family: monospace;
    cursor: pointer;
}
.terminal-header { background-color: #25252e; padding: 12px; display: flex; align-items: center; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; display: inline-block; }
.red { background-color: #ff5f56; }
.yellow { background-color: #ffbd2e; }
.green { background-color: #27c93f; }
.terminal-header .title { color: #888; margin-right: auto; font-size: 0.85rem; }
.terminal-body { padding: 30px; font-size: 1.1rem; line-height: 1.8; min-height: 250px;}
.skip-hint { text-align: center; color: #777; font-size: 0.85rem; margin-top: 10px; font-weight: bold;}

.btn-terminal {
    background-color: #705ecf;
    color: white;
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 25px;
    font-weight: bold;
    animation: bounce 1.5s infinite;
}
@keyframes bounce { 0%, 100% {transform:translateY(0);} 50% {transform:translateY(-5px);} }

/* --- Quiz Style --- */
.quiz-container { background: white; padding: 40px; border-radius: 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.04); text-align: center; }
.quiz-header h2 { color: #4c3c88; margin-bottom: 20px; }
.progress-bar { background: #eeeaf7; height: 8px; border-radius: 4px; margin-bottom: 35px; overflow: hidden; }
#progress { background: #705ecf; height: 100%; transition: 0.4s; }
.question-text { font-size: 1.3rem; font-weight: bold; color: #222; margin-bottom: 30px; }
.options-container { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.option-btn {
    background: #fcfbfe; border: 2px solid #e5e1f4; padding: 16px; font-size: 1.1rem;
    border-radius: 12px; cursor: pointer; transition: 0.2s; font-weight: bold; color: #444;
}
.option-btn:hover { background: #f3f0ff; border-color: #705ecf; color: #705ecf; }

/* --- Modal Overlay Style --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 23, 44, 0.96); display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; visibility: hidden; transition: 0.4s; cursor: pointer;
}
.modal-overlay.show { opacity: 1; visibility: visible; }
.modal-content { text-align: center; color: white; background: #231f38; padding: 40px 50px; border-radius: 20px; box-shadow: 0 10px 40px rgba(0,0,0,0.5);}
.modal-status { margin-top: 10px; font-size: 1.7rem; font-weight: bold; color: #44ffaa;}

/* --- Dashboard Style --- */
.dash-header { text-align: center; margin-bottom: 40px; }
.dash-header h1 { color: #4c3c88; font-size: 2.3rem; margin-bottom: 10px; }
.dash-header p { color: #666; font-size: 1.1rem; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }
.dash-card { background: white; padding: 30px; border-radius: 20px; box-shadow: 0 10px 25px rgba(0,0,0,0.03); text-align: center;}
.card-icon { font-size: 2rem; color: #705ecf; margin-bottom: 15px; }
.message-card { grid-column: span 2; border-right: 6px solid #705ecf; text-align: right; line-height: 1.9; font-size: 1.15rem; }
.timer-display { font-size: 1.6rem; font-weight: bold; color: #e74c3c; background: #fdf2f2; padding: 15px; border-radius: 12px; margin-top: 15px;}
.scream-title-card { grid-column: span 2; background: #fff2f2; border: 2px dashed #ff8585;}
.scream-note { font-style: italic; color: #e74c3c; font-weight: bold; margin-top: 5px; }

/* --- Slider (Carousel) Modern Style --- */
.slider-wrapper {
    grid-column: span 2;
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 15px auto 0 auto;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    background: #fff;
    border: 6px solid #fff;
}
.slider-container {
    display: flex;
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    width: 100%;
}
.slide-item {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #fff;
}
.slide-item img {
    width: 100%;
    height: auto;
    max-height: 480px;
    display: block;
    object-fit: contain;
}
.slider-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(112, 94, 207, 0.85); color: white; border: none;
    width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
    z-index: 10; display: flex; justify-content: center; align-items: center;
    transition: 0.2s; font-size: 1.1rem;
}
.slider-btn:hover { background: rgba(112, 94, 207, 1); scale: 1.05; }
.prev-btn { right: 10px; }
.next-btn { left: 10px; }

/* الفوتر */
.dash-footer { grid-column: span 2; text-align: center; margin-top: 40px; color: #888; font-size: 0.95rem; border-top: 1px solid #e1dde9; padding-top: 20px;}

@media (prefers-reduced-motion: reduce) {
    .stage, .btn-terminal, .slider-container, .modal-overlay {
        animation: none !important;
        transition: none !important;
    }
    .btn-terminal { animation: none; }
}

@media (max-width: 768px) {
    .options-container, .dashboard-grid { grid-template-columns: 1fr; }
    .message-card, .scream-title-card, .slider-wrapper { grid-column: span 1; }
}
