/* Warhammer 40K Statistics Academy Styles */

:root {
    --primary-red: #8B0000;
    --secondary-gold: #D4AF37;
    --dark-bg: #1a1a1a;
    --darker-bg: #0f0f0f;
    --text-light: #f0f0f0;
    --text-muted: #cccccc;
    --accent-blue: #1e3a8a;
    --success-green: #16a34a;
    --warning-orange: #ea580c;
    --gradient-primary: linear-gradient(135deg, var(--primary-red), #a91b1b);
    --gradient-secondary: linear-gradient(135deg, var(--secondary-gold), #b8941f);
    --shadow-primary: 0 4px 6px rgba(139, 0, 0, 0.3);
    --shadow-elevated: 0 8px 25px rgba(0, 0, 0, 0.5);
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: var(--dark-bg);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header Styles */
.header {
    background: var(--gradient-primary);
    padding: 1rem 0;
    border-bottom: 3px solid var(--secondary-gold);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-elevated);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--secondary-gold);
}

.logo h1 {
    font-family: 'Orbitron', monospace;
    font-weight: 900;
    font-size: 1.8rem;
    line-height: 1.2;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.logo h1 span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--secondary-gold);
}

.progress-display {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
}

.rank-display {
    background: rgba(212, 175, 55, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 25px;
    border: 2px solid var(--secondary-gold);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    overflow: hidden;
}

.rank-display::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.4), transparent);
    transition: left 0.5s ease;
}

.rank-display.promotion::before {
    left: 100%;
}

.rank-display i {
    color: var(--secondary-gold);
    margin-right: 0.5rem;
}

.chapter-progress {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
    width: 100%;
}

/* Screen Management */
.screen {
    display: none;
}

.screen.active {
    display: block;
    animation: fadeIn 0.5s ease-in;
}

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

/* Welcome Screen */
.welcome-container {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.welcome-hero h2 {
    font-family: 'Orbitron', monospace;
    font-size: 3rem;
    margin-bottom: 1rem;
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-hero p {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.story-intro {
    margin-bottom: 3rem;
    text-align: left;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.story-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--darker-bg);
    border-radius: 12px;
    border-left: 4px solid var(--secondary-gold);
}

.story-text {
    color: var(--text-light);
    line-height: 1.8;
    font-size: 1.1rem;
    margin: 0;
}

.story-text strong {
    color: var(--secondary-gold);
}

.story-text em {
    color: var(--primary-red);
    font-style: normal;
    font-weight: 600;
}

.story-highlight {
    background: linear-gradient(135deg, 
        rgba(220, 38, 38, 0.1), 
        rgba(212, 175, 55, 0.1));
    border: 2px solid var(--secondary-gold);
    border-radius: 16px;
    padding: 2rem;
    margin-top: 2rem;
}

.story-highlight h3 {
    color: var(--secondary-gold);
    font-family: 'Orbitron', monospace;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.journey-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.journey-step {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 1rem;
    background: var(--darker-bg);
    border-radius: 8px;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.journey-step i {
    color: var(--primary-red);
    font-size: 1.3rem;
    min-width: 20px;
}

.journey-step span {
    color: var(--text-light);
    font-weight: 500;
}

/* Buttons */
.cta-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-primary);
}

.cta-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.cta-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cta-button i {
    margin-right: 0.5rem;
}

/* Action Button Layouts */
.secondary-actions {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.nav-button.primary {
    background: var(--gradient-primary);
    color: white;
    font-size: 1.1rem;
    padding: 1rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: var(--shadow-primary);
}

.nav-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.nav-button.secondary {
    background: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
    font-size: 0.9rem;
    padding: 0.75rem 1.5rem;
    opacity: 0.8;
    transition: all 0.3s ease;
}

.nav-button.secondary:hover {
    color: var(--text-light);
    border-color: var(--text-light);
    opacity: 1;
    transform: none;
    box-shadow: none;
}

/* Chapter Selection */
.chapters-container h2 {
    text-align: center;
    font-family: 'Orbitron', monospace;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--secondary-gold);
}

.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.chapter-card {
    background: var(--darker-bg);
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.chapter-card:hover {
    border-color: var(--secondary-gold);
    transform: translateY(-5px);
    box-shadow: var(--shadow-elevated);
}

.chapter-card.locked {
    opacity: 0.5;
    cursor: not-allowed;
    border-color: #666;
}

.chapter-card.completed {
    border-color: var(--success-green);
}

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

.chapter-number {
    background: var(--primary-red);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-weight: bold;
}

.chapter-status {
    font-size: 1.5rem;
}

.chapter-status.completed {
    color: var(--success-green);
}

.chapter-status.locked {
    color: #666;
}

.chapter-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.chapter-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.chapter-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Lesson Screen */
.lesson-container {
    max-width: 1400px;
    margin: 0 auto;
}

.lesson-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
}

.back-button {
    background: var(--darker-bg);
    color: var(--text-light);
    border: 2px solid var(--primary-red);
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.back-button:hover {
    background: var(--primary-red);
    border-color: var(--secondary-gold);
}

.lesson-title {
    flex: 1;
}

.lesson-title h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: var(--secondary-gold);
    margin-bottom: 0.5rem;
}

.lesson-progress {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar {
    background: var(--darker-bg);
    height: 8px;
    border-radius: 4px;
    flex: 1;
    overflow: hidden;
}

.progress-fill {
    background: var(--gradient-secondary);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 4px;
}

.lesson-content {
    background: var(--darker-bg);
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 2rem;
    min-height: 400px;
}

.lesson-step {
    display: none;
}

.lesson-step.active {
    display: block;
    animation: slideIn 0.4s ease;
}

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

.lesson-step h3 {
    font-size: 1.5rem;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

.lesson-step p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

/* 2x2 Grid Lesson Layout */
.lesson-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
    margin-top: 1rem;
    min-height: 800px;
}

/* Theory Section - Top Left */
.lesson-theory {
    background: rgba(30, 58, 138, 0.1);
    border: 2px solid var(--accent-blue);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: 1;
    grid-row: 1;
}

.lesson-theory h4 {
    color: var(--accent-blue);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Examples Section - Bottom Left */
.lesson-examples {
    background: rgba(22, 163, 74, 0.1);
    border: 2px solid var(--success-green);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: 1;
    grid-row: 2;
}

.lesson-examples h4 {
    color: var(--success-green);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Warhammer Application - Top Right */
.lesson-application {
    background: rgba(139, 0, 0, 0.1);
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: 2;
    grid-row: 1;
}

.lesson-application h4 {
    color: var(--primary-red);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Interactive Question - Bottom Right */
.lesson-interactive {
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--secondary-gold);
    border-radius: 12px;
    padding: 1.5rem;
    grid-column: 2;
    grid-row: 2;
    display: flex;
    flex-direction: column;
}

.lesson-interactive h4 {
    color: var(--secondary-gold);
    font-size: 1.2rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.lesson-interactive .interactive-element {
    background: transparent;
    border: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
    .lesson-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        gap: 1rem;
    }
    
    .lesson-theory {
        grid-column: 1;
        grid-row: 1;
    }
    
    .lesson-examples {
        grid-column: 1;
        grid-row: 2;
    }
    
    .lesson-application {
        grid-column: 1;
        grid-row: 3;
    }
    
    .lesson-interactive {
        grid-column: 1;
        grid-row: 4;
    }
}

.example-box {
    background: rgba(212, 175, 55, 0.1);
    border-left: 4px solid var(--secondary-gold);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.formula-box {
    background: rgba(30, 58, 138, 0.2);
    border: 2px solid var(--accent-blue);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 8px;
    text-align: left;
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
}

.interactive-element {
    border: 2px solid var(--primary-red);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    background: linear-gradient(145deg, var(--darker-bg), var(--dark-bg));
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.interactive-element h4 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    text-align: center;
}

/* Animation for better user experience */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.lesson-controls {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}

.nav-button {
    background: var(--gradient-primary);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-button:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: var(--shadow-elevated);
}

.nav-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Quiz Screen */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
}

.quiz-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--primary-red);
}

.quiz-header h2 {
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    color: var(--secondary-gold);
    margin-bottom: 1rem;
}

.quiz-content {
    background: var(--darker-bg);
    border-radius: 12px;
    padding: 2rem;
}

.question {
    margin-bottom: 2rem;
}

.question h3 {
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

.options {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.option {
    background: var(--dark-bg);
    border: 2px solid var(--primary-red);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.option:hover {
    border-color: var(--secondary-gold);
    background: rgba(212, 175, 55, 0.1);
}

.option.selected {
    border-color: var(--secondary-gold);
    background: rgba(212, 175, 55, 0.2);
}

.option.correct {
    border-color: var(--success-green);
    background: rgba(22, 163, 74, 0.2);
}

.option.incorrect {
    border-color: var(--warning-orange);
    background: rgba(234, 88, 12, 0.2);
}

/* Additional styles for chapter topics and interactive elements */
.chapter-topics {
    margin-top: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.topic-tag {
    background: var(--primary-red);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

/* Interactive elements styling */
.classification-activity {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.classification-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--dark-bg);
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.classification-item {
    border: 2px solid var(--primary-red);
    transition: all 0.3s ease;
}

.classification-item:hover {
    border-color: var(--secondary-gold);
}

.classification-select {
    background: var(--darker-bg);
    color: var(--text-light);
    border: 2px solid var(--primary-red);
    border-radius: 4px;
    padding: 0.5rem;
    min-width: 200px;
}

.calculation-inputs {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin: 1rem 0;
}

.calculation-inputs label {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-weight: 500;
}

.calculation-inputs input {
    background: var(--darker-bg);
    color: var(--text-light);
    border: 2px solid var(--primary-red);
    border-radius: 4px;
    padding: 0.75rem;
    font-size: 1rem;
}

.calculation-inputs input:focus {
    border-color: var(--secondary-gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
    outline: none;
}

.check-answers-btn {
    background: var(--gradient-secondary);
    color: var(--dark-bg);
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s ease;
}

.check-answers-btn:hover {
    background: linear-gradient(135deg, #b8941f, var(--secondary-gold));
    transform: translateY(-2px);
}

.bias-scenario {
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.bias-scenario {
    border: 2px solid var(--primary-red);
    transition: all 0.3s ease;
}

.bias-scenario:hover {
    border-color: var(--secondary-gold);
}

.bias-select {
    background: var(--darker-bg);
    color: var(--text-light);
    border: 2px solid var(--primary-red);
    border-radius: 4px;
    padding: 0.5rem;
    width: 100%;
    margin-top: 0.5rem;
}

.feedback-area {
    margin-top: 1rem;
    animation: fadeIn 0.5s ease-in;
}

.feedback-area h5 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.feedback-area ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-area li {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--dark-bg);
    border-radius: 6px;
    border-left: 4px solid var(--primary-red);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    border-top: 2px solid var(--primary-red);
    padding: 1rem 0;
    margin-top: auto;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-gold);
}

/* Notifications */
.notification-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 1000;
}

.notification {
    background: var(--gradient-primary);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    box-shadow: var(--shadow-elevated);
    animation: slideInRight 0.3s ease;
}

.notification.success {
    background: linear-gradient(135deg, var(--success-green), #15803d);
}

.notification.warning {
    background: linear-gradient(135deg, var(--warning-orange), #c2410c);
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Promotion Modal Styles */
.promotion-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.5s ease;
}

.promotion-content {
    background: var(--gradient-primary);
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    max-width: 500px;
    margin: 2rem;
    border: 3px solid var(--secondary-gold);
    box-shadow: var(--shadow-elevated);
    animation: slideIn 0.6s ease;
}

.promotion-content h3 {
    color: var(--secondary-gold);
    font-family: 'Orbitron', monospace;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.rank-transition {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.old-rank {
    color: var(--text-muted);
    text-decoration: line-through;
}

.new-rank {
    color: var(--secondary-gold);
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.rank-transition i {
    color: var(--secondary-gold);
    font-size: 2rem;
}

.promotion-content p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.close-promotion {
    background: var(--gradient-secondary);
    color: var(--dark-bg);
    border: none;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.close-promotion:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(212, 175, 55, 0.3);
}

/* Animation for rank updates */
@keyframes rankGlow {
    0% { box-shadow: 0 0 5px var(--secondary-gold); }
    50% { box-shadow: 0 0 20px var(--secondary-gold), 0 0 30px var(--secondary-gold); }
    100% { box-shadow: 0 0 5px var(--secondary-gold); }
}

.rank-display.promotion {
    animation: rankGlow 2s ease-in-out;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .logo h1 {
        font-size: 1.5rem;
    }
    
    .main-content {
        padding: 1rem;
    }
    
    .welcome-hero h2 {
        font-size: 2rem;
    }
    
    .story-intro {
        margin-bottom: 2rem;
    }
    
    .story-section {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .story-text {
        font-size: 1rem;
    }
    
    .story-highlight {
        padding: 1.5rem;
    }
    
    .journey-steps {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }
    
    .journey-step {
        padding: 0.8rem;
    }
    
    .chapters-grid {
        grid-template-columns: 1fr;
    }
    
    .lesson-header {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .lesson-progress {
        justify-content: space-between;
    }
    
    .lesson-controls {
        flex-direction: column;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .classification-item {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    
    .classification-select {
        min-width: auto;
    }
    
    .calculation-inputs label {
        text-align: left;
    }
    
    .simulation-controls {
        flex-direction: column;
        align-items: center;
    }
    
    .simulation-controls button {
        width: 100%;
        max-width: 250px;
    }
    
    .promotion-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .promotion-content h3 {
        font-size: 1.5rem;
    }
    
    .rank-transition {
        font-size: 1.2rem;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rank-transition i {
        transform: rotate(90deg);
    }
}

@media (max-width: 480px) {
    .main-content {
        padding: 0.5rem;
    }
    
    .lesson-content {
        padding: 1rem;
    }
    
    .quiz-content {
        padding: 1rem;
    }
}

/* ===== ADMIN MODE STYLES ===== */

.admin-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #ffd700;
    color: #000;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    z-index: 10;
}

.chapter-card.admin-unlocked {
    border: 2px dashed #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.1), rgba(255, 215, 0, 0.05));
}

.chapter-card.admin-unlocked .chapter-status {
    color: #ffd700;
}

.admin-hint {
    font-size: 11px;
    color: #ffd700;
    margin-top: 5px;
    text-align: center;
    font-style: italic;
}

.admin-action-badge {
    font-size: 10px;
    margin-left: 4px;
}

/* Admin notification styles - integrated with existing notification system */
.notification.admin {
    border-left: 4px solid #ffd700;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.2), rgba(255, 215, 0, 0.1));
}

/* Admin chapter status icon */
.chapter-status .fa-key {
    color: #ffd700;
}

/* Quick admin access for testing */
.admin-quick-access {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #ffd700;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-quick-access:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(255, 215, 0, 0.5);
}

/* Admin Panel Modal Styles */
.admin-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.admin-panel, .admin-modal {
    background: var(--dark-gray);
    border: 2px solid var(--secondary-gold);
    border-radius: 12px;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.admin-modal-header {
    background: var(--secondary-gold);
    color: var(--dark-gray);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 10px 10px 0 0;
}

.admin-panel-body, .admin-modal-body {
    padding: 1.5rem;
}

.admin-section {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-section:last-child {
    border-bottom: none;
}

.admin-section h4 {
    color: var(--secondary-gold);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.admin-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.6rem 1rem;
    margin: 0.25rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.admin-btn:hover {
    background: var(--hover-red);
    transform: translateY(-1px);
}

.admin-btn.small {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
    min-width: auto;
}

.admin-btn.secondary {
    background: var(--text-muted);
    color: white;
}

.admin-btn.secondary:hover {
    background: var(--text-light);
}

.admin-btn.danger {
    background: #dc2626;
}

.admin-btn.danger:hover {
    background: #b91c1c;
}

.admin-btn.primary {
    background: var(--secondary-gold);
    color: var(--dark-gray);
}

.admin-btn.primary:hover {
    background: #daa520;
}

.chapter-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chapter-nav-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.chapter-nav-main {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.chapter-nav-main .admin-btn:first-child {
    flex: 1;
    min-width: 0;
}

.quiz-btn {
    background: var(--accent-purple) !important;
    color: white !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.quiz-btn:hover {
    background: var(--accent-blue) !important;
}

.admin-btn.disabled {
    background: #444 !important;
    color: #888 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.assessment-quick-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-btn.full-width {
    width: 100%;
    text-align: left;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.quiz-info {
    font-size: 0.85em;
    opacity: 0.8;
    font-weight: normal;
}

.lesson-steps-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-left: 20px;
    padding-left: 15px;
    border-left: 2px solid var(--secondary-gold);
}

.step-btn {
    background: var(--text-muted);
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 300px;
}

.step-btn:hover {
    background: var(--text-light);
}

.step-toggle {
    margin-left: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: var(--dark-gray);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-btn:hover {
    background: rgba(0, 0, 0, 0.2);
}

.admin-input {
    width: 100%;
    padding: 0.8rem;
    margin: 1rem 0;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--secondary-gold);
    border-radius: 6px;
    color: var(--text-light);
    font-size: 1rem;
}

.admin-modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.admin-modal-footer {
    padding: 1rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.admin-error {
    color: #ff6b6b;
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

.admin-indicator {
    position: fixed;
    top: 10px;
    right: 10px;
    background: var(--secondary-gold);
    color: var(--dark-gray);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.admin-panel-btn, .admin-logout-btn {
    background: var(--primary-red);
    color: white;
    border: none;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-panel-btn:hover, .admin-logout-btn:hover {
    background: var(--hover-red);
}

/* Alternative text emphasis without bold (to avoid blur) */
.text-emphasis {
    color: var(--secondary-gold);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-highlight {
    color: var(--primary-red);
    font-style: italic;
}

.text-important {
    color: var(--accent-blue);
    text-decoration: underline;
    text-decoration-color: var(--accent-blue);
}

.text-key {
    color: var(--success-green);
    background: rgba(22, 163, 74, 0.1);
    padding: 0.1rem 0.3rem;
    border-radius: 3px;
}

.text-category {
    color: var(--warning-orange);
    text-transform: capitalize;
}

/* Table Styling for Categorical Data */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    background: rgba(20, 20, 20, 0.8);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

th, td {
    padding: 12px 16px;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text-light);
}

th {
    background: linear-gradient(135deg, var(--primary-red), #8B0000);
    color: var(--secondary-gold);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--secondary-gold);
}

td {
    background: rgba(40, 40, 40, 0.6);
}

tr:nth-child(even) td {
    background: rgba(60, 60, 60, 0.4);
}

tr:hover td {
    background: rgba(212, 175, 55, 0.1);
    transition: background 0.2s ease;
}

/* Two-way table specific styling */
.two-way-table th:first-child,
.two-way-table td:first-child {
    background: linear-gradient(135deg, #4A4A4A, #2A2A2A);
    font-weight: bold;
    text-align: left;
}

.two-way-table .total-row {
    border-top: 2px solid var(--secondary-gold);
    background: rgba(212, 175, 55, 0.1) !important;
    font-weight: bold;
}

.two-way-table .total-col {
    border-left: 2px solid var(--secondary-gold);
    background: rgba(212, 175, 55, 0.1) !important;
    font-weight: bold;
}
