/* Modern CSS Theme - Hacker Style for Cyber Challenge Application */

/* CSS Variables for Hacker theme */
:root {
    --primary-color: #00ff41;
    --primary-dark: #00cc33;
    --secondary-color: #000000;
    --secondary-dark: #1a1a1a;
    --accent-color: #ff0040;
    --success-color: #00ff41;
    --warning-color: #ffff00;
    --danger-color: #ff0040;
    --info-color: #00ffff;
    --light-bg: #000000;
    --dark-bg: #0d1117;
    --text-color: #00ff41;
    --light-text: #00ff41;
    --border-color: #00ff41;
    --shadow: 0 2px 20px rgba(0,255,65,0.3);
    --shadow-hover: 0 5px 30px rgba(0,255,65,0.5);
    --border-radius: 0px;
    --transition: all 0.3s ease;
}

/* Reset et styles de base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Courier New', 'Monaco', 'Consolas', monospace;
    line-height: 1.4;
    color: var(--text-color);
    background: #000000;
    background-image:
        radial-gradient(circle at 20% 80%, rgba(0, 255, 65, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(0, 255, 65, 0.08) 0%, transparent 50%),
        linear-gradient(180deg, #000000 0%, #0d1117 100%);
    background-attachment: fixed;
    min-height: 100vh;
    position: relative;
}

/* Enhanced Matrix Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300ff41' fill-opacity='0.05'%3E%3Ctext x='30' y='35' text-anchor='middle' font-family='monospace' font-size='14'%3E0%3C/text%3E%3C/g%3E%3C/svg%3E"),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%2300ff41' fill-opacity='0.02'%3E%3Ctext x='40' y='45' text-anchor='middle' font-family='monospace' font-size='16'%3E1%3C/text%3E%3C/g%3E%3C/svg%3E");
    animation: matrix-rain 15s linear infinite, matrix-fade 8s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

/* Particle effect */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(2px 2px at 20px 30px, var(--primary-color), transparent),
                      radial-gradient(2px 2px at 40px 70px, var(--accent-color), transparent),
                      radial-gradient(1px 1px at 90px 40px, var(--info-color), transparent),
                      radial-gradient(1px 1px at 130px 80px, var(--primary-color), transparent);
    animation: particle-float 20s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
    opacity: 0.3;
}

@keyframes matrix-rain {
    0% { transform: translateY(-100vh) rotate(0deg); }
    100% { transform: translateY(100vh) rotate(360deg); }
}

@keyframes matrix-fade {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.7; }
}

@keyframes particle-float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(10px, -10px) scale(1.1); }
    50% { transform: translate(-5px, -15px) scale(0.9); }
    75% { transform: translate(-10px, 5px) scale(1.05); }
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Fixed header avec timer */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    padding: 5px 15px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.timer-display {
    font-family: 'Courier New', monospace;
    font-size: 1rem;
    color: var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
    padding: 6px 12px;
    border: 1px solid var(--border-color);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    text-shadow: 0 0 5px var(--primary-color);
}

.timer-display.warning {
    color: var(--warning-color);
    border-color: var(--warning-color);
    box-shadow: 0 0 10px rgba(255, 255, 0, 0.3);
    animation: pulse 2s infinite;
}

.timer-display.danger {
    color: var(--danger-color);
    border-color: var(--danger-color);
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
    animation: pulse 1s infinite;
}

/* Header controls */
.header-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Headers */
.main-header {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.8), rgba(13, 17, 23, 0.9));
    color: var(--light-text);
    padding: 15px;
    border: 1px solid var(--border-color);
    margin-top: 60px; /* Space for fixed header */
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.main-header h1 {
    font-size: 2rem;
    font-weight: 300;
    margin-bottom: 8px;
    text-shadow: 0 0 10px var(--primary-color), 0 0 20px var(--primary-color), 0 0 40px var(--primary-color);
    font-family: 'Courier New', monospace;
    animation: glitch 3s infinite;
    position: relative;
}

/* Advanced glitch effect */
.glitch {
    position: relative;
    color: var(--primary-color);
    animation: glitch-skew 1s infinite linear alternate-reverse;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    animation: glitch-anim 0.5s infinite linear alternate-reverse;
    color: #ff0040;
    z-index: -1;
}

.glitch::after {
    animation: glitch-anim2 0.5s infinite linear alternate-reverse;
    color: #00ffff;
    z-index: -2;
}

@keyframes glitch {
    0% { text-shadow: 0 0 10px var(--primary-color); }
    25% { text-shadow: -2px 0 var(--accent-color), 2px 0 var(--info-color); }
    50% { text-shadow: 0 0 15px var(--primary-color); }
    75% { text-shadow: 2px 0 var(--accent-color), -2px 0 var(--info-color); }
    100% { text-shadow: 0 0 10px var(--primary-color); }
}

@keyframes glitch-skew {
    0% { transform: skew(0deg); }
    10% { transform: skew(-1deg); }
    20% { transform: skew(0deg); }
    30% { transform: skew(1deg); }
    40% { transform: skew(0deg); }
    50% { transform: skew(-0.5deg); }
    60% { transform: skew(0deg); }
    100% { transform: skew(0deg); }
}

@keyframes glitch-anim {
    0% { clip: rect(42px, 9999px, 44px, 0); }
    25% { clip: rect(12px, 9999px, 59px, 0); }
    50% { clip: rect(69px, 9999px, 73px, 0); }
    75% { clip: rect(99px, 9999px, 5px, 0); }
    100% { clip: rect(25px, 9999px, 99px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(65px, 9999px, 119px, 0); }
    25% { clip: rect(52px, 9999px, 74px, 0); }
    50% { clip: rect(79px, 9999px, 85px, 0); }
    75% { clip: rect(25px, 9999px, 39px, 0); }
    100% { clip: rect(95px, 9999px, 61px, 0); }
}

.main-header h2 {
    font-size: 1.4rem;
    font-weight: 300;
    opacity: 0.9;
    font-family: 'Courier New', monospace;
}

/* Navigation and controls */
.controls {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.nav-links {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.style-switcher,
.translation-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.style-switcher a,
.translation-toggle a {
    display: inline-block;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    padding: 8px 15px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    transition: var(--transition);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
    text-align: center;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.style-switcher a:hover,
.translation-toggle a:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.5);
    text-shadow: 0 0 5px var(--primary-color);
}

.style-switcher a.active,
.translation-toggle a.active {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
}

.nav-links a, .btn {
    display: inline-block;
    padding: 12px 24px;
    background: rgba(0, 0, 0, 0.8);
    color: var(--primary-color);
    text-decoration: none;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    box-shadow: 0 0 5px rgba(0, 255, 65, 0.3);
    text-align: center;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover, .btn:hover {
    background: rgba(0, 255, 65, 0.1);
    box-shadow:
        0 0 15px rgba(0, 255, 65, 0.5),
        inset 0 0 15px rgba(0, 255, 65, 0.1);
    text-shadow: 0 0 5px var(--primary-color), 0 0 10px var(--primary-color);
    transform: translateY(-2px) scale(1.05);
    animation: button-pulse 0.6s ease-in-out;
}

@keyframes button-pulse {
    0% { transform: translateY(-2px) scale(1.05); }
    50% { transform: translateY(-2px) scale(1.1); }
    100% { transform: translateY(-2px) scale(1.05); }
}

.nav-links a.active, .btn.active {
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
}

/* Special buttons */
.btn-start {
    background: var(--success-color);
    color: var(--secondary-color);
    font-size: 1.3rem;
    padding: 20px 40px;
    border: 2px solid var(--success-color);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.5);
    text-shadow: none;
    font-weight: bold;
    animation: pulse 2s infinite;
}

.btn-start:hover {
    background: rgba(0, 255, 65, 0.9);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.8);
}

.btn-success {
    background: var(--success-color);
    color: var(--secondary-color);
    border-color: var(--success-color);
}

.btn-warning {
    background: var(--warning-color);
    color: var(--secondary-color);
    border-color: var(--warning-color);
}

.btn-primary {
    background: var(--primary-color);
    color: var(--secondary-color);
    border-color: var(--primary-color);
}

/* Cards et conteneurs */
.card,
.welcome-content {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.welcome-content {
    text-align: center;
}

.welcome-content h2 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 20px;
    text-shadow: 0 0 10px var(--primary-color);
}

.welcome-content p {
    font-size: 1.1rem;
    margin-bottom: 25px;
    line-height: 1.6;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
    animation: loading 2s infinite;
}

@keyframes loading {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.card:hover {
    box-shadow:
        var(--shadow-hover),
        inset 0 0 50px rgba(0, 255, 65, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* Terminal cursor effect */
.terminal-cursor::after {
    content: '_';
    animation: cursor-blink 1s infinite;
    color: var(--primary-color);
}

@keyframes cursor-blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Terminal text effects */
.terminal-text {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    position: relative;
}

.terminal-text.typing {
    overflow: hidden;
    border-right: 2px solid var(--primary-color);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--primary-color); }
}

.card-header {
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
}

.card-title {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px var(--primary-color);
}

/* Grilles et layouts */
.grid {
    display: grid;
    gap: 25px;
    margin: 30px 0;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

/* Formulaires */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-color);
    font-size: 1rem;
    transition: var(--transition);
    font-family: 'Courier New', monospace;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.05);
}

/* Specialized buttons */
.btn-primary {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--primary-color);
}
.btn-secondary {
    background: rgba(0, 0, 0, 0.8);
    border-color: var(--border-color);
}
.btn-success {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--success-color);
}
.btn-warning {
    background: rgba(255, 255, 0, 0.2);
    border-color: var(--warning-color);
    color: var(--warning-color);
}
.btn-danger {
    background: rgba(255, 0, 64, 0.2);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.btn-large {
    padding: 12px 24px;
    font-size: 1.2rem;
    font-weight: 600;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Timer et score */
.info-panel {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.timer, .score {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border: 1px solid var(--border-color);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    text-shadow: 0 0 5px var(--primary-color);
}

/* Animations */
@keyframes pulse {
    0% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
        box-shadow: 0 0 25px rgba(0, 255, 65, 0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
    }
}

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

/* Progressive revelation system */
.hidden-activity {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
    pointer-events: none;
}

.hidden-activity.revealed {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
    animation: slideIn 0.8s ease-out;
}

/* Animation d'apparition */
.animate-in {
    animation: slideIn 0.6s ease-out;
}

/* Activity states */
.activity-card,
.question-card {
    background: rgba(0, 0, 0, 0.9);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    position: relative;
}

.challenge-content,
.challenge-status {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    text-align: center;
}

/* Sequential sections */
.sequential-progression {
    margin-top: 30px;
}

.history-section,
.quiz-section,
.simulation-section,
.rapid-game-section,
.final-results-section {
    margin-bottom: 40px;
    padding: 20px 0;
}

/* Classes utilitaires */
.text-center {
    text-align: center;
}

.success {
    color: var(--success-color);
}

.warning {
    color: var(--warning-color);
}

.danger {
    color: var(--danger-color);
}

.info {
    color: var(--info-color);
}

.animate-in {
    animation: slideIn 0.5s ease-out;
}

/* States et feedback */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid;
    backdrop-filter: blur(10px);
    font-family: 'Courier New', monospace;
}

.alert-success {
    background: rgba(0, 255, 65, 0.1);
    border-color: var(--success-color);
    color: var(--success-color);
}

.alert-warning {
    background: rgba(255, 255, 0, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.alert-danger {
    background: rgba(255, 0, 64, 0.1);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.alert-info {
    background: rgba(0, 255, 255, 0.1);
    border-color: var(--info-color);
    color: var(--info-color);
}

/* Progress bars */
.progress {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    height: 8px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    transition: width 0.3s ease;
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.5);
}

/* Quiz styles */
.question-card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-color);
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.question-card:hover {
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.question-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 5px var(--primary-color);
}

.options {
    display: grid;
    gap: 12px;
}

.option {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    padding: 15px 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: 'Courier New', monospace;
}

.option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 255, 65, 0.1);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
}

.option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.option.correct {
    border-color: var(--success-color);
    background: rgba(0, 255, 65, 0.2);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.option.incorrect {
    border-color: var(--danger-color);
    background: rgba(255, 0, 64, 0.2);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.4);
}

/* Footer */
.main-footer {
    text-align: center;
    margin-top: auto;
    padding: 30px 20px;
    color: rgba(0, 255, 65, 0.6);
    font-size: 0.9rem;
    font-family: 'Courier New', monospace;
}

/* Hidden activities - progressive discovery */
.hidden-activity {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.hidden-activity.revealed {
    display: block;
    opacity: 1;
    animation: slideIn 0.8s ease-out;
}

.discover-hint {
    background: rgba(0, 255, 65, 0.1);
    border: 1px dashed var(--border-color);
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    animation: pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .fixed-header {
        flex-direction: column;
        gap: 10px;
        padding: 15px;
    }

    .main-header {
        margin-top: 120px;
        padding: 20px;
    }

    .main-header h1 {
        font-size: 2rem;
    }

    .controls {
        flex-direction: column;
        text-align: center;
    }

    .info-panel {
        justify-content: center;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        justify-content: center;
    }

    .header-left {
        flex-direction: column;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .card {
        padding: 20px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .main-header {
        padding: 20px;
    }

    .main-header h1 {
        font-size: 1.8rem;
    }

    .timer-display {
        font-size: 1rem;
        padding: 6px 12px;
    }
}

/* Terminal effect */
.terminal-text {
    font-family: 'Courier New', monospace;
    color: var(--primary-color);
    text-shadow: 0 0 5px var(--primary-color);
    letter-spacing: 1px;
}

.terminal-cursor::after {
    content: '_';
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* Glitch effect for titles */
.glitch {
    position: relative;
    animation: glitch 2s infinite;
}

@keyframes glitch {
    0%, 90%, 100% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
}

/* Discovery zone styles */
.discovery-zone {
    margin: 50px 0;
    min-height: 2000px; /* Ensure enough scroll space */
}

.activities-section {
    margin: 50px 0;
}

.activities-section h3 {
    color: var(--primary-color);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 10px var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.locked {
    background: rgba(255, 0, 64, 0.2);
    color: var(--danger-color);
    padding: 12px 24px;
    border: 1px solid var(--danger-color);
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    font-weight: bold;
    box-shadow: 0 0 10px rgba(255, 0, 64, 0.3);
    animation: pulse 2s infinite;
}

.mission-briefing {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.mission-briefing p {
    margin: 10px 0;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enhanced activity cards */
.activity-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
}

.activity-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.activity-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    transition: left 0.5s;
}

.activity-card:hover::before {
    left: 100%;
}

.final-message {
    text-align: center;
    margin: 100px 0;
}

.final-message .card {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9), rgba(13, 17, 23, 0.95));
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.5);
}

.final-message h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    text-shadow: 0 0 15px var(--primary-color);
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 2rem;
    color: var(--primary-color);
    animation: bounce 2s infinite;
    z-index: 1000;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(-50%); }
    40% { transform: translateY(-70%); }
    60% { transform: translateY(-60%); }
}

/* Typing indicator */
.typing-indicator::after {
    content: '|';
    animation: blink 1s infinite;
    color: var(--primary-color);
}

/* Enhanced progress bars with glow */
.progress {
    position: relative;
    overflow: visible;
}

.progress-bar {
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    border-radius: 4px;
    filter: blur(4px);
    opacity: 0.7;
    z-index: -1;
}

/* Network scan effect */
@keyframes networkScan {
    0% {
        background-position: -200px 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        background-position: calc(100% + 200px) 0;
        opacity: 0;
    }
}

.discover-hint {
    position: relative;
    overflow: hidden;
}

.discover-hint::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 200px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.3), transparent);
    animation: networkScan 3s infinite;
}

/* Styles pour les nouvelles sections */
.explanation-section {
    margin: 30px 0;
}

.briefing-content {
    margin: 20px 0;
}

.mission-objectives {
    margin: 30px 0;
    background: rgba(0, 255, 65, 0.05);
    border-left: 4px solid var(--primary-color);
}

.mission-objectives ul {
    list-style: none;
    padding-left: 0;
}

.mission-objectives li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.instructions {
    background: rgba(0, 255, 65, 0.1);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin: 20px 0;
}

.instructions p {
    margin: 8px 0;
}

/* Sequential progression styles */
.sequential-progression {
    margin: 50px 0;
    min-height: 3000px;
}

/* History timeline */
.history-section {
    margin: 100px 0;
}

.history-timeline {
    margin: 30px 0;
}

.history-event {
    margin: 30px 0;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.5s ease-out;
}

.history-event.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.history-event.completed {
    border-color: var(--success-color);
    background: rgba(0, 255, 65, 0.1);
}

.event-year {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
    min-width: 80px;
    text-shadow: 0 0 10px var(--primary-color);
}

.event-content {
    flex: 1;
}

.event-content h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.event-impact,
.event-lesson {
    margin: 10px 0;
    font-size: 0.9rem;
    opacity: 0.8;
}

.event-acknowledge {
    min-width: 120px;
}

.progress-indicator {
    margin: 30px 0;
    text-align: center;
}

/* Challenge step styles - standardized */
.history-section,
.quiz-section,
.simulation-section,
.rapid-game-section {
    margin: 60px 0;
    padding: 20px 0;
}

/* Quiz styles */

.quiz-question,
.scenario-card,
.simulation-intro {
    text-align: center;
    padding: 30px;
    margin: 20px 0;
}

.question-header {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 20px;
}

.quiz-options {
    display: grid;
    gap: 15px;
    margin: 30px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.quiz-option {
    padding: 15px 25px;
    text-align: left;
    transition: var(--transition);
}

.quiz-option:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.1);
    transform: translateX(10px);
}

.quiz-option.correct {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--success-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.4);
}

.quiz-option.incorrect {
    background: rgba(255, 0, 64, 0.2);
    border-color: var(--danger-color);
    box-shadow: 0 0 15px rgba(255, 0, 64, 0.4);
}

.question-explanation {
    background: rgba(0, 255, 65, 0.05);
    padding: 15px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
}

.quiz-results,
.final-game-results,
.incident-response {
    text-align: center;
    padding: 30px;
    margin: 20px 0;
}

.score-display {
    font-size: 2rem;
    margin: 20px 0;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.performance-level {
    font-size: 1.2rem;
    margin: 20px 0;
    color: var(--success-color);
}

/* Simulation styles */


.leaked-data-table {
    margin: 30px 0;
}

.data-table {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--danger-color);
    padding: 20px;
    margin: 15px 0;
}

.data-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 0, 64, 0.3);
}

.data-type {
    font-weight: bold;
    color: var(--primary-color);
}

.data-value.compromised {
    color: var(--danger-color);
    background: rgba(255, 0, 64, 0.2);
    padding: 2px 8px;
    font-family: 'Courier New', monospace;
    animation: blink 2s infinite;
}

.simulation-actions {
    margin: 30px 0;
}

.action-buttons {
    margin: 15px 0;
}

.incident-response {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--success-color);
    margin-top: 20px;
}

.incident-response ul {
    list-style: none;
    padding-left: 0;
    margin: 20px 0;
}

.incident-response li {
    padding: 5px 0;
    color: var(--success-color);
}

/* Rapid game styles */

.rapid-game-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    padding: 15px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
}

.health-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.health-bar .progress {
    flex: 1;
    max-width: 200px;
}

.health-bar .progress-bar.warning {
    background: linear-gradient(90deg, var(--warning-color), #e67e22);
}

.health-bar .progress-bar.danger {
    background: linear-gradient(90deg, var(--danger-color), #c0392b);
}


.scenario-options {
    display: grid;
    gap: 15px;
    margin: 30px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.rapid-option {
    padding: 15px 25px;
    transition: var(--transition);
}

.rapid-option:hover:not(:disabled) {
    background: rgba(0, 255, 65, 0.1);
    transform: scale(1.05);
}

.action-feedback {
    background: rgba(0, 255, 65, 0.1);
    padding: 15px;
    margin: 20px 0;
    border: 1px solid var(--border-color);
}

.action-feedback.success {
    background: rgba(0, 255, 65, 0.2);
    border-color: var(--success-color);
    color: var(--success-color);
}

.action-feedback.danger {
    background: rgba(255, 0, 64, 0.2);
    border-color: var(--danger-color);
    color: var(--danger-color);
}

.action-feedback.warning {
    background: rgba(255, 255, 0, 0.1);
    border-color: var(--warning-color);
    color: var(--warning-color);
}

.final-game-results {
    text-align: center;
    padding: 40px;
}

.results-summary {
    margin: 30px 0;
}

.score-final,
.health-final,
.performance {
    margin: 15px 0;
    font-size: 1.2rem;
}

.score-final {
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.health-final {
    color: var(--success-color);
}

.performance {
    color: var(--warning-color);
    font-weight: bold;
}

/* Final results */
.final-results-section {
    margin: 100px 0;
    text-align: center;
}

.mission-complete {
    padding: 40px;
}

.mission-complete h3 {
    color: var(--success-color);
    font-size: 2.5rem;
    text-shadow: 0 0 15px var(--success-color);
    margin-bottom: 30px;
}

.final-stats {
    background: rgba(0, 255, 65, 0.1);
    padding: 20px;
    border: 1px solid var(--border-color);
    margin: 30px 0;
}

.final-stats div {
    margin: 10px 0;
    font-size: 1.1rem;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .history-event {
        flex-direction: column;
        text-align: center;
    }

    .event-year {
        min-width: auto;
    }

    .data-row {
        flex-direction: column;
        gap: 5px;
    }

    .rapid-game-status {
        flex-direction: column;
        gap: 15px;
    }

    .health-bar {
        width: 100%;
    }

    .sequential-progression {
        min-height: 2000px;
    }
}

/* Styles for new features */

/* Timer display pour questions rapides */
.timer-display {
    font-size: 1.5rem;
    font-weight: bold;
    padding: 10px 20px;
    border: 2px solid var(--border-color);
    background: rgba(0, 255, 65, 0.1);
    text-align: center;
}

.timer-display.warning {
    border-color: var(--warning-color);
    background: rgba(255, 255, 0, 0.2);
    color: var(--warning-color);
    animation: pulse 1.5s infinite;
}

.timer-display.danger {
    border-color: var(--danger-color);
    background: rgba(255, 0, 64, 0.2);
    color: var(--danger-color);
    animation: pulse 0.8s infinite;
}

.speed-bonus-display {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 15px;
    text-align: center;
    font-style: italic;
}

/* Styles for personalized simulation */
.simulation-setup {
    text-align: center;
    padding: 40px;
}

.user-data-form {
    margin: 30px 0;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.user-data-form .form-group {
    text-align: left;
    margin-bottom: 20px;
}

.user-data-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-color);
    font-weight: bold;
}

.user-data-form .form-control {
    width: 100%;
    padding: 12px;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    color: var(--text-color);
    font-family: 'Courier New', monospace;
}

.user-data-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(0, 255, 65, 0.3);
    background: rgba(0, 255, 65, 0.05);
}

.impact-warning {
    background: rgba(255, 0, 64, 0.1);
    border: 1px solid var(--danger-color);
    padding: 20px;
    margin: 20px 0;
}

.impact-warning ul {
    list-style: none;
    padding-left: 20px;
}

.impact-warning li {
    margin: 8px 0;
    color: var(--danger-color);
}

.response-checklist {
    text-align: left;
    margin: 20px 0;
}

.response-checklist ul {
    list-style: none;
    padding-left: 0;
}

.response-checklist li {
    margin: 8px 0;
    color: var(--success-color);
}

.lesson-learned {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    padding: 20px;
    margin: 20px 0;
    border-left: 4px solid var(--primary-color);
}

.lesson-learned h5 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

.lesson-learned ul {
    list-style: none;
    padding-left: 20px;
}

.lesson-learned li {
    margin: 8px 0;
}

/* Styles for detailed final recap */
.final-stats-detailed {
    max-width: 900px;
    margin: 0 auto;
}

.stats-header {
    text-align: center;
    margin: 30px 0;
    padding: 20px;
    border: 1px solid var(--border-color);
    background: rgba(0, 255, 65, 0.05);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.stat-card {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--border-color);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.3);
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.stat-value.success {
    color: var(--success-color);
    text-shadow: 0 0 10px var(--success-color);
}

.stat-value.warning {
    color: var(--warning-color);
    text-shadow: 0 0 10px var(--warning-color);
}

.stat-value.danger {
    color: var(--danger-color);
    text-shadow: 0 0 10px var(--danger-color);
}

.stat-value.info {
    color: var(--info-color);
    text-shadow: 0 0 10px var(--info-color);
}

.performance-badge {
    text-align: center;
    padding: 20px;
    margin: 30px 0;
    border: 2px solid;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.performance-badge.success {
    border-color: var(--success-color);
    background: rgba(46, 204, 113, 0.1);
    color: var(--success-color);
}

.performance-badge.warning {
    border-color: var(--warning-color);
    background: rgba(255, 255, 0, 0.1);
    color: var(--warning-color);
}

.performance-badge.info {
    border-color: var(--info-color);
    background: rgba(0, 255, 255, 0.1);
    color: var(--info-color);
}

.performance-badge.danger {
    border-color: var(--danger-color);
    background: rgba(255, 0, 64, 0.1);
    color: var(--danger-color);
}

.mission-summary {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin: 30px 0;
}

.mission-summary h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 255, 65, 0.2);
}

.summary-item:last-child {
    border-bottom: none;
}

.recommendations {
    background: rgba(0, 255, 65, 0.05);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    padding: 30px;
    margin: 30px 0;
}

.recommendations h5 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.recommendations ul {
    list-style: none;
    padding-left: 0;
}

.recommendations li {
    margin: 10px 0;
    padding-left: 20px;
    position: relative;
}

.recommendations li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.final-message {
    text-align: center;
    background: rgba(0, 255, 65, 0.1);
    border: 1px solid var(--border-color);
    padding: 30px;
    margin: 30px 0;
    font-size: 1.1rem;
}

.mission-actions {
    text-align: center;
    margin: 40px 0;
}

.mission-actions .btn-large {
    padding: 20px 40px;
    font-size: 1.3rem;
    font-weight: bold;
}

/* Responsive for new elements */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .stat-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.4rem;
    }

    .user-data-form {
        padding: 0 20px;
    }

    .performance-badge {
        padding: 15px;
        font-size: 1rem;
    }

    .summary-item {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .final-stats-detailed {
        padding: 0 10px;
    }

    .timer-display {
        font-size: 1.2rem;
        padding: 8px 16px;
    }
}