/* ===== MODERNGAS KIOSK THEME ===== */
/* Corporate Branding: Blue #0066B3 | Green #00A651 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Outfit:wght@400;500;600;700;800;900&display=swap');

:root {
    --mg-blue: #0066B3;
    --mg-blue-dark: #004A80;
    --mg-blue-light: #3399D6;
    --mg-green: #00A651;
    --mg-green-dark: #007A3D;
    --mg-green-light: #33CC77;
    --bg-primary: #0a0e1a;
    --bg-secondary: #111827;
    --bg-card: rgba(17, 24, 39, 0.85);
    --bg-glass: rgba(255, 255, 255, 0.05);
    --text-primary: #ffffff;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-glass: rgba(255, 255, 255, 0.08);
    --shadow-glow-blue: 0 0 40px rgba(0, 102, 179, 0.3);
    --shadow-glow-green: 0 0 40px rgba(0, 166, 81, 0.3);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
    cursor: default;
}

/* ===== ANIMATED BACKGROUND ===== */
.kiosk-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

.kiosk-bg::before {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(0, 102, 179, 0.15) 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float-orb 8s ease-in-out infinite;
}

.kiosk-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(0, 166, 81, 0.12) 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float-orb 10s ease-in-out infinite reverse;
}

.kiosk-bg .orb-3 {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 102, 179, 0.08) 0%, transparent 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse-orb 6s ease-in-out infinite;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -30px) scale(1.1); }
}

@keyframes pulse-orb {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.5; }
    50% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

/* ===== MAIN CONTAINER ===== */
.kiosk-container {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    padding: 2rem;
    text-align: center;
}

/* ===== LOGO ===== */
.kiosk-logo {
    max-width: 420px;
    width: 80%;
    margin-bottom: 2rem;
    animation: fadeInDown 0.8s ease-out;
    filter: drop-shadow(0 4px 20px rgba(0, 102, 179, 0.3));
}

/* ===== HEADINGS ===== */
.kiosk-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.kiosk-title.gradient-blue-green {
    background: linear-gradient(135deg, var(--mg-blue-light) 0%, var(--mg-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kiosk-title.gradient-gold {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 50%, #FFD700 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

.safety-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.15), rgba(0, 102, 179, 0.15));
    border: 1px solid rgba(0, 166, 81, 0.3);
    border-radius: 50px;
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    font-weight: 700;
    color: var(--mg-green-light);
    margin-bottom: 2.5rem;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.safety-badge .icon {
    font-size: 1.4em;
}

.kiosk-subtitle {
    font-size: clamp(1rem, 2vw, 1.4rem);
    color: var(--text-secondary);
    font-weight: 400;
    margin-bottom: 2rem;
    max-width: 600px;
    line-height: 1.6;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* ===== BUTTONS ===== */
.kiosk-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 300px;
    min-height: 72px;
    padding: 1.25rem 3rem;
    border: none;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all var(--transition-smooth);
    animation: fadeInUp 0.8s ease-out 0.6s both;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kiosk-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.kiosk-btn:active {
    transform: scale(0.96);
}

.kiosk-btn-primary {
    background: linear-gradient(135deg, var(--mg-green) 0%, var(--mg-green-dark) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 166, 81, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kiosk-btn-primary:hover, .kiosk-btn-primary:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 166, 81, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.kiosk-btn-blue {
    background: linear-gradient(135deg, var(--mg-blue) 0%, var(--mg-blue-dark) 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(0, 102, 179, 0.3), 0 2px 8px rgba(0, 0, 0, 0.2);
}

.kiosk-btn-blue:hover, .kiosk-btn-blue:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(0, 102, 179, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
    color: white;
    text-decoration: none;
}

.kiosk-btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #b91c1c 100%);
    color: white;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.3);
}

.kiosk-btn-danger:hover, .kiosk-btn-danger:focus {
    transform: translateY(-2px);
    box-shadow: 0 12px 48px rgba(239, 68, 68, 0.4);
    color: white;
    text-decoration: none;
}

.kiosk-btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-glass);
    box-shadow: none;
}

.kiosk-btn-outline:hover, .kiosk-btn-outline:focus {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
    text-decoration: none;
}

/* ===== QUIZ QUESTION CARD ===== */
.quiz-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 800px;
    width: 90%;
    animation: scaleIn 0.5s ease-out;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

/* ===== PROGRESS INDICATOR ===== */
.quiz-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
    animation: fadeInDown 0.5s ease-out;
}

.progress-step {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all var(--transition-smooth);
    position: relative;
}

.progress-step.completed {
    background: linear-gradient(135deg, var(--mg-green), var(--mg-green-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(0, 166, 81, 0.4);
}

.progress-step.active {
    background: linear-gradient(135deg, var(--mg-blue), var(--mg-blue-dark));
    color: white;
    box-shadow: 0 4px 16px rgba(0, 102, 179, 0.4);
    animation: pulse-step 2s ease-in-out infinite;
}

.progress-step.pending {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

.progress-connector {
    width: 60px;
    height: 3px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.progress-connector.completed::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, var(--mg-green), var(--mg-blue));
    border-radius: inherit;
}

@keyframes pulse-step {
    0%, 100% { box-shadow: 0 4px 16px rgba(0, 102, 179, 0.4); }
    50% { box-shadow: 0 4px 32px rgba(0, 102, 179, 0.6); }
}

.question-number {
    font-family: 'Outfit', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--mg-blue-light);
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1rem;
}

.question-text {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.8rem);
    font-weight: 500;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.question-text-ar {
    direction: rtl;
    text-align: right;
    font-family: 'Segoe UI', 'Tahoma', 'Arial', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 400;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    animation: fadeInUp 0.4s ease-out 0.1s both;
}

/* ===== ANSWER BUTTONS ===== */
.answer-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.answer-btn {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    border: 2px solid transparent;
    border-radius: var(--radius-lg);
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.answer-btn.true-btn {
    background: linear-gradient(135deg, rgba(0, 166, 81, 0.15), rgba(0, 166, 81, 0.05));
    border-color: rgba(0, 166, 81, 0.3);
    color: var(--mg-green-light);
}

.answer-btn.true-btn:hover, .answer-btn.true-btn:focus {
    background: linear-gradient(135deg, var(--mg-green), var(--mg-green-dark));
    border-color: var(--mg-green);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 166, 81, 0.4);
}

.answer-btn.true-btn:active {
    transform: scale(0.96);
}

.answer-btn.false-btn {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.answer-btn.false-btn:hover, .answer-btn.false-btn:focus {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    border-color: #ef4444;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(239, 68, 68, 0.4);
}

.answer-btn.false-btn:active {
    transform: scale(0.96);
}

.answer-icon {
    font-size: 1.6rem;
}

/* ===== TIMER ===== */
.timer-container {
    margin-bottom: 1.5rem;
}

.timer-ring {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    position: relative;
}

.timer-ring svg {
    transform: rotate(-90deg);
}

.timer-ring .timer-track {
    fill: none;
    stroke: rgba(255, 255, 255, 0.05);
    stroke-width: 4;
}

.timer-ring .timer-progress {
    fill: none;
    stroke: var(--mg-blue-light);
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 226;
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 1s linear, stroke 0.3s;
}

.timer-ring .timer-progress.warning {
    stroke: #f59e0b;
}

.timer-ring .timer-progress.danger {
    stroke: #ef4444;
}

.timer-text {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ===== RESULT SCREENS ===== */
.result-icon {
    font-size: 6rem;
    margin-bottom: 1rem;
    animation: bounceIn 0.6s ease-out;
}

.result-title {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(3rem, 6vw, 5rem);
    font-weight: 900;
    margin-bottom: 0.5rem;
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

.result-subtitle {
    font-size: clamp(1rem, 2vw, 1.3rem);
    color: var(--text-secondary);
    margin-bottom: 3rem;
    max-width: 500px;
    line-height: 1.6;
    animation: fadeInUp 0.6s ease-out 0.4s both;
}

/* ===== CONFETTI ===== */
.confetti-container {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 100;
    overflow: hidden;
}

.confetti-piece {
    position: absolute;
    width: 10px;
    height: 10px;
    top: -20px;
    animation: confetti-fall linear forwards;
}

@keyframes confetti-fall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

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

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

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: scale(0.3); }
    50% { transform: scale(1.05); }
    70% { transform: scale(0.95); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes slideOut {
    to { opacity: 0; transform: translateX(-100px); }
}

/* Glow text animation */
.glow-text {
    animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
    from { text-shadow: 0 0 10px rgba(0, 166, 81, 0.3); }
    to { text-shadow: 0 0 30px rgba(0, 166, 81, 0.6), 0 0 60px rgba(0, 102, 179, 0.3); }
}

/* Page transition */
.page-enter {
    animation: pageEnter 0.4s ease-out;
}

@keyframes pageEnter {
    from { opacity: 0; transform: scale(0.98) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

/* ===== ADMIN STYLES ===== */
.admin-layout {
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: auto;
    user-select: auto;
    cursor: auto;
}

.admin-navbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-glass);
    padding: 0.75rem 1.5rem;
}

.admin-navbar .navbar-brand {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--text-primary) !important;
}

.admin-content {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

.admin-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: all var(--transition-smooth);
}

.admin-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-card {
    text-align: center;
    padding: 2rem;
}

.stat-number {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.admin-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.admin-table th {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem;
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-glass);
}

.admin-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-glass);
    vertical-align: middle;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.badge-active {
    background: rgba(0, 166, 81, 0.15);
    color: var(--mg-green-light);
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-inactive {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.admin-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.admin-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.admin-btn-primary {
    background: var(--mg-blue);
    border-color: var(--mg-blue);
    color: white;
}

.admin-btn-primary:hover {
    background: var(--mg-blue-dark);
    color: white;
}

.admin-btn-danger {
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.admin-btn-danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.form-control-dark {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all var(--transition-fast);
}

.form-control-dark:focus {
    outline: none;
    border-color: var(--mg-blue);
    box-shadow: 0 0 0 3px rgba(0, 102, 179, 0.15);
}

.form-check-dark {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
}

.form-check-dark input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--mg-green);
    cursor: pointer;
}

/* ===== LOGIN PAGE ===== */
.login-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-xl);
    padding: 3rem;
    max-width: 420px;
    width: 90%;
    animation: scaleIn 0.5s ease-out;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
}

.login-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 0.9rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.alert-success {
    background: rgba(0, 166, 81, 0.1);
    border: 1px solid rgba(0, 166, 81, 0.3);
    color: var(--mg-green-light);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

/* ===== RESPONSIVE TWEAKS ===== */
@media (max-width: 768px) {
    .kiosk-logo {
        max-width: 280px;
    }
    .quiz-card {
        padding: 2rem 1.5rem;
    }
    .answer-buttons {
        flex-direction: column;
        align-items: center;
    }
    .answer-btn {
        max-width: 100%;
        width: 100%;
    }
    .progress-step {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }
    .progress-connector {
        width: 30px;
    }
}

/* ===== SOUND FEEDBACK VISUAL ===== */
.flash-correct {
    animation: flashGreen 0.4s ease-out;
}

.flash-wrong {
    animation: flashRed 0.4s ease-out;
}

@keyframes flashGreen {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: inset 0 0 100px rgba(0, 166, 81, 0.15); }
}

@keyframes flashRed {
    0%, 100% { box-shadow: none; }
    50% { box-shadow: inset 0 0 100px rgba(239, 68, 68, 0.15); }
}

/* ===== DISABLE SELECTION & CONTEXT MENU FOR KIOSK ===== */
.kiosk-container img,
.kiosk-container a,
.kiosk-container button {
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
