/* Cyber Training Specific Styles */

/* Threats Grid */
.threats {
    padding: 4rem 2rem;
    background: var(--color-bg);
}

.threats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.threat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.threat-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-green);
    box-shadow: 0 8px 24px rgba(24, 179, 148, 0.2);
}

.threat-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.threat-icon {
    font-size: 2.5rem;
}

.threat-header h3 {
    flex: 1;
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-mono);
}

.threat-level {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.threat-level.high {
    background: rgba(255, 85, 85, 0.2);
    color: #ff5555;
    border: 1px solid #ff5555;
}

.threat-level.medium {
    background: rgba(241, 250, 140, 0.2);
    color: #f1fa8c;
    border: 1px solid #f1fa8c;
}

.threat-level.low {
    background: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
    border: 1px solid #50fa7b;
}

.threat-card p {
    color: var(--color-text-muted);
    margin: 1rem 0;
    line-height: 1.6;
}

.threat-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--color-bg);
    border-radius: 6px;
    border: 1px solid var(--color-border);
}

.threat-stats .stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.threat-stats .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-green);
    font-family: var(--font-mono);
}

.threat-stats .stat-label {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-top: 0.25rem;
}

/* Training Scenarios */
.training {
    padding: 4rem 2rem;
    background: var(--color-bg-alt);
}

.training-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 0;
}

.scenario-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.scenario-card:hover {
    transform: translateY(-5px);
    border-color: var(--color-cyan);
    box-shadow: 0 8px 24px rgba(139, 233, 253, 0.2);
}

.scenario-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.scenario-header h3 {
    margin: 0;
    color: var(--color-text);
    font-family: var(--font-mono);
    font-size: 1.1rem;
}

.difficulty {
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    font-family: var(--font-mono);
    text-transform: uppercase;
}

.difficulty.easy {
    background: rgba(80, 250, 123, 0.2);
    color: #50fa7b;
    border: 1px solid #50fa7b;
}

.difficulty.medium {
    background: rgba(241, 250, 140, 0.2);
    color: #f1fa8c;
    border: 1px solid #f1fa8c;
}

.difficulty.hard {
    background: rgba(255, 85, 85, 0.2);
    color: #ff5555;
    border: 1px solid #ff5555;
}

.scenario-card p {
    color: var(--color-text-muted);
    margin: 1rem 0;
    flex: 1;
}

.scenario-progress {
    margin: 1.5rem 0;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--color-bg);
    border-radius: 4px;
    overflow: hidden;
    border: 1px solid var(--color-border);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-green), var(--color-cyan));
    transition: width 0.3s ease;
}

.progress-text {
    display: block;
    text-align: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

/* Quiz Section */
.quiz-section {
    padding: 4rem 2rem;
    background: var(--color-bg);
}

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

.quiz-content {
    padding: 2rem;
}

.quiz-intro h3 {
    color: var(--color-cyan);
    margin-bottom: 1rem;
    font-family: var(--font-mono);
}

.quiz-intro p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.quiz-rules {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.quiz-rules li {
    padding: 0.75rem 0;
    color: var(--color-text);
    font-family: var(--font-mono);
    border-bottom: 1px solid var(--color-border);
}

.quiz-rules li:last-child {
    border-bottom: none;
}

.question-container {
    margin: 2rem 0;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--color-border);
}

.question-number {
    font-family: var(--font-mono);
    color: var(--color-cyan);
    font-weight: 600;
}

.question-text {
    font-size: 1.2rem;
    color: var(--color-text);
    margin: 1.5rem 0;
    line-height: 1.6;
}

.answers-list {
    list-style: none;
    padding: 0;
    margin: 2rem 0;
}

.answer-option {
    padding: 1rem 1.5rem;
    margin: 0.75rem 0;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: var(--font-mono);
}

.answer-option:hover {
    border-color: var(--color-cyan);
    background: var(--color-surface);
}

.answer-option.selected {
    border-color: var(--color-green);
    background: rgba(24, 179, 148, 0.1);
}

.answer-option.correct {
    border-color: var(--color-green);
    background: rgba(80, 250, 123, 0.2);
}

.answer-option.incorrect {
    border-color: #ff5555;
    background: rgba(255, 85, 85, 0.2);
}

.quiz-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

.quiz-result {
    text-align: center;
    padding: 2rem;
}

.result-score {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-green);
    font-family: var(--font-mono);
    margin: 1rem 0;
}

.result-message {
    font-size: 1.5rem;
    color: var(--color-text);
    margin: 1rem 0;
}

.result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

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

.result-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-cyan);
    font-family: var(--font-mono);
}

.result-stat-label {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* Achievements */
.achievements {
    max-width: 1400px;
    margin: 3rem auto 0;
    padding: 2rem;
    background: var(--color-surface);
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.achievements h3 {
    color: var(--color-text);
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
    text-align: center;
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: var(--color-bg);
    border-radius: 8px;
    border: 2px solid var(--color-border);
    transition: all 0.3s ease;
}

.badge.locked {
    opacity: 0.4;
}

.badge.unlocked {
    border-color: var(--color-green);
    box-shadow: 0 0 20px rgba(24, 179, 148, 0.3);
}

.badge:hover {
    transform: translateY(-5px);
}

.badge-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.badge-name {
    font-size: 0.9rem;
    color: var(--color-text);
    font-family: var(--font-mono);
    text-align: center;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--color-surface);
    margin: 5% auto;
    padding: 0;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
}

.modal-close {
    color: var(--color-text-muted);
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 1rem;
    cursor: pointer;
    z-index: 1001;
    background: var(--color-surface);
}

.modal-close:hover,
.modal-close:focus {
    color: var(--color-red);
}

#modalBody,
#scenarioBody {
    padding: 2rem;
    color: var(--color-text);
}

.modal h2 {
    color: var(--color-cyan);
    font-family: var(--font-mono);
    margin-bottom: 1.5rem;
}

.modal h3 {
    color: var(--color-green);
    font-family: var(--font-mono);
    margin: 1.5rem 0 1rem;
}

.modal p {
    line-height: 1.8;
    margin: 1rem 0;
    color: var(--color-text-muted);
}

.modal ul {
    margin: 1rem 0;
    padding-left: 2rem;
}

.modal li {
    margin: 0.5rem 0;
    color: var(--color-text-muted);
    line-height: 1.6;
}

.threat-examples {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--color-red);
    margin: 1.5rem 0;
}

.prevention-tips {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--color-green);
    margin: 1.5rem 0;
}

/* Scenario Content */
.scenario-content {
    padding: 1rem 0;
}

.scenario-image {
    width: 100%;
    max-width: 600px;
    margin: 1.5rem auto;
    display: block;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.scenario-question {
    background: var(--color-bg);
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid var(--color-cyan);
    margin: 1.5rem 0;
}

.scenario-choices {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1.5rem 0;
}

.choice-btn {
    padding: 1rem 1.5rem;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    border-radius: 6px;
    color: var(--color-text);
    font-family: var(--font-mono);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
}

.choice-btn:hover {
    border-color: var(--color-cyan);
    background: var(--color-bg);
}

.choice-btn.correct {
    border-color: var(--color-green);
    background: rgba(80, 250, 123, 0.2);
}

.choice-btn.incorrect {
    border-color: #ff5555;
    background: rgba(255, 85, 85, 0.2);
}

.feedback {
    margin: 1.5rem 0;
    padding: 1.5rem;
    border-radius: 6px;
    border-left: 4px solid;
}

.feedback.success {
    background: rgba(80, 250, 123, 0.1);
    border-color: var(--color-green);
    color: var(--color-text);
}

.feedback.error {
    background: rgba(255, 85, 85, 0.1);
    border-color: #ff5555;
    color: var(--color-text);
}

.scenario-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 2rem;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .threats-grid,
    .training-grid {
        grid-template-columns: 1fr;
    }

    .threat-stats {
        grid-template-columns: 1fr;
    }

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

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .quiz-navigation,
    .scenario-navigation {
        flex-direction: column;
    }

    .result-details {
        grid-template-columns: 1fr;
    }
}

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

.threat-card,
.scenario-card {
    animation: slideIn 0.5s ease-out;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.badge.unlocked {
    animation: pulse 2s infinite;
}
