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

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', 'Droid Sans Mono', 'Source Code Pro', monospace;
}

/* Simple frame with black borders */
.ipad-frame {
    width: min(90vw, calc(90vh * 1.33));
    height: min(calc(90vw / 1.33), 90vh);
    background: #000000;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: #ffffff;
    display: flex;
}

/* Sidebar */
.sidebar {
    width: 64px;
    height: 100%;
    background: #1c1c1c;
    flex-shrink: 0;
}

/* Main content area (everything except sidebar) */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Content area containing the map and info panel */
.content-area {
    flex: 1;
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Information Panel (floating card on the left) */
.info-panel {
    width: 33%;
    height: 100%;
    background: rgb(18, 18, 18);
    flex-shrink: 0;
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    transition: height 0.3s ease;
    z-index: 500;
    overflow: hidden;
}

.info-panel.collapsed {
    height: 56px;
}

/* Info Panel Content */
.info-content {
    padding: 56px 20px 20px 20px;
    color: #ffffff;
    overflow-y: auto;
    height: 100%;
}

.flight-header {
    margin-bottom: 24px;
}

.flight-number {
    font-size: 24px;
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.flight-status {
    font-size: 12px;
    color: #B4E03C;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.route-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.city-info {
    flex: 1;
}

.city-code {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.city-name {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.route-arrow {
    font-size: 20px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0 12px;
}

.flight-progress {
    margin-bottom: 24px;
}

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

.progress-fill {
    height: 100%;
    background: #ffffff;
    width: 0%;
    transition: width 0.1s linear;
}

.progress-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.6);
    text-align: right;
}

.flight-details,
.aircraft-info {
    margin-bottom: 24px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.detail-value {
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
}

/* Notifications Section */
.notifications-section {
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.notification-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.notification-card.hidden {
    display: none;
}

.notification-card:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.notification-card:active {
    transform: scale(0.98);
}

.notification-indicator {
    flex-shrink: 0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #B4E03C;
    border-radius: 50%;
    position: relative;
    animation: dot-pulse 2s ease-in-out infinite;
}

@keyframes dot-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(180, 224, 60, 0.7);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(180, 224, 60, 0);
    }
}

.notification-content {
    flex: 1;
    min-width: 0;
}

.notification-title {
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 6px;
}

.notification-details {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.detail-badge {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 3px;
}

/* Bottom Panel */
.bottom-panel {
    width: 100%;
    background: rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
    transition: height 0.3s ease;
    overflow: hidden;
    position: relative;
}

.bottom-panel.collapsed {
    height: 40px;
}

.bottom-panel.expanded {
    height: 300px;
}

/* Toggle buttons */
.toggle-btn {
    position: absolute;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.2s ease;
    z-index: 100;
}

.toggle-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

#toggleInfoPanel {
    top: 10px;
    right: 10px;
}

#toggleBottomPanel {
    top: 4px;
    right: 10px;
}

/* Lock to landscape orientation */
@media screen and (orientation: portrait) {
    body::before {
        content: "Please rotate your device to landscape";
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: #000000;
        color: #ffffff;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10000;
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        font-size: 18px;
    }

    .ipad-frame {
        display: none;
    }
}

#map {
    flex: 1;
    height: 100%;
    min-width: 0;
}

/* Hide Leaflet attribution in minimal design */
.leaflet-control-attribution,
.leaflet-control-container {
    display: none;
}

/* Play/Pause button */
.play-pause-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    z-index: 1000;
}

.play-pause-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

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

/* Airplane icon */
.airplane-icon {
    background: transparent !important;
    border: none !important;
    transition: transform 0.1s linear;
    z-index: 1000 !important;
}

.airplane-icon svg {
    display: block;
    pointer-events: none;
}

/* Ensure Leaflet markers are visible */
.leaflet-marker-icon {
    z-index: 1000 !important;
}

/* Waypoint pulse animation */
@keyframes waypoint-pulse {
    0%, 100% {
        filter: drop-shadow(0 0 0 rgba(180, 224, 60, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 12px rgba(180, 224, 60, 0.6));
    }
}

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

.waypoint-marker.disabled {
    animation: none !important;
    opacity: 0.3;
}

/* Waypoint Popover */
.waypoint-popover {
    position: absolute;
    width: 320px;
    background: rgb(18, 18, 18);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    z-index: 2000;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.8);
    pointer-events: auto;
}

.popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.popover-title {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
    margin: 0;
}

.popover-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.popover-close:hover {
    color: #ffffff;
}

.popover-content {
    padding: 20px;
}

.optimization-suggestion {
    margin-bottom: 20px;
}

.suggestion-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.parameter-changes {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 12px;
}

.parameter-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.parameter-row:not(:last-child) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.param-name {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.param-change {
    font-size: 14px;
    font-weight: 600;
    color: #B4E03C;
    font-variant-numeric: tabular-nums;
}

.optimization-benefits {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.benefit-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.benefit-label {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.7);
}

.benefit-value {
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
}

.popover-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.action-btn {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.reject-btn {
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.7);
}

.reject-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    color: #ffffff;
}

.accept-btn {
    background: rgba(180, 224, 60, 0.1);
    color: #B4E03C;
    border-color: rgba(180, 224, 60, 0.3);
}

.accept-btn:hover {
    background: rgba(180, 224, 60, 0.15);
    border-color: rgba(180, 224, 60, 0.5);
}

.action-btn:active {
    transform: scale(0.98);
}
