/* Gang Ties Educational Game Styles */

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

:root {
    --primary-color: #3b82f6;
    --secondary-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --accent-color: #8b5cf6;
    --success-color: #22c55e;
    --bg-color: #f8fafc;
    --bg-light: #ffffff;
    --text-color: #1e293b;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --border-focus: #3b82f6;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Child-friendly enhancements */
    --fun-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --border-radius: 12px;
    --border-radius-lg: 20px;
}

/* Birmingham Children's Trust Banner */
.birmingham-trust-banner {
    background: linear-gradient(135deg, #3cff005d 0%, #ff00ff71 100%);
    color: white;
    padding: 8px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 3px solid #24e2fb;
}

.banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.trust-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.shield-icon {
    font-size: 1.2em;
    color: #27eb00;
}

.trust-text {
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

.banner-message {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 0.85em;
}

.emergency-link {
    background: #00ff15;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid #ff00f2;
}

.emergency-link:hover {
    background: white;
    color: #dc2626;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .banner-content {
        flex-direction: column;
        text-align: center;
        gap: 5px;
    }
    
    .banner-message {
        flex-direction: column;
        gap: 8px;
    }
    
    .trust-text {
        font-size: 0.9em;
    }
    
    .banner-message span {
        font-size: 0.8em;
    }
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Comic Sans MS', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    color: var(--text-color);
    line-height: 1.8;
    min-height: 100vh;
    font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
    font-size: 16px;
    
    /* Special Educational Needs enhancements */
    letter-spacing: 0.02em;
    word-spacing: 0.1em;
}

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

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    flex-wrap: wrap;
}

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

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-text h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
}

.tagline {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.85rem;
    display: block;
    margin-top: 2px;
}

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

.nav-btn {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background: transparent;
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.nav-btn:hover {
    background: rgba(37, 99, 235, 0.1);
    border-color: var(--primary-color);
}

.nav-btn.primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border: none;
}

.nav-btn.primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.nav-btn.educator {
    background: linear-gradient(135deg, var(--secondary-color), #10b981);
    color: white;
    border: none;
    font-size: 0.85rem;
}

.nav-btn.educator:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, #047857, var(--secondary-color));
}

/* Screens */
.screen {
    display: none;
    min-height: calc(100vh - 120px);
    padding: 2rem 0;
}

.screen.active {
    display: block;
}

/* Start Screen */
.welcome-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.badge-icon {
    font-size: 1rem;
}

.welcome-content h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    line-height: 1.1;
}

.impact-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 2rem 0;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--secondary-color);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-color);
    font-weight: 500;
}

.lead {
    font-size: 1.2rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.feature {
    text-align: center;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.feature:hover {
    transform: translateY(-5px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.feature .icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 1rem;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.disclaimer {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #64748b;
    font-style: italic;
}

/* Character Selection */
.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.character-card {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    box-shadow: var(--shadow);
}

.character-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.character-avatar {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.character-card h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.character-card p {
    color: var(--text-color);
}

/* Game Screen */
.game-container {
    max-width: 1000px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.game-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.character-info {
    flex: 1;
    min-width: 200px;
}

#character-name {
    font-size: 1.2rem;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
    overflow: hidden;
}

.progress {
    height: 100%;
    background: var(--secondary-color);
    transition: width 0.3s ease;
}

.consequences-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1rem;
}

.consequence-item {
    text-align: center;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.consequence-item .icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
}

.consequence-item .label {
    display: block;
    font-size: 0.8rem;
    opacity: 0.9;
}

.consequence-item .value {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    margin-top: 0.25rem;
}

/* Story Panel */
.story-panel {
    padding: 2rem;
    min-height: 300px;
}

.story-content {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.scene-image {
    font-size: 6rem;
    flex-shrink: 0;
    background: var(--bg-color);
    padding: 1rem;
    border-radius: 15px;
    text-align: center;
    min-width: 120px;
}

.story-text {
    flex: 1;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Choices Panel */
.choices-panel {
    background: var(--bg-color);
    padding: 2rem;
    border-top: 2px solid var(--border-color);
}

.choices-panel h3 {
    margin-bottom: 1rem;
    color: var(--primary-color);
}

.choices {
    display: grid;
    gap: 1rem;
}

.choice-btn {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    line-height: 1.6;
}

.choice-btn:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
    transform: translateX(10px);
}

.choice-btn.positive {
    border-left: 5px solid var(--secondary-color);
}

.choice-btn.negative {
    border-left: 5px solid var(--warning-color);
}

.choice-btn.neutral {
    border-left: 5px solid #64748b;
}

/* Results Screen */
.results-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    max-width: 800px;
    margin: 0 auto;
}

.final-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.score-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--bg-color);
    border-radius: 15px;
    border: 2px solid var(--border-color);
}

.score-item .icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}

.score-item .label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}

.score-item .value {
    font-size: 2rem;
    font-weight: 700;
    display: block;
}

.score-item.good .value {
    color: var(--secondary-color);
}

.score-item.warning .value {
    color: #f59e0b;
}

.score-item.danger .value {
    color: var(--warning-color);
}

.story-summary {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 15px;
    margin: 2rem 0;
    border-left: 5px solid var(--primary-color);
}

.lessons-learned {
    margin: 2rem 0;
}

.lessons-learned h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.lessons-learned ul {
    list-style: none;
    padding: 0;
}

.lessons-learned li {
    background: var(--bg-color);
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--secondary-color);
}

.resources {
    margin-top: 2rem;
}

.resources h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.resource-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.resource-link:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.resource-link .icon {
    font-size: 1.5rem;
}

/* Buttons */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f1f5f9;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 3fr;
    gap: 3rem;
    padding: 3rem 0;
}

.footer-section {
    max-width: 400px;
}

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

.footer-logo h3 {
    color: #f1f5f9;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.footer-logo p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

.footer-description {
    color: #cbd5e1;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer-column h4 {
    color: #f1f5f9;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 0.5rem;
}

.footer-column a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-column a:hover {
    color: #60a5fa;
}

.footer-bottom {
    border-top: 1px solid #334155;
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: #94a3b8;
    font-size: 0.9rem;
    margin: 0;
}

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

.footer-badges .badge {
    background: rgba(37, 99, 235, 0.1);
    color: #60a5fa;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 20000;
    opacity: 1;
    transition: opacity 0.5s ease;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-logo {
    margin-bottom: 2rem;
}

.loading-content h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.loading-content p {
    color: #94a3b8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto;
}

.loading-progress {
    height: 100%;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    border-radius: 2px;
    animation: loadingProgress 2s ease-in-out;
}

@keyframes loadingProgress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* Child-Friendly & SEN-Accessible Styles */

/* Hero Character & Speech Bubble */
.hero-character {
    display: flex;
    align-items: flex-start;
    gap: 1.5rem;
    margin-bottom: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.character-mascot {
    font-size: 4rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.speech-bubble {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    border: 3px solid var(--primary-color);
    position: relative;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    
    /* Speech bubble tail */
    &::before {
        content: '';
        position: absolute;
        left: -15px;
        top: 20px;
        width: 0;
        height: 0;
        border: 15px solid transparent;
        border-right-color: var(--primary-color);
    }
    
    &::after {
        content: '';
        position: absolute;
        left: -9px;
        top: 23px;
        width: 0;
        height: 0;
        border: 12px solid transparent;
        border-right-color: white;
    }
}

.speech-bubble p {
    margin: 0.5rem 0;
    font-size: 1.1rem;
    color: var(--text-color);
}

.speech-bubble strong {
    color: var(--primary-color);
}

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

/* Simple Explanation Cards */
.simple-explanation {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.explanation-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.explanation-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color);
    box-shadow: var(--shadow-xl);
}

.big-emoji {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    display: block;
}

.explanation-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.explanation-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-color);
}

/* Health Notice */
.health-notice {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(16, 185, 129, 0.1));
    border: 2px solid var(--success-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
}

.health-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.health-text h4 {
    color: var(--success-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.health-text p {
    margin: 0;
    color: var(--text-color);
    font-size: 1rem;
}

/* Authentication Styles */
.auth-container, .enrollment-container {
    max-width: 500px;
    margin: 2rem auto;
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
}

.enrollment-container {
    max-width: 800px;
}

.auth-header, .enrollment-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2, .enrollment-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.important-notice {
    background: rgba(245, 158, 11, 0.1);
    border: 2px solid var(--warning-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.notice-icon {
    font-size: 1.5rem;
}

/* Form Styles - SEN Friendly */
.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
    
    /* SEN enhancements */
    line-height: 1.5;
    letter-spacing: 0.01em;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: rgba(59, 130, 246, 0.02);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.password-toggle {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
}

.form-group {
    position: relative;
}

.help-text {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-top: 0.25rem;
    font-style: italic;
}

/* Fieldsets */
fieldset {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

fieldset legend {
    font-weight: 700;
    color: var(--primary-color);
    padding: 0 1rem;
    font-size: 1.1rem;
}

/* Consent Checkboxes */
.consent-checkboxes {
    margin: 1rem 0;
}

.consent-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: background-color 0.2s ease;
}

.consent-item:hover {
    background: rgba(59, 130, 246, 0.05);
}

.consent-item input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.checkmark {
    position: relative;
    flex-shrink: 0;
}

/* Buttons - Child Friendly */
.btn {
    padding: 1rem 2rem;
    border: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
    
    /* SEN enhancements */
    min-height: 48px;
    letter-spacing: 0.02em;
}

.btn.large {
    padding: 1.5rem 2.5rem;
    font-size: 1.3rem;
    min-height: 60px;
}

.btn.full-width {
    width: 100%;
}

.btn-primary {
    background: var(--fun-gradient);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 1rem;
    text-decoration: underline;
    padding: 0.5rem;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

/* Dashboard Styles */
.dashboard-header {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.user-welcome {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.avatar {
    font-size: 3rem;
    background: var(--fun-gradient);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.welcome-text h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.welcome-text p {
    color: var(--text-light);
    font-size: 1.1rem;
    margin: 0;
}

.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
}

.stat-card {
    background: var(--fun-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.stat-icon {
    font-size: 2rem;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Course Modules */
.course-modules {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.course-modules h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    text-align: center;
}

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

.module-card {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.module-card.mandatory {
    border-color: var(--danger-color);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.05), rgba(248, 250, 252, 1));
}

.module-card.final {
    border-color: var(--accent-color);
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.05), rgba(248, 250, 252, 1));
}

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

.status-badge {
    font-size: 0.8rem;
    font-weight: 700;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    color: white;
}

.status-badge.mandatory {
    background: var(--danger-color);
}

.status-badge.important {
    background: var(--warning-color);
}

.status-badge.final {
    background: var(--accent-color);
}

.status-badge:not(.mandatory):not(.important):not(.final) {
    background: var(--text-light);
}

.completion-icon {
    font-size: 1.5rem;
}

.module-content h4 {
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.module-content p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

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

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

.module-btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: var(--border-radius);
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.module-btn:hover:not(:disabled) {
    background: var(--accent-color);
    transform: translateY(-2px);
}

.module-btn:disabled {
    background: var(--text-light);
    cursor: not-allowed;
    opacity: 0.6;
}

.dashboard-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Enhanced Accessibility for SEN */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .character-mascot {
        animation: none;
    }
}

/* High contrast mode for visual impairments */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
        --text-color: #000;
        --bg-color: #fff;
    }
    
    .btn {
        border: 3px solid #000;
    }
}

/* Large text support */
@media (min-resolution: 192dpi) {
    body {
        font-size: 18px;
    }
    
    .btn {
        min-height: 56px;
        font-size: 1.2rem;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .welcome-content {
        padding: 2rem 1rem;
        margin: 1rem;
    }
    
    .welcome-content h2 {
        font-size: 2.5rem;
    }
    
    .impact-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .features {
        grid-template-columns: 1fr;
    }
    
    .character-grid {
        grid-template-columns: 1fr;
    }
    
    .story-content {
        flex-direction: column;
        text-align: center;
    }
    
    .scene-image {
        font-size: 4rem;
        margin: 0 auto;
    }
    
    .game-header {
        flex-direction: column;
        gap: 1rem;
    }
    
    .consequences-panel {
        grid-template-columns: repeat(2, 1fr);
        width: 100%;
    }
    
    .resource-links {
        grid-template-columns: 1fr;
    }
    
    .nav {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .nav-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .modal-overlay {
        padding: 1rem;
    }
    
    .modal-header,
    .modal-body {
        padding: 1rem;
    }
    
    .resource-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-badges {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .welcome-content h2 {
        font-size: 1.8rem;
    }
    
    .story-panel {
        padding: 1rem;
    }
    
    .choices-panel {
        padding: 1rem;
    }
    
    .results-content {
        padding: 2rem 1rem;
        margin: 1rem;
    }
    
    .final-scores {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.screen.active {
    animation: fadeIn 0.5s ease-out;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { 
        transform: rotate(360deg); 
    }
}

/* Warning Signs Highlighting */
.warning-sign {
    background: rgba(220, 38, 38, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    border-left: 3px solid var(--warning-color);
    font-weight: 600;
    color: var(--warning-color);
}

.positive-choice {
    background: rgba(5, 150, 105, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    border-left: 3px solid var(--secondary-color);
    font-weight: 600;
    color: var(--secondary-color);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
        --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
    }
}

/* Modal Styles */
.modal-overlay {
    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: 10000;
    padding: 2rem;
    animation: fadeIn 0.2s ease-out;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: slideUp 0.3s ease-out;
}

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

.modal-header h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: var(--bg-color);
    color: var(--text-color);
}

.modal-body {
    padding: 1rem 2rem 2rem 2rem;
    line-height: 1.7;
}

.modal-body h3 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 2rem 0 1rem 0;
}

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

.modal-body li {
    margin-bottom: 0.5rem;
}

/* Resource Modal Specific Styles */
.resource-section {
    margin: 2rem 0;
    padding: 1.5rem;
    border-radius: 15px;
    background: var(--bg-color);
}

.resource-section.emergency {
    background: linear-gradient(135deg, rgba(220, 38, 38, 0.05), rgba(239, 68, 68, 0.05));
    border: 2px solid rgba(220, 38, 38, 0.1);
}

.resource-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.resource-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.resource-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.resource-card.urgent {
    border-left: 5px solid var(--warning-color);
}

.resource-card h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.resource-contact {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--warning-color);
    margin: 0.5rem 0;
}

.resource-note {
    background: rgba(37, 99, 235, 0.1);
    padding: 1rem;
    border-radius: 10px;
    border-left: 4px solid var(--primary-color);
    font-style: italic;
    margin-top: 2rem;
}

/* Enhanced Professional Styling */
.professional-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--secondary-color), #10b981);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.evidence-based {
    background: rgba(5, 150, 105, 0.1);
    border: 1px solid rgba(5, 150, 105, 0.2);
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
}

.evidence-based h4 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Animation Enhancements */
@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse-animation {
    animation: pulse 2s ease-in-out infinite;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    }
    
    .welcome-content,
    .character-card,
    .game-container,
    .results-content {
        background: rgba(30, 41, 59, 0.95);
        color: #f1f5f9;
    }
    
    .choice-btn {
        background: #334155;
        color: #f1f5f9;
        border-color: #475569;
    }
    
    .modal-content {
        background: #1e293b;
        color: #f1f5f9;
    }
    
    .resource-section {
        background: #334155;
    }
    
    .resource-card {
        background: #475569;
        color: #f1f5f9;
        border-color: #64748b;
    }
}

/* Module Screen Styles */
.module-screen {
    padding: 2rem 0;
}

.module-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.module-header {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.back-btn:hover {
    background: white;
    color: var(--primary-color);
}

#module-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

#module-content {
    padding: 2rem;
    min-height: 400px;
}

/* Module Section Styles */
.module-section {
    margin-bottom: 2rem;
}

.module-section.introduction,
.module-section.lesson,
.module-section.interactive,
.module-section.interactive-scenarios,
.module-section.assessment {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid var(--border-color);
}

.section-icon {
    font-size: 3rem;
    text-align: center;
    margin-bottom: 1rem;
}

.module-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.content-text {
    line-height: 1.7;
    margin-bottom: 2rem;
    color: var(--text-color);
}

.content-text h3 {
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
}

.content-text p {
    margin-bottom: 1rem;
}

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

.content-text li {
    margin-bottom: 0.5rem;
}

.lesson-duration,
.assessment-duration {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 1rem;
}

.lesson-content,
.assessment-content {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.signal-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.signal-card.good {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.signal-card.warning {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.signal-card.danger {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.signal-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.signal-card h4 {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.app-safety-guide {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.safety-tip {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem;
    border-radius: 10px;
    margin: 1rem 0;
    border-left: 4px solid;
}

.safety-tip.danger {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.safety-tip.warning {
    background: #fffbeb;
    border-left-color: #f59e0b;
}

.safety-tip.good {
    background: #ecfdf5;
    border-left-color: #10b981;
}

.tip-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.danger-scenarios {
    background: #fef2f2;
    border: 2px solid #ef4444;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.danger-scenarios h4 {
    color: #dc2626;
    margin-top: 0;
}

.danger-scenarios ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.danger-scenarios li {
    margin: 0.5rem 0;
    color: #7f1d1d;
    font-weight: 500;
}

/* Health Effects Styling */
.health-effects {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 2rem;
    margin: 1.5rem 0;
}

.effect-category {
    background: #f8fafc;
    border-radius: 10px;
    padding: 1rem;
    margin: 1rem 0;
    border-left: 4px solid var(--primary-color);
}

.effect-category h4 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
}

.effect-category ul {
    margin: 0;
    padding-left: 1.5rem;
}

.effect-category li {
    margin: 0.3rem 0;
    color: #475569;
}

/* Health Rule Styling */
.health-rule {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 15px;
    padding: 2rem;
    margin: 1.5rem 0;
    border: 2px solid #10b981;
}

.rule-explanation {
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.rule-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
    min-width: 150px;
}

.step-number {
    background: var(--primary-color);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.step-text h4 {
    margin: 0.5rem 0;
    color: var(--text-color);
}

.step-text p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

.bonus-tips {
    background: #fffbeb;
    border-radius: 10px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid #f59e0b;
}

.bonus-tips h4 {
    color: #d97706;
    margin-top: 0;
}

.bonus-tips ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.bonus-tips li {
    margin: 0.5rem 0;
    color: #92400e;
}

/* Health Reminder Popup */
.health-reminder {
    position: fixed;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    animation: slideInRight 0.3s ease;
    max-width: 300px;
}

.reminder-content {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
}

.reminder-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.reminder-text h4 {
    margin: 0 0 0.25rem 0;
    color: #059669;
    font-size: 0.9rem;
}

.reminder-text p {
    margin: 0;
    color: #065f46;
    font-size: 0.8rem;
}

.reminder-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.reminder-close:hover {
    color: #374151;
}

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

/* Feedback Modal */
.feedback-modal {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
}

.feedback-modal.success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
}

.feedback-modal.error {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
}

.feedback-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feedback-modal h2 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
}

.feedback-modal p {
    color: var(--text-color);
    margin: 0 0 1.5rem 0;
}

/* Enhanced Module Content Styles */
.welcome-section {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 20px;
    padding: 2rem;
    margin: 1rem 0;
}

.character-intro {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.character-avatar {
    font-size: 4rem;
    flex-shrink: 0;
}

.speech-bubble {
    background: #f8fafc;
    padding: 1rem;
    border-radius: 15px;
    position: relative;
    border: 2px solid var(--primary-color);
}

.speech-bubble::before {
    content: '';
    position: absolute;
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
    border: 10px solid transparent;
    border-right-color: var(--primary-color);
}

.learning-objectives {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.objective {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.objective .icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.objective h4 {
    margin: 0 0 0.5rem 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.objective p {
    margin: 0;
    color: #6b7280;
    font-size: 0.95rem;
}

.session-breakdown {
    background: #fffbeb;
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 2px solid #fbbf24;
}

.session-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
}

.session-list li {
    background: white;
    padding: 1rem;
    margin: 0.5rem 0;
    border-radius: 10px;
    border-left: 4px solid #fbbf24;
    font-weight: 500;
}

.encouragement {
    text-align: center;
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 2rem 0 1rem 0;
    padding: 1rem;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

/* Scenario Practice Styles */
.scenario-practice {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.scenario-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.scenario {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.scenario:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.scenario-setup h4 {
    color: var(--primary-color);
    margin: 0 0 1rem 0;
    font-size: 1.3rem;
}

.scenario-image {
    font-size: 4rem;
    text-align: center;
    margin: 1rem 0;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 10px;
}

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

.scenario-question h5 {
    color: var(--text-color);
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
}

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

.scenario-btn {
    padding: 1rem;
    border: 2px solid transparent;
    border-radius: 10px;
    background: #f8fafc;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
    font-weight: 500;
}

.scenario-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.scenario-btn.green {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
}

.scenario-btn.yellow {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
}

.scenario-btn.red {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
}

.scenario-btn.selected {
    transform: translateX(8px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.scenario-feedback {
    margin-top: 1.5rem;
    padding: 1.5rem;
    border-radius: 10px;
    animation: fadeIn 0.5s ease;
}

.scenario-feedback.correct {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    color: #065f46;
}

.scenario-feedback.incorrect {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border: 2px solid #ef4444;
    color: #7f1d1d;
}

.scenario-feedback.partial {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 2px solid #f59e0b;
    color: #92400e;
}

/* Safety Network Styles */
.safety-network {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 2rem;
    margin: 2rem 0;
}

.network-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin: 1.5rem 0;
}

.network-category {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
}

.network-category:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

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

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

.category-header h5 {
    margin: 0;
    color: var(--primary-color);
    font-size: 1.2rem;
}

.trust-level {
    background: #f0f9ff;
    padding: 0.5rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 1rem;
}

.network-building-activity {
    background: #f8fafc;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 2px solid var(--primary-color);
}

.network-builder {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.builder-section h5 {
    color: var(--primary-color);
    margin: 0 0 0.5rem 0;
}

.name-slots {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.network-input {
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.network-input:focus {
    outline: none;
    border-color: var(--primary-color);
}

.network-input.inline {
    width: 150px;
    margin-left: 0.5rem;
}

.emergency-numbers {
    list-style: none;
    padding: 0;
    background: #fef2f2;
    border-radius: 10px;
    padding: 1rem;
    border: 2px solid #ef4444;
}

.emergency-numbers li {
    margin: 0.5rem 0;
    font-weight: 500;
    color: #7f1d1d;
}

.communication-tips {
    background: #f0f9ff;
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
}

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

.tip {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
    border: 2px solid var(--primary-color);
}

.tip-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.tip h5 {
    margin: 0.5rem 0;
    color: var(--primary-color);
}

.tip p {
    margin: 0;
    font-size: 0.9rem;
    color: #6b7280;
}

/* Module Details Styling */
.module-details {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.85rem;
    color: #6b7280;
}

.module-details .duration,
.module-details .sessions {
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 500;
}

.module-details .duration {
    color: #059669;
    background: #ecfdf5;
}

.module-details .sessions {
    color: #7c3aed;
    background: #f3e8ff;
}

/* Enhanced Course Structure Styles */
.course-modules h3 {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.5rem;
    margin: 0 0 2rem 0;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    padding: 1rem;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
}

.modules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.module-card {
    background: white;
    border-radius: 15px;
    padding: 1.5rem;
    border: 2px solid #e5e7eb;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.module-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.module-card.mandatory {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
}

.module-card.final {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, white 100%);
}

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

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.mandatory {
    background: #ef4444;
    color: white;
}

.status-badge.important {
    background: #f59e0b;
    color: white;
}

.status-badge.final {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.status-badge:not(.mandatory):not(.important):not(.final) {
    background: var(--primary-color);
    color: white;
}

.completion-icon {
    font-size: 1.5rem;
}

.module-content h4 {
    color: var(--text-color);
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.module-content p {
    color: #6b7280;
    margin: 0 0 1rem 0;
    line-height: 1.5;
}

.progress-bar {
    background: #e5e7eb;
    border-radius: 10px;
    height: 8px;
    margin: 1rem 0;
    overflow: hidden;
}

.progress {
    background: linear-gradient(90deg, var(--primary-color) 0%, #10b981 100%);
    height: 100%;
    border-radius: 10px;
    transition: width 0.5s ease;
}

.module-btn {
    width: 100%;
    padding: 0.75rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1rem;
}

.module-btn:hover:not(:disabled) {
    background: #1e40af;
    transform: translateY(-1px);
}

.module-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Course Info Styling */
.course-info {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 1rem 0 2rem 0;
    border: 2px solid var(--primary-color);
}

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

.stat {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: white;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.stat strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.stat p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* Progress Screen Styles */
.progress-header {
    text-align: center;
    margin-bottom: 2rem;
}

.progress-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.progress-header p {
    color: var(--text-light);
    font-size: 1.1rem;
}

.progress-overview {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

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

.overview-card {
    background: var(--fun-gradient);
    color: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

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

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

.card-number {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
}

.card-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

.character-progress {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.character-progress h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

.character-progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}

.character-progress-card {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.character-progress-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.character-progress-card.completed {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(248, 250, 252, 1));
}

.character-progress-card.not-completed {
    border-color: var(--text-light);
    opacity: 0.7;
}

.character-avatar {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.character-info {
    flex: 1;
}

.character-info h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.completion-status {
    font-size: 0.9rem;
    font-weight: 500;
}

.character-progress-card.completed .completion-status {
    color: var(--secondary-color);
}

.character-progress-card.not-completed .completion-status {
    color: var(--text-light);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    min-height: 36px;
}

.average-scores {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.average-scores h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.score-item {
    background: var(--bg-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    text-align: center;
    border: 2px solid var(--border-color);
}

.score-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

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

.score-value {
    font-size: 1.5rem;
    font-weight: 700;
    display: block;
}

.score-value.good {
    color: var(--secondary-color);
}

.score-value.warning {
    color: #f59e0b;
}

.score-value.danger {
    color: var(--warning-color);
}

.achievements-section {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.achievements-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.achievement-card {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: white;
    text-align: center;
    transition: all 0.3s ease;
}

.achievement-card.earned {
    border-color: var(--secondary-color);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.05), rgba(248, 250, 252, 1));
}

.achievement-card.locked {
    opacity: 0.6;
    filter: grayscale(50%);
}

.achievement-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.achievement-card.earned .achievement-icon {
    color: var(--secondary-color);
}

.achievement-card.locked .achievement-icon {
    color: var(--text-light);
}

.achievement-content h4 {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.achievement-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.4;
}

.recent-games {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.recent-games h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-align: center;
}

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

.game-history-item {
    background: var(--bg-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.game-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.game-character {
    font-weight: 600;
    color: var(--primary-color);
}

.game-date {
    font-size: 0.9rem;
    color: var(--text-light);
}

.game-stats {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.25rem;
}

.game-score {
    font-weight: 700;
    color: var(--secondary-color);
}

.game-choices {
    font-size: 0.9rem;
    color: var(--text-light);
}

.progress-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Achievement Notification */
.achievement-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    border: 3px solid var(--secondary-color);
    z-index: 10001;
    max-width: 350px;
    animation: slideInRight 0.5s ease-out;
}

.achievement-content {
    padding: 1.5rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.achievement-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.achievement-text h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.achievement-text p {
    color: var(--text-color);
    font-size: 1rem;
    line-height: 1.4;
    margin: 0;
}

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

/* Resume Dialog */
.resume-dialog-overlay {
    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: 10000;
    padding: 2rem;
}

.resume-dialog {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    max-width: 500px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.resume-dialog h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.resume-dialog p {
    color: var(--text-color);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

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

.resume-options .btn {
    width: 100%;
}

/* Responsive Progress Screen */
@media (max-width: 768px) {
    .overview-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .character-progress-grid {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .scores-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .game-history-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .game-stats {
        align-items: flex-start;
    }
    
    .achievement-notification {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .resume-dialog {
        margin: 1rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .overview-cards {
        grid-template-columns: 1fr;
    }
    
    .achievements-grid {
        grid-template-columns: 1fr;
    }
    
    .scores-grid {
        grid-template-columns: 1fr;
    }
}