* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: 'Courier New', monospace;
    background: #0a0a0a;
    color: #0f0;
    overflow: hidden;
}
.container {
    display: flex;
    height: 100vh;
}
.left-panel {
    width: 40%;
    padding: 20px;
    overflow: hidden;
    background: #0a0a0a;
    display: flex;
    flex-direction: column;
    height: 100vh;
}
.right-panel {
    width: 60%;
    padding: 20px;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
}
.search-box {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 12px;
    border: 1px solid #0f0;
    flex-shrink: 0;
}
.search-box form {
    display: flex;
    align-items: stretch;
    gap: 5px;
}
.search-box input {
    width: 150px;
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #0f0;
    border-radius: 2px;
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
}
.search-box button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #0f0;
    border-radius: 2px;
    background: #000;
    color: #0f0;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}
.search-box button:hover {
    background: #0f0;
    color: #000;
}
.nearest-button {
    padding: 6px 12px;
    font-size: 14px;
    border: 1px solid #0ff;
    border-radius: 2px;
    background: #000;
    color: #0ff;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}
.nearest-button:hover {
    background: #0ff;
    color: #000;
}
.card {
    background: #1a1a1a;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #0f0;
    margin-bottom: 12px;
    flex-shrink: 0;
}
.card h2 {
    margin-top: 0;
    font-size: 16px;
    border-bottom: 1px solid #0f0;
    padding-bottom: 6px;
    margin-bottom: 8px;
}
.card p {
    margin: 4px 0;
    font-size: 13px;
}
.data-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 10px;
}
.data-grid p {
    margin: 3px 0;
}
.highlight {
    color: #f00;
}
.searched {
    color: #0ff;
}
.not-found {
    background: #1a0000;
    border: 1px solid #f00;
}
.special-table {
    background: #1a1a1a;
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #0f0;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}
.special-table h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    border-bottom: 1px solid #0f0;
    padding-bottom: 4px;
}
.category-header {
    font-size: 12px;
    font-weight: bold;
    color: #0f0;
    padding: 4px 4px 2px 4px;
    background: #000;
    border-bottom: 1px solid #0f0;
}
.table-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.special-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}
.special-table th {
    text-align: left;
    padding: 3px 4px;
    border-bottom: 1px solid #0f0;
    font-weight: bold;
    background: #1a1a1a;
}
.special-table td {
    padding: 3px 4px;
    border-bottom: 1px solid rgba(0, 255, 0, 0.2);
}
.special-table tr:last-child td {
    border-bottom: none;
}
.status-airborne {
    color: #0f0;
    font-weight: bold;
}
.status-grounded {
    color: #666;
}
.special-table tr:hover {
    background: rgba(0, 255, 0, 0.05);
}
.clickable-row {
    cursor: pointer;
}
.route {
    background: #000;
    padding: 8px;
    border-radius: 2px;
    margin: 8px 0;
    border: 1px solid #0f0;
}
.route p {
    margin: 4px 0;
    font-size: 13px;
}
.route-label {
    color: #0f0;
    opacity: 0.7;
    font-size: 12px;
}
.radar-container {
    position: relative;
    width: 80%;
    max-width: none;
    margin-top: 0;
}
#radar-canvas {
    border: 2px solid #0f0;
    background: #000;
    box-shadow: 0 0 20px rgba(0, 255, 0, 0.3);
    width: 100%;
    aspect-ratio: 1 / 1;
    display: block;
}
.radar-info {
    margin-top: 15px;
    color: #0f0;
    font-size: 14px;
    text-align: center;
}
.radar-controls {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    z-index: 10;
}
.radar-zoom-btn {
    width: 30px;
    height: 30px;
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.radar-zoom-btn:hover {
    background: #0f0;
    color: #000;
}
.radar-zoom-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}
.radar-zoom-btn:disabled:hover {
    background: #000;
    color: #0f0;
}
.radar-range-display {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    color: #0f0;
    padding: 5px 10px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    display: flex;
    align-items: center;
}
.radar-toggles {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
    z-index: 10;
}
.toggle-btn {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    color: #0f0;
    padding: 5px 10px;
    font-size: 10px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
}
.toggle-btn:hover {
    background: #0f0;
    color: #000;
}
.toggle-btn.active {
    background: #0f0;
    color: #000;
}
.tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 8px;
}
.tab-btn {
    padding: 6px 12px;
    font-size: 11px;
    border: 1px solid #0f0;
    border-radius: 2px 2px 0 0;
    background: #000;
    color: #0f0;
    cursor: pointer;
    font-family: 'Courier New', monospace;
}
.tab-btn:hover {
    background: rgba(0, 255, 0, 0.1);
}
.tab-btn.active {
    background: #0f0;
    color: #000;
    font-weight: bold;
}
.tab-content {
    display: none;
}
.tab-content.active {
    display: block;
}
.settings-btn {
    position: fixed;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid #0f0;
    border-radius: 4px;
    color: #0f0;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.settings-btn:hover {
    background: #0f0;
    color: #000;
}
.settings-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.settings-modal.active {
    display: flex;
}
.settings-content {
    background: #1a1a1a;
    border: 2px solid #0f0;
    border-radius: 8px;
    padding: 20px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}
.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #0f0;
}
.settings-header h2 {
    margin: 0;
    font-size: 16px;
}
.settings-close {
    background: none;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 20px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.settings-close:hover {
    background: #0f0;
    color: #000;
}
.settings-section {
    margin-bottom: 20px;
}
.settings-section h3 {
    font-size: 13px;
    margin-bottom: 10px;
    color: #0f0;
}
.settings-option {
    display: flex;
    align-items: center;
    padding: 8px;
    margin-bottom: 5px;
    background: rgba(0, 255, 0, 0.05);
    border-radius: 4px;
}
.settings-option:hover {
    background: rgba(0, 255, 0, 0.1);
}
.settings-option input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}
.settings-option label {
    cursor: pointer;
    flex: 1;
    font-size: 11px;
}
.settings-range {
    display: flex;
    align-items: center;
    gap: 10px;
}
.settings-range input[type="range"] {
    flex: 1;
}
.settings-range span {
    min-width: 40px;
    font-size: 12px;
    font-weight: bold;
}
.settings-btn-primary {
    width: 100%;
    padding: 10px;
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 12px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 4px;
    margin-top: 10px;
}
.settings-btn-primary:hover {
    background: #0f0;
    color: #000;
}
.settings-btn-primary.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}
.settings-btn-primary.enabled {
    background: #0f0;
    color: #000;
}
.settings-btn-secondary {
    padding: 6px 12px;
    background: #000;
    border: 1px solid #0f0;
    color: #0f0;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    cursor: pointer;
    border-radius: 4px;
}
.settings-btn-secondary:hover {
    background: #0f0;
    color: #000;
}
.custom-aircraft-list {
    max-height: 150px;
    overflow-y: auto;
    margin-bottom: 10px;
}
.custom-aircraft-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 8px;
    margin-bottom: 4px;
    background: rgba(0, 255, 0, 0.05);
    border: 1px solid rgba(0, 255, 0, 0.2);
    border-radius: 4px;
    font-size: 11px;
}
.custom-aircraft-item:hover {
    background: rgba(0, 255, 0, 0.1);
}
.custom-aircraft-reg {
    font-weight: bold;
    color: #0ff;
}
.custom-aircraft-remove {
    background: none;
    border: 1px solid #f00;
    color: #f00;
    font-size: 10px;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 2px;
}
.custom-aircraft-remove:hover {
    background: #f00;
    color: #000;
}
.custom-aircraft-add {
    display: flex;
    gap: 5px;
    align-items: stretch;
}
.custom-aircraft-input {
    flex: 1;
    padding: 6px 8px;
    font-size: 11px;
    border: 1px solid #0f0;
    border-radius: 4px;
    background: #000;
    color: #0f0;
    font-family: 'Courier New', monospace;
}
.custom-aircraft-empty {
    text-align: center;
    padding: 10px;
    color: #666;
    font-size: 10px;
    font-style: italic;
}

/* ===================== */
/* MOBIELE LAYOUT */
/* ===================== */

@media (max-width: 768px) {
    body {
        overflow: auto;
        padding-top: env(safe-area-inset-top);
    }

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

    /* Radar bovenaan */
    .right-panel {
        width: 100%;
        order: 1;
        padding: 15px 10px 10px 10px;
        min-height: 50vh;
        max-height: 50vh;
    }

    /* Gegevens daaronder */
    .left-panel {
        width: 100%;
        order: 2;
        padding: 10px;
        height: auto;
        overflow: visible;
    }

    .radar-container {
        max-width: 100%;
        width: 100%;
        position: relative;
    }

    #radar-canvas {
        width: 100%;
        height: auto;
        max-height: 45vh;
        touch-action: none; /* Voorkom scrollen tijdens touch */
    }

    .radar-info {
        position: absolute;
        bottom: 15px;
        right: 10px;
        font-size: 10px;
        text-align: right;
        background: rgba(0, 0, 0, 0.7);
        padding: 3px 6px;
        border-radius: 3px;
        margin: 0;
    }

    /* Zoom knoppen groter voor touch */
    .radar-zoom-btn {
        width: 40px;
        height: 40px;
        font-size: 22px;
    }

    .radar-range-display {
        padding: 6px 10px;
        font-size: 10px;
    }

    /* Toggle buttons aangepast */
    .toggle-btn {
        padding: 6px 12px;
        font-size: 9px;
    }

    /* Search box compacter */
    .search-box {
        margin-bottom: 8px;
        padding: 8px;
    }

    .search-box form {
        flex-wrap: wrap;
    }

    .search-box input {
        width: 100%;
        margin-bottom: 5px;
    }

    .search-box button,
    .nearest-button {
        flex: 1;
        font-size: 11px;
        padding: 8px 10px;
    }

    /* Card compacter */
    .card {
        padding: 8px;
        margin-bottom: 8px;
    }

    .card h2 {
        font-size: 13px;
    }

    .card p {
        font-size: 10px;
    }

    .data-grid {
        gap: 3px 8px;
    }

    /* Special aircraft table */
    .special-table {
        padding: 6px;
        max-height: none;
        margin-bottom: 60px; /* Ruimte voor settings button */
    }

    .special-table h3 {
        font-size: 11px;
    }

    .special-table table {
        font-size: 8px;
    }

    .special-table th,
    .special-table td {
        padding: 2px 3px;
    }

    .category-header {
        font-size: 9px;
        padding: 3px;
    }

    /* Table container op mobiel onder elkaar */
    .table-container {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    /* Militaire tabel op mobiel */
    #military-aircraft-table {
        font-size: 8px;
    }

    #military-aircraft-table th,
    #military-aircraft-table td {
        padding: 2px 3px;
    }

    /* Tabs */
    .tabs {
        gap: 3px;
        margin-bottom: 6px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 10px;
        flex: 1;
    }

    /* Settings button */
    .settings-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
        bottom: 10px;
        top: auto;
    }

    /* Settings modal */
    .settings-content {
        width: 95%;
        max-height: 85vh;
        padding: 15px;
    }

    .settings-header h2 {
        font-size: 14px;
    }

    .settings-section h3 {
        font-size: 12px;
    }

    .settings-option label {
        font-size: 10px;
    }

    .custom-aircraft-input {
        font-size: 10px;
    }

    .settings-btn-secondary {
        font-size: 10px;
        padding: 6px 10px;
    }

    /* Route display */
    .route {
        padding: 6px;
        margin: 6px 0;
    }

    .route p {
        font-size: 10px;
    }

    .route-label {
        font-size: 9px;
    }
}

/* Extra kleine schermen */
@media (max-width: 480px) {
    .right-panel {
        min-height: 45vh;
        max-height: 45vh;
    }

    .search-box input {
        font-size: 11px;
    }

    .card h2 {
        font-size: 12px;
    }

    .card p,
    .data-grid p {
        font-size: 9px;
    }

    .special-table table {
        font-size: 7px;
    }

    .tab-btn {
        font-size: 9px;
        padding: 5px 8px;
    }
}
