/* Style-uri generale pentru Modul Intunecat (Dark Mode) */
:root {
    --bg-primary: #121212;
    --bg-secondary: #1e1e1e;
    --bg-accent: #2d2d2d;
    --text-main: #e0e0e0;
    --text-muted: #a0a0a0;
    --accent-red: #ff5252;
    --accent-green: #4caf50;
    --accent-blue: #2196f3;
    --border-color: #333333;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-main);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: #ffffff;
}

h1 {
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

/* Carduri pentru sectiuni */
.course-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Structura ASA DA / ASA NU */
.comparison-container {
    display: flex;
    gap: 20px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.box-nu, .box-da {
    flex: 1;
    min-width: 300px;
    border-radius: 6px;
    padding: 15px;
    border-top: 4px solid;
}

.box-nu {
    background-color: #2c1a1a;
    border-top-color: var(--accent-red);
}

.box-da {
    background-color: #1a2c1a;
    border-top-color: var(--accent-green);
}

.box-nu h3 { color: var(--accent-red); margin-top: 0; }
.box-da h3 { color: var(--accent-green); margin-top: 0; }

/* Blocuri de cod */
pre {
    background-color: #0f0f0f;
    border: 1px solid #252525;
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
}

code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
}

/* Elemente explicative / Alerte */
.alert-info {
    background-color: #1a2332;
    border-left: 4px solid var(--accent-blue);
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.alert-danger {
    background-color: #2c1a1a;
    border-left: 4px solid var(--accent-red);
    padding: 15px;
    margin: 15px 0;
    border-radius: 4px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: bold;
    border-radius: 4px;
    text-transform: uppercase;
}
.badge-danger { background-color: var(--accent-red); color: #fff; }
.badge-success { background-color: var(--accent-green); color: #fff; }
/* Stiluri pentru Simularea Atacului */
.simulation-timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin: 20px 0 20px 20px;
    padding-left: 20px;
}

.sim-step {
    margin-bottom: 30px;
    position: relative;
}

.sim-step::before {
    content: '';
    position: absolute;
    left: -27px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--accent-color);
}

.sim-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    margin-bottom: 8px;
}

.badge-attacker {
    background-color: #e74c3c;
    color: #fff;
}

.badge-server {
    background-color: #34495e;
    color: #ecf0f1;
}

.sim-content {
    background: #1e1e1e;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #333;
}

.sim-note {
    display: block;
    font-size: 0.85rem;
    color: #888;
    margin-top: 5px;
    font-style: italic;
}

/* Stiluri pentru URL și Terminal */
.url-bar {
    background-color: #111;
    padding: 8px 12px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    color: #aaa;
    border: 1px solid #222;
}

.url-param {
    color: #f1c40f;
    font-weight: bold;
}

.terminal-output {
    background-color: #000;
    color: #2ecc71;
    padding: 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    margin-top: 8px;
}

.danger-output {
    color: #e74c3c;
    border-left: 3px solid #e74c3c;
}

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

.gold-rule {
    font-size: 1.3rem;
    font-weight: bold;
    color: #f1c40f;
    padding: 15px;
    border: 2px dashed #f1c40f;
    display: inline-block;
    margin: 15px 0;
    border-radius: 6px;
    background-color: rgba(241, 196, 15, 0.05);
}



.course-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0));
    margin: 50px 0;
}



/* Stiluri specifice pentru Pagina Principală (Dashboard) */
.logo-icon {
    font-size: 3.5rem;
    margin-bottom: 10px;
}

.section-title {
    margin-top: 40px;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-color);
    padding-left: 10px;
    font-size: 1.5rem;
}

/* Grid-ul de Cursuri */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 25px;
    margin-bottom: 50px;
}

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

.main-course-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.main-course-card:hover {
    transform: translateY(-3px);
    border-color: #444;
}

/* Cursuri Blocate */
.card-locked {
    opacity: 0.5;
    background-color: #151515;
    border-style: dashed;
}
.card-locked:hover {
    transform: none;
    border-color: var(--border-color);
}

/* Badge-uri (Disponibil / În curând) */
.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 4px;
}

.badge-active {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.badge-locked {
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Subsol Card */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.difficulty {
    font-size: 0.85rem;
    color: #888;
}

.lock-text {
    font-size: 0.85rem;
    color: #666;
}

/* Buton Deschide Curs */
.btn-primary {
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: background-color 0.2s;
}

.btn-primary:hover {
    background-color: #2980b9;
}

/* Stil pentru Butonul de Înapoi (Back Button) */
.btn-back {
    display: inline-flex;
    align-items: center;
    color: var(--accent-color);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    padding: 6px 12px;
    border-radius: 4px;
    background-color: rgba(52, 152, 219, 0.05);
    border: 1px solid rgba(52, 152, 219, 0.15);
    transition: all 0.2s ease;
}

.btn-back:hover {
    color: #fff;
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    transform: translateX(-3px); /* Efect subtil de deplasare spre stânga */
}

.badge-adv {
    background-color: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.3);
}


.main-footer {
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    color: #555;
    font-size: 0.9rem;
}
.text-left { text-align: left; }

/* Animație Trofeu de Succesla test */
.trophy-icon {
    font-size: 5rem;
    animation: popTrophy 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, pulseGold 2s infinite ease-in-out;
    margin-bottom: 10px;
}

.badge-digital {
    display: inline-block;
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
    color: #000;
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 2px;
    padding: 6px 16px;
    border-radius: 50px;
    box-shadow: 0 0 15px rgba(241, 196, 15, 0.4);
    margin-bottom: 20px;
    text-transform: uppercase;
}

@keyframes popTrophy {
    0% { transform: scale(0) rotate(-20deg); opacity: 0; }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes pulseGold {
    0%, 100% { filter: drop-shadow(0 0 10px rgba(241, 196, 15, 0.6)); }
    50% { filter: drop-shadow(0 0 25px rgba(241, 196, 15, 0.9)); transform: translateY(-5px); }
}

/* Ascundere elemente de fundal la printarea diplomei */
@media print {
    body * { visibility: hidden; }
    #result-box, #result-box * { visibility: visible; }
    #result-box { position: absolute; left: 0; top: 10%; width: 100%; border: none; background: white; color: black; }
    .score-text { color: #d4af37 !important; }
    #btn-print, .btn-back { display: none !important; }
}

/* Stil pentru insigna "NOU" din paginile de prezentare */
.badge-new {
    display: inline-block;
    background-color: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.3);
    font-size: 0.7rem;
    font-weight: 900;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    animation: pulseNew 2s infinite ease-in-out;
}

/* Animație fină de puls pentru a atrage atenția */
@keyframes pulseNew {
    0%, 100% { opacity: 0.8; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}
