/* Base Styles */
:root {
    --primary-green: #2E7D32;
    --primary-green-light: #4CAF50;
    --primary-orange: #FF6B35;
    --primary-orange-light: #FF8A65;
    --primary-red: #D32F2F;
    --primary-red-light: #EF5350;
    --background-light: #F5F5F5;
    --background-white: #FFFFFF;
    --text-dark: #333333;
    --text-light: #666666;
    --border-color: #E0E0E0;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --card-radius: 12px;
    --transition-speed: 0.3s;
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --background: #f8fafc;
    --surface: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border-color: #e2e8f0;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --font-mono: 'Roboto Mono', monospace;
    --font-sans: 'Roboto', sans-serif;
    --orange-primary: #f97316;
    --orange-hover: #ea580c;
    --orange-light: #fed7aa;
}

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

body {
    font-family: 'Roboto', sans-serif;
    background: linear-gradient(180deg, #000000, #fff500);
    min-height: 100vh;
    padding: 20px;
    color: var(--text-dark);
}

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

/* Language Selector */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 20px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.lang-btn {
    padding: 10px 16px;
    border: 2px solid var(--orange-primary);
    background: var(--orange-primary);
    color: white;
    cursor: pointer;
    border-radius: var(--border-radius);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    min-width: 50px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(249, 115, 22, 0.3);
}

.lang-btn:hover {
    background: var(--orange-hover);
    border-color: var(--orange-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(249, 115, 22, 0.4);
}

.lang-btn.active {
    background: var(--orange-light);
    color: var(--orange-primary);
    border-color: var(--orange-primary);
    box-shadow: inset 0 2px 4px rgba(249, 115, 22, 0.2);
    transform: none;
}

.lang-btn.active:hover {
    background: var(--orange-light);
    transform: none;
}

/* Header */

header {
    text-align: center;
    margin-bottom: 30px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 15px;
}

.header-logo {
    width: 200px;
    height: 200px;
    object-fit: contain;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.header-logo:hover {
    opacity: 0.8;
}

header h1 {
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 2.5rem;
    color: #fbbf24;
    margin: 0;
}

/* Responsive header for smaller screens */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .header-logo {
        width: 150px;
        height: 150px;
    }
    
    header h1 {
        font-size: 2rem;
    }
}

header p {
    color: yellow;
    font-size: 1.1rem;
}

/* Navigation Tabs */
/* Navigation Tabs */
.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 30px;
    background-color: var(--surface);
    padding: 8px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.tab-btn:hover {
    background-color: var(--background);
    color: var(--text-primary);
}

.tab-btn.active {
    background-color: var(--primary-color);
    color: white;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

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

/* Main Layout */
.main-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 1024px) {
    .main-layout {
        grid-template-columns: 1fr;
    }
}

/* Card */
.card {
    background: var(--background-white);
    border-radius: var(--card-radius);
    padding: 25px;
    box-shadow: 0 4px 15px var(--shadow-color);
    border: 1px solid var(--border-color);
}

.card h2 {
    color: var(--primary-green);
    margin-bottom: 20px;
    font-size: 1.5rem;
    text-align: center;
}

/* Practice Section */
.practice-main {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.practice-info {
    background: var(--background-light);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.practice-info p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Progress */
.practice-progress {
    margin-bottom: 20px;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-weight: 500;
}

.progress-bar-container {
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

/* Practice Display */
.practice-display {
    text-align: center;
    padding: 20px;
    background: var(--background-light);
    border-radius: var(--card-radius);
    margin-bottom: 20px;
}

.item-type-indicator {
    display: inline-block;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.item-type-indicator.letter {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.item-type-indicator.number {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.signal-indicator {
    display: none;
    padding: 10px 25px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.5rem;
    margin: 15px auto;
    max-width: 300px;
    transition: all 0.3s ease;
}

.signal-indicator.show {
    display: block;
    animation: fadeInUp 0.4s ease;
}

.signal-indicator.start {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-color);
    border: 2px dashed var(--primary-color);
}

.signal-indicator.number {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
    border: 2px solid var(--success-color);
}

.signal-indicator.end {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
    border: 2px dashed var(--warning-color);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.question-display {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 20px;
    min-height: 60px;
}

.question-display.error {
    color: var(--primary-red);
}

.question-display.success {
    color: var(--primary-green);
}

/* Scout Container */
.scout-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    padding: 10px;
    background: #ffffff;
    border-radius: 12px;
    min-height: 380px;
    position: relative;
}

.scout-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scout-image {
    max-height: 350px;
    width: auto;
    display: block;
}

.scout-svg {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    filter: drop-shadow(2px 4px 6px rgba(0, 0, 0, 0.2));
    pointer-events: none;
}

/* Flag Legend */
.flag-legend {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 15px;
}

.flag-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.flag-sample {
    width: 30px;
    height: 20px;
    border-radius: 4px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.flag-sample.orange {
    background: var(--primary-orange);
}

.flag-sample.red {
    background: var(--primary-red);
}

/* Input */
.practice-input {
    margin-bottom: 20px;
}

.wide-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 1.5rem;
    text-align: center;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    outline: none;
    transition: all var(--transition-speed);
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
}

.wide-input:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.2);
}

.wide-input:disabled {
    background: var(--background-light);
    cursor: not-allowed;
}

.input-hint {
    text-align: center;
    margin-top: 10px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Buttons */
.controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--primary-green-light) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(46, 125, 50, 0.4);
}

.btn-secondary {
    background: var(--background-light);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

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

.btn-danger {
    background: linear-gradient(135deg, var(--primary-red) 0%, var(--primary-red-light) 100%);
    color: white;
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

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

/* Results */
.practice-result {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.practice-result.show {
    display: block;
    animation: slideIn 0.3s ease;
}

.practice-result.correct {
    background: rgba(46, 125, 50, 0.1);
    color: var(--primary-green);
    border: 1px solid var(--primary-green);
}

.practice-result.incorrect {
    background: rgba(211, 47, 47, 0.1);
    color: var(--primary-red);
    border: 1px solid var(--primary-red);
}

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

/* Feedback Message */
.feedback-message {
    text-align: center;
    padding: 15px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.feedback-message.show {
    display: block;
    animation: pulse 0.5s ease;
}

.feedback-message.hint {
    background: rgba(255, 107, 53, 0.1);
    color: var(--primary-orange);
    border: 1px solid var(--primary-orange);
}

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

/* Stats Sidebar */
.stats-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    background: var(--background-light);
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-top: 5px;
}

.session-stats {
    background: var(--background-light);
    padding: 15px;
    border-radius: 8px;
}

.session-stats h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.session-progress {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.session-progress:last-child {
    border-bottom: none;
}

.stats-controls {
    margin-top: 20px;
    text-align: center;
}

/* Reference Section */
.reference-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    outline: none;
    transition: all var(--transition-speed);
}

.search-input:focus {
    border-color: var(--primary-green);
}

.reference-section {
    margin-bottom: 30px;
}

.reference-section h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border-color);
}

.semaphore-char-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
}

.semaphore-char-item {
    background: var(--background-light);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: all var(--transition-speed);
    border: 2px solid transparent;
}

.semaphore-char-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px var(--shadow-color);
}

.semaphore-char-item.learned {
    border-color: var(--primary-green);
    background: rgba(46, 125, 50, 0.1);
}

.semaphore-char-item.learned::after {
    content: '✓';
    display: block;
    color: var(--primary-green);
    font-weight: bold;
    margin-top: 5px;
}

.semaphore-char-display {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 8px;
}

.semaphore-position-display {
    display: flex;
    justify-content: center;
    gap: 5px;
    font-size: 0.75rem;
}

.semaphore-position-display span {
    padding: 4px 6px;
    border-radius: 4px;
    font-weight: 500;
}

.semaphore-position-display .right-arm {
    background: var(--primary-orange);
    color: white;
}

.semaphore-position-display .left-arm {
    background: var(--primary-red);
    color: white;
}

/* Mini Scout in Reference */
.mini-scout {
    width: 80px;
    height: 100px;
    margin: 10px auto;
}

.reference-note {
    background: rgba(255, 107, 53, 0.1);
    padding: 20px;
    border-radius: 8px;
    margin-top: 30px;
    border-left: 4px solid var(--primary-orange);
}

.reference-note p {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.reference-note p:last-child {
    margin-bottom: 0;
}

/* GIF Reference */
.gif-reference {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid var(--border-color);
}

.gif-reference h3 {
    color: var(--primary-green);
    margin-bottom: 20px;
    text-align: center;
}

.gif-container {
    text-align: center;
    background: var(--background-light);
    padding: 20px;
    border-radius: 12px;
}

.semaphore-gif {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px var(--shadow-color);
}

/* Settings Section */
.setting-group {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
}

.setting-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.setting-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.setting-group input[type="range"] {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-color);
    outline: none;
    -webkit-appearance: none;
}

.setting-group input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-green);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.setting-group input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.setting-group span {
    display: inline-block;
    margin-top: 8px;
    font-weight: 500;
    color: var(--primary-green);
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.radio-label,
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    transition: all var(--transition-speed);
}

.radio-label:hover,
.checkbox-label:hover {
    background: var(--background-light);
}

.radio-label input,
.checkbox-label input {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary-green);
}

.setting-group button {
    margin-right: 10px;
    margin-top: 10px;
}

/* Local Storage Note */
div[style*="text-align: center"] {
    padding: 20px;
    color: var(--text-light);
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }
    
    .container {
        border-radius: 12px;
    }
    
    header {
        padding: 20px;
    }
    
    .header-content {
        flex-direction: column;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .tabs {
        flex-wrap: wrap;
    }
    
    .tab-btn {
        flex: 1 1 50%;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-value {
        font-size: 1.5rem;
    }
    
    .question-display {
        font-size: 2rem;
    }
    
    .scout-container {
        min-height: 280px;
    }
    
    .scout-svg {
        width: 150px;
        height: 225px;
    }
    
    .controls {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .reference-controls {
        flex-direction: column;
    }
    
    .semaphore-char-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }
}

/* Print Styles */
@media print {
    body {
        background: white;
    }
    
    .container {
        box-shadow: none;
    }
    
    .tabs,
    .controls,
    .language-selector,
    .stats-sidebar,
    .setting-group {
        display: none;
    }
    
    .tab-content {
        display: block !important;
    }
}


.stats-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stats-logo {
    display: flex;
    justify-content: flex-end;   /* rechts */
    align-items: flex-end;       /* onder */
    margin-top: 20px;
}

.stats-logo img {
    max-width: 220px;            /* pas aan naar smaak */
    opacity: 0.9;                /* optioneel */
}