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

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --success-color: #16a34a;
    --danger-color: #dc2626;
    --warning-color: #ea580c;
    --bg-color: #f1f5f9;
    --card-bg: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --border-radius: 12px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    padding: 0;
    margin: 0;
    height: 100vh;
    overflow: hidden;
}

/* Fullscreen Map */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Bottom Controls Sheet */
#controls-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: white;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 70vh;
    display: flex;
    flex-direction: column;
}

#controls-container.minimized {
    max-height: 60px;
}

.controls-handle {
    padding: 12px 20px;
    cursor: pointer;
    user-select: none;
    border-bottom: 1px solid #e2e8f0;
    background: linear-gradient(135deg, var(--primary-color) 0%, #7c3aed 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.handle-bar {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 2px;
}

.handle-title {
    font-weight: 600;
    font-size: 14px;
}

.controls-content {
    overflow-y: auto;
    padding: 16px;
    max-height: calc(70vh - 60px);
}

#controls-container.minimized .controls-content {
    display: none;
}

@media (min-width: 1100px) {
    #map {
        position: fixed;
        width: 65%;
        height: 100%;
    }
    
    #controls-container {
        position: fixed;
        left: 65%;
        width: 35%;
        top: 0;
        bottom: 0;
        max-height: 100vh;
        border-radius: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
    }
    
    .controls-handle {
        display: none;
    }
    
    .controls-content {
        max-height: none;
        padding: 20px;
        overflow-y: visible;
    }
}

.card {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    padding: 16px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    border: 1px solid #e2e8f0;
}

.card:last-child {
    margin-bottom: 0;
}

.card.location-confirmed {
    background-color: #f0fdf4;
    border: 1px solid #86efac;
    padding: 12px 16px;
}

.card.location-confirmed h2 {
    font-size: 14px;
    margin-bottom: 8px;
    color: var(--success-color);
}

.card.location-confirmed .status-indicator {
    padding: 8px;
    margin-bottom: 0;
}

.location-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    background-color: white;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 13px;
}

.location-detail-item:last-child {
    margin-bottom: 0;
}

.detail-icon {
    font-size: 18px;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.detail-value {
    color: var(--text-primary);
    font-weight: 600;
    font-family: 'Courier New', monospace;
    flex: 1;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.btn-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.btn-icon:active {
    transform: scale(0.95);
}



/* Map Legend */
.map-legend {
    background: white;
    padding: 12px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    font-size: 13px;
    line-height: 1.8;
}

.legend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.legend-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.legend-toggle {
    font-size: 12px;
    color: var(--text-secondary);
    transition: transform 0.2s ease;
}

.map-legend.legend-collapsed .legend-toggle {
    transform: rotate(0deg);
}

.legend-content {
    margin-top: 8px;
    transition: opacity 0.2s ease;
    display: flex;
    flex-direction: column;
}

.legend-content.hidden {
    display: none;
}

.map-legend div {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 6px;
}

.legend-circle,
.legend-line,
.legend-marker {
    display: inline-block;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    margin-right: 8px;
    border: 2px solid rgba(0, 0, 0, 0.2);
}

.legend-line {
    border-radius: 2px;
    height: 3px;
}

/* Legend checkbox styling */
.legend-item-with-checkbox {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
}

.legend-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    user-select: none;
    margin-left: auto;
}

.legend-checkbox input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    margin: 0;
}

.checkbox-label {
    font-size: 11px;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* Neighborhood Labels */
.neighborhood-label {
    background: transparent;
    border: none;
}

.neighborhood-label-text {
    font-size: 12px;
    font-weight: 700;
    color: #1e40af;
    text-align: center;
    white-space: nowrap;
    text-shadow: 2px 2px 3px white, -2px -2px 3px white, 2px -2px 3px white, -2px 2px 3px white,
                 0 0 3px white, 0 0 5px white;
    pointer-events: none;
    padding: 2px 6px;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.card h2 {
    font-size: 20px;
    margin-bottom: 16px;
    color: var(--primary-color);
}

.card h3 {
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.hidden {
    display: none !important;
}

/* Input Groups */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
    font-size: 14px;
}

.input-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    margin-bottom: 8px;
    transition: border-color 0.2s;
}

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

.input-group select,
.form-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s;
}

.input-group select:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Buttons */
.btn {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 8px;
}

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

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

.btn-primary:active {
    transform: translateY(0);
}

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

.btn-secondary:hover {
    background-color: #475569;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #15803d;
}

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

.info-text {
    background-color: #dbeafe;
    border-left: 4px solid var(--primary-color);
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.5;
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.status-icon {
    font-size: 24px;
    margin-right: 12px;
}

.status-text {
    font-weight: 500;
    color: var(--text-secondary);
}

.status-indicator.valid {
    background-color: #dcfce7;
    border: 2px solid var(--success-color);
}

.status-indicator.valid .status-text {
    color: var(--success-color);
}

.status-indicator.invalid {
    background-color: #fee2e2;
    border: 2px solid var(--danger-color);
}

.status-indicator.invalid .status-text {
    color: var(--danger-color);
}

/* Result Box */
.result-box {
    margin-top: 16px;
    padding: 16px;
    border-radius: 8px;
    background-color: #f8fafc;
}

.result-box.valid {
    background-color: #dcfce7;
    border: 2px solid var(--success-color);
}

.result-box.invalid {
    background-color: #fee2e2;
    border: 2px solid var(--danger-color);
}

.result-box h3 {
    margin-bottom: 12px;
    font-size: 18px;
}

/* Checklist Section */
.checklist-intro {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 16px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.checklist-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--secondary-color);
    cursor: pointer;
    transition: all 0.2s ease;
}

.checklist-item:hover {
    background-color: #f1f5f9;
    transform: translateX(4px);
}

.checklist-item.completed {
    background-color: #dcfce7;
    border-left-color: var(--success-color);
}

.checklist-checkbox {
    width: 24px;
    height: 24px;
    border: 2px solid var(--secondary-color);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checklist-item.completed .checklist-checkbox {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.checklist-checkbox::after {
    content: '✓';
    color: white;
    font-size: 16px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.checklist-item.completed .checklist-checkbox::after {
    opacity: 1;
}

.checklist-text {
    flex: 1;
    font-size: 16px;
    color: var(--text-primary);
}

.checklist-item.completed .checklist-text {
    color: var(--success-color);
}

/* Questions List */
.questions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-item {
    padding: 12px;
    background-color: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.question-item strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.question-item span {
    color: var(--text-secondary);
}

/* Distance Calculator */
.distance-calculator {
    margin-top: 24px;
    padding: 20px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-radius: var(--border-radius);
    border: 2px solid #0ea5e9;
}

.distance-calculator h3 {
    margin: 0 0 8px 0;
    color: #0369a1;
    font-size: 1.1rem;
}

.calculator-help {
    font-size: 0.9rem;
    color: #0c4a6e;
    margin-bottom: 16px;
}

.calculator-section {
    margin: 16px 0;
}

.calculator-section label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.coords-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Courier New', monospace;
    margin-bottom: 8px;
}

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

.location-display {
    margin-top: 12px;
    padding: 12px;
    background: white;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.location-coords {
    font-family: 'Courier New', monospace;
    font-size: 0.95rem;
    color: var(--text-primary);
    font-weight: 600;
    flex: 1;
}

.distance-result {
    margin-top: 12px;
    padding: 16px;
    background: white;
    border-radius: 8px;
    border-left: 4px solid #16a34a;
}

.distance-result.far {
    border-left-color: #dc2626;
}

.distance-result strong {
    display: block;
    font-size: 1.2rem;
    color: #16a34a;
    margin-bottom: 4px;
}

.distance-result.far strong {
    color: #dc2626;
}

.distance-result p {
    margin: 4px 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.calculator-divider {
    text-align: center;
    color: #64748b;
    font-weight: 600;
    margin: 20px 0;
    position: relative;
}

.calculator-divider::before,
.calculator-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 40%;
    height: 1px;
    background: #cbd5e1;
}

.calculator-divider::before {
    left: 0;
}

.calculator-divider::after {
    right: 0;
}

/* Game Card */
.card-counter {
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.game-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 12px;
    min-height: 200px;
    margin-bottom: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    position: relative;
}

/* Phase Badge */
.phase-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.phase-badge.phase-1 {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
    color: white;
}

.phase-badge.phase-2 {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
    color: white;
}

.phase-badge.phase-3 {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.card-task {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 16px;
    padding-right: 80px; /* Ruimte voor phase badge */
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.card-question {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 16px;
}

/* Card Answer Section */
.card-answer-section {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 2px solid rgba(255, 255, 255, 0.3);
}

.answer-label {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
    opacity: 0.9;
}

.answer-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.answer-hint {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 8px;
    margin-bottom: 0;
    font-style: italic;
}

.btn-answer {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.btn-answer:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

.btn-answer:active {
    transform: translateY(0);
}

.poi-select {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--primary-color);
    border: 2px solid rgba(37, 99, 235, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-right: 8px;
    margin-bottom: 8px;
    min-width: 200px;
}

.poi-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.answer-received {
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    border-radius: 8px;
    border: 2px solid var(--success-color);
}

.answer-received .answer-label {
    color: var(--success-color);
    margin-bottom: 8px;
    font-size: 13px;
}

.answer-value {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.btn-change-answer {
    padding: 8px 12px;
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--secondary-color);
    border-radius: 6px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-change-answer:hover {
    background: var(--secondary-color);
    color: white;
}

.card-actions {
    display: flex;
    gap: 12px;
}

.card-actions .btn {
    margin-bottom: 0;
}

/* View Toggle */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    background: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
}

.btn-toggle {
    flex: 1;
    padding: 8px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-toggle.active {
    background: white;
    color: var(--primary-color);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Flop View */
#flop-view {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.btn-undo {
    width: 100%;
    background: #fff7ed;
    color: #9a3412;
    border: 1.5px solid #fed7aa;
    border-radius: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    text-align: left;
    margin-bottom: 8px;
    cursor: pointer;
    transition: background 0.15s;
}

.btn-undo:hover {
    background: #ffedd5;
}

.flop-stats {
    display: flex;
    justify-content: space-around;
    gap: 12px;
    padding: 12px;
    background: #f1f5f9;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.flop-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.flop-stats .clickable {
    cursor: pointer;
    transition: all 0.2s;
    padding: 4px 8px;
    border-radius: 4px;
}

.flop-stats .clickable:hover {
    background: white;
    transform: scale(1.05);
}

.flop-phase-section {
    margin-bottom: 16px;
}

.phase-header {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    padding: 8px 12px;
    border-radius: 8px;
    color: white;
}

.phase-1-header {
    background: linear-gradient(135deg, #84cc16 0%, #65a30d 100%);
}

.phase-2-header {
    background: linear-gradient(135deg, #eab308 0%, #ca8a04 100%);
}

.phase-3-header {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
}

.flop-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 640px) {
    .flop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .flop-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1600px) {
    .flop-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.flop-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    position: relative;
}

.flop-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.2);
}

.flop-card .card-task {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
}

.flop-card .card-question {
    font-size: 12px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.answer-indicator {
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 4px;
    margin-bottom: 8px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.15);
}

.flop-card-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.btn-flop-discard {
    flex: 1;
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.9);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-flop-discard:hover {
    background: #dc2626;
}

.btn-flop-discard-small {
    padding: 8px 12px;
    background: rgba(239, 68, 68, 0.8);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.btn-flop-discard-small:hover {
    background: #dc2626;
}

.btn-flop-view {
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 6px;
    color: white;
    font-size: 11px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-flop-view:hover {
    background: rgba(255, 255, 255, 0.3);
}

.btn-flop-view-primary {
    flex: 1;
    padding: 8px 12px;
    background: rgba(37, 99, 235, 0.9);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-flop-view-primary:hover {
    background: #2563eb;
}

.btn-flop-edit {
    padding: 8px 12px;
    background: rgba(234, 179, 8, 0.9);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 40px;
}

.btn-flop-edit:hover {
    background: #ca8a04;
}

/* Discarded Cards View */
.discarded-card {
    opacity: 0.95;
}

.no-cards {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
    font-style: italic;
}

/* Completed Cards Section */
.completed-cards-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.no-cards-message {
    text-align: center;
    color: var(--text-secondary);
    font-style: italic;
    padding: 20px;
    margin: 0;
}

.completed-card {
    background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    color: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.completed-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 12px;
}

.completed-card .phase-badge {
    position: static;
    flex-shrink: 0;
}

.completed-card .card-task {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    border: none;
    padding: 0;
}

.completed-card .card-question {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
}

.completed-card-answer {
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    font-size: 13px;
    margin-top: 8px;
}

.completed-card-answer strong {
    font-weight: 700;
}

/* Info Section */
.info-section p {
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text-secondary);
}

.info-section strong {
    color: var(--text-primary);
}

#current-seed {
    font-family: 'Courier New', monospace;
    background-color: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--primary-color);
    font-weight: 600;
}

/* Mobile optimizations */
.btn {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Live Locatie Tracking */
@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.5); }
    70% { box-shadow: 0 0 0 10px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

.live-location-dot {
    animation: pulse-blue 2s infinite;
}

.live-tracking-btn {
    position: fixed;
    bottom: 90px;
    right: 12px;
    z-index: 1000;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    width: auto;
}

.live-tracking-btn:hover {
    border-color: #2563eb;
}

.live-tracking-btn.live-tracking-active {
    background: #eff6ff;
    border-color: #2563eb;
    color: #2563eb;
}

@media (min-width: 1100px) {
    .live-tracking-btn {
        bottom: 20px;
        right: calc(35% + 12px);
    }
}

/* Zone Lock Indicator */
.zone-lock-wrapper {
    position: fixed;
    bottom: 130px;
    right: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.map-overlay-btn {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    transition: all 0.2s;
    width: auto;
}

.zone-lock-btn.zone-lock-ok {
    border-color: #16a34a;
    color: #16a34a;
    background: #f0fdf4;
}

.zone-lock-btn.zone-lock-blocked {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
}

.zone-lock-btn.zone-lock-neutral {
    border-color: #e5e7eb;
    color: #64748b;
}

.zone-lock-tooltip {
    background: rgba(0,0,0,0.82);
    color: white;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    max-width: 220px;
    text-align: right;
    line-height: 1.4;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

@media (min-width: 1100px) {
    .zone-lock-wrapper {
        bottom: 60px;
        right: calc(35% + 12px);
    }
}

/* Spelregels Modal */
.game-rules-modal-content {
    max-width: 480px;
    width: 100%;
}

.game-rules-body {
    padding: 16px 20px 20px;
}

.game-rules-intro {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 16px;
}

.game-rules-locked-msg {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 16px;
}

.game-rule-locked {
    opacity: 0.5;
    pointer-events: none;
}

.game-rule-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 14px 0;
    border-top: 1px solid #e5e7eb;
}

.game-rule-info {
    flex: 1;
}

.game-rule-name {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 4px;
}

.game-rule-desc {
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
    margin-top: 2px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: #cbd5e1;
    border-radius: 26px;
    transition: 0.2s;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: white;
    border-radius: 50%;
    transition: 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: #16a34a;
}

.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(22px);
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    color: var(--text-primary);
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: var(--text-primary);
}

.modal-body {
    padding: 20px;
}

.modal-body .game-card {
    margin-bottom: 20px;
}

.modal-body .answer-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.map-legend {
    font-size: 11px;
    padding: 8px;
}

@media (min-width: 1024px) {
    .map-legend {
        font-size: 13px;
        padding: 12px;
    }
}

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

.card {
    animation: slideIn 0.3s ease-out;
}

/* Distance From Bike Input Section */
.distance-from-bike-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 16px 0;
    padding: 16px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 8px;
    border: 2px solid #0ea5e9;
}

.distance-from-bike-input label {
    font-weight: 600;
    color: #0c4a6e;
    margin-bottom: 4px;
}

.distance-from-bike-input .coords-input {
    padding: 12px;
    border: 2px solid #0ea5e9;
    border-radius: 8px;
    font-size: 16px;
    background: white;
}

.distance-from-bike-input .coords-input:focus {
    outline: none;
    border-color: #0284c7;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.distance-from-bike-input button {
    background: #0ea5e9;
    color: white;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.distance-from-bike-input button:hover {
    background: #0284c7;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(14, 165, 233, 0.3);
}

.distance-from-bike-input button:active {
    transform: translateY(0);
}

/* Rules Section */
.rules-section {
    text-align: center;
    padding: 12px 16px;
}

.btn-rules-toggle {
    width: 100%;
}

.rules-list {
    padding-left: 20px;
    margin: 0;
}

.rules-list li {
    padding: 10px 0;
    border-bottom: 1px solid #e5e7eb;
    font-size: 15px;
    line-height: 1.5;
    color: var(--text-primary);
}

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

.rules-list-optional {
    background: #f0f4ff;
    border-left: 3px solid var(--primary-color) !important;
    border-bottom: 1px solid #d1defe !important;
    padding-left: 6px !important;
    border-radius: 0 4px 4px 0;
    padding-right: 4px;
}

.rules-optional-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary-color);
    background: #dbeafe;
    border-radius: 4px;
    padding: 1px 6px;
    margin-right: 6px;
    vertical-align: middle;
    white-space: nowrap;
}

/* Card Link Button */
.card-link-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    text-decoration: none;
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    transition: background 0.2s;
    z-index: 1;
}

.card-link-btn:hover {
    background: rgba(255, 255, 255, 0.45);
}

.game-card.has-link .phase-badge {
    right: 48px;
}

/* ===== DEMO MODE ===== */
.demo-modal-content {
    max-width: 560px;
    width: 100%;
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.demo-modal-header {
    flex-shrink: 0;
}

.demo-modal-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
    padding: 0;
}

#demo-steps-container {
    flex: 1;
    overflow-y: auto;
    padding: 20px 20px 8px 20px;
}

.demo-step {
    display: none;
}

.demo-step.active {
    display: block;
}

.demo-step-icon {
    font-size: 40px;
    text-align: center;
    margin-bottom: 12px;
}

.demo-step-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 12px 0;
    text-align: center;
}

.demo-step p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 10px;
}

.demo-step ul,
.demo-step ol {
    color: var(--text-secondary);
    padding-left: 20px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.demo-step li {
    margin-bottom: 4px;
}

.demo-info-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    padding: 12px 14px;
    color: #1e40af;
    font-size: 14px;
    line-height: 1.6;
    margin-top: 10px;
}

.demo-info-box ul {
    color: #1e40af;
    margin: 6px 0 0 0;
    padding-left: 18px;
}

.demo-info-box code {
    background: rgba(30, 64, 175, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
}

.demo-phase-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 10px 0;
}

.demo-phase {
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 14px;
}

.demo-phase strong {
    font-size: 15px;
}

.demo-phase span {
    opacity: 0.85;
    line-height: 1.4;
}

.demo-phase-1 {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.demo-phase-2 {
    background: #fefce8;
    border: 1px solid #fde047;
    color: #854d0e;
}

.demo-phase-3 {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.demo-tips-list {
    list-style: none;
    padding: 0;
    margin: 0 0 20px 0;
}

.demo-tips-list li {
    padding: 8px 0;
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.5;
    color: var(--text-secondary);
}

.demo-tips-list li:last-child {
    border-bottom: none;
}

.demo-close-btn {
    width: 100% !important;
    margin-top: 8px;
    font-size: 16px;
    padding: 14px;
}

.demo-navigation {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px 16px 20px;
    border-top: 1px solid #e5e7eb;
    gap: 12px;
}

.demo-nav-btn {
    min-width: 110px;
    flex-shrink: 0;
    width: auto;
}

.demo-dots {
    display: flex;
    gap: 8px;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.demo-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #d1d5db;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    border: none;
    padding: 0;
    flex-shrink: 0;
}

.demo-dot.active {
    background: var(--primary-color);
    transform: scale(1.3);
}

.demo-dot:hover {
    background: #9ca3af;
}

.demo-dot.active:hover {
    background: var(--primary-color);
}
