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

:root {
    --bg-deck: #0c141d;
    --bg-panel: #0f1c28;
    --grid-line: rgba(255, 180, 64, 0.08);
    --accent: #f8b547; /* warm analog amber */
    --accent-2: #7cf4d2; /* minty auxiliary glow */
    --text-primary: #e8edf2;
    --text-muted: #9ba8b5;
    --border-strong: rgba(248, 181, 71, 0.35);
    --border-soft: rgba(124, 244, 210, 0.15);
    --shadow-strong: 0 18px 55px rgba(0, 0, 0, 0.55);
}

body {
    font-family: 'SFMono-Regular', 'JetBrains Mono', 'Menlo', 'Courier New', monospace;
    background:
        linear-gradient(180deg, rgba(12, 20, 29, 0.94) 0%, rgba(10, 16, 24, 0.96) 100%),
        radial-gradient(circle at 20% 20%, rgba(124, 244, 210, 0.07), transparent 35%),
        radial-gradient(circle at 80% 10%, rgba(248, 181, 71, 0.08), transparent 30%),
        linear-gradient(90deg, var(--grid-line) 1px, transparent 1px),
        linear-gradient(0deg, var(--grid-line) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 140px 140px, 140px 140px;
    min-height: 100vh;
    padding: 20px;
    color: var(--text-primary);
}

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

.language-selector {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: var(--text-primary);
    font-weight: 600;
}

.language-selector select {
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid var(--border-soft);
    background: rgba(15, 28, 40, 0.8);
    color: var(--text-primary);
    font-weight: 600;
}

header {
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(15, 28, 40, 0.9), rgba(10, 18, 28, 0.9));
    box-shadow: var(--shadow-strong);
}

header h1 {
    font-size: 2.3rem;
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    text-shadow: 0 0 12px rgba(248, 181, 71, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.subtitle {
    font-size: 1rem;
    opacity: 0.9;
    color: var(--text-muted);
}

.header-logo {
    width: 2.4rem;
    height: 2.4rem;
    display: inline-block;
}

.ad-panel {
    margin: 10px auto 18px;
    max-width: 900px;
    border: 1px solid var(--border-soft);
    border-radius: 12px;
    overflow: hidden;
    background: rgba(10, 18, 28, 0.85);
}

.ad-panel .adsbygoogle {
    min-height: 60px;
    max-height: 120px;
}

.calculator-card {
    background: var(--bg-panel);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 28px;
    box-shadow: var(--shadow-strong);
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}

.calculator-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(248, 181, 71, 0.05), rgba(124, 244, 210, 0.04));
    pointer-events: none;
}

.mode-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-soft);
    padding-bottom: 15px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
    letter-spacing: 0.05em;
}

.mode-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
    box-shadow: 0 6px 20px rgba(248, 181, 71, 0.15);
}

.mode-btn.active {
    background: transparent;
    color: var(--text-primary);
    border-color: transparent;
    border-bottom: 3px solid var(--accent);
    box-shadow: none;
}

.global-unit-selector {
    display: none;
}

.global-unit-selector label {
    font-weight: 600;
    color: #666;
    font-size: 0.95rem;
}

.global-unit-selector .unit-select {
    padding: 8px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.global-unit-selector .unit-select:hover {
    border-color: var(--accent);
}

.global-unit-selector .unit-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248, 181, 71, 0.12);
}

.input-section {
    margin-bottom: 20px;
}

.airport-input-group {
    margin-bottom: 20px;
}

.airport-input-group h3 {
    color: var(--accent);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.help-text {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.airport-input {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
}

.airport-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248, 181, 71, 0.12);
}

.airport-suggestions {
    margin-top: 10px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-muted);
    min-height: 30px;
    border: 1px dashed var(--border-soft);
}

.airport-info {
    margin-top: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
    color: var(--text-primary);
}

.airport-info h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.airport-list {
    list-style: none;
    padding: 0;
}

.airport-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.airport-code {
    font-weight: 700;
    color: #667eea;
    font-size: 1.1rem;
    min-width: 50px;
}

.airport-details {
    flex: 1;
}

.airport-name {
    font-weight: 600;
    color: #333;
    display: block;
}

.airport-location {
    font-size: 0.85rem;
    color: #666;
}

.route-segment {
    margin: 15px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border-left: 3px solid #667eea;
}

.route-segment-header {
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.route-distance {
    font-size: 0.95rem;
    color: #666;
}

.total-distance {
    margin-top: 15px;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    text-align: center;
}

.point-group {
    margin-bottom: 25px;
}

.point-group h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.input-group {
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 12px 40px 12px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-group .unit {
    position: absolute;
    right: 15px;
    top: 38px;
    color: #999;
    font-weight: 600;
}

.calculate-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    margin-top: 10px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
}

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

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.add-point-btn {
    width: 100%;
    padding: 12px;
    margin: 8px 0 4px;
    background: #f5f7ff;
    color: #667eea;
    border: 2px dashed #667eea;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-point-btn:hover {
    background: #eef2ff;
    transform: translateY(-1px);
}

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

.remove-point-btn,
.remove-waypoint-btn {
    margin-top: 12px;
    padding: 10px 12px;
    background: #fff5f5;
    color: #c0392b;
    border: 1px solid #f7c6c7;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.remove-point-btn:hover,
.remove-waypoint-btn:hover {
    background: #ffecec;
}

.intermediate-waypoints {
    margin-top: 15px;
}

.intermediate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.intermediate-waypoint-group {
    margin-top: 10px;
    padding: 12px;
    border: 1px solid #eaeaea;
    border-radius: 10px;
    background: #fafafa;
}

.results-section {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

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

.results-section h3 {
    color: #667eea;
    margin: 0;
    font-size: 1.3rem;
}

.unit-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.unit-selector label {
    font-size: 0.9rem;
    color: #555;
    font-weight: 600;
}

.unit-select {
    padding: 8px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #333;
}

.unit-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.unit-select:hover {
    border-color: #667eea;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.result-item {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-primary, #e8edf2);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.result-item.hidden {
    display: none;
}

.result-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-muted, #9ba8b5);
    margin-bottom: 8px;
    font-weight: 600;
}

.result-value {
    display: block;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent, #f8b547);
}

.azimuth-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.azimuth-info p {
    margin: 8px 0;
    color: #555;
}

.error-message {
    background: #fee;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin-top: 20px;
    border-left: 4px solid #c33;
}

.examples-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.examples-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

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

.example-btn,
.airport-example-btn {
    padding: 15px;
    background: white;
    border: 2px solid #667eea;
    color: #667eea;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.example-btn:hover,
.airport-example-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.airport-example-btn {
    border-color: #764ba2;
    color: #764ba2;
}

.airport-example-btn:hover {
    background: #764ba2;
    color: white;
    box-shadow: 0 5px 15px rgba(118, 75, 162, 0.3);
}

.info-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.info-section h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.info-section p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 15px;
}

.visualization-section {
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

.visualization-section h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.geodesic-click-info {
    background: #0f172a;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 14px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    line-height: 1.5;
}

#globe-container {
    width: 100%;
    height: min(90vh, 900px);
    border-radius: 15px;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    position: relative;
    margin-bottom: 20px;
}

.globe-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: white;
    z-index: 10;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.globe-loading p {
    font-size: 1.1rem;
    margin: 0;
}

.visualization-controls {
display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.globe-unit-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 15px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
}

.globe-unit-selector > label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
    margin-right: 5px;
}

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

.radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    color: #333;
    font-size: 0.9rem;
    padding: 4px 8px;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.radio-label:hover {
    background: rgba(102, 126, 234, 0.1);
}

.radio-label input[type="radio"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.radio-label span {
    font-weight: 500;
    color: #333;
    user-select: none;
}

.control-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.control-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

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

.zoom-info {
    margin-top: 15px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    font-size: 0.9rem;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.zoom-info strong {
    color: #ffeb3b;
}

.control-info {
    flex: 1;
    text-align: right;
    color: #666;
    font-size: 0.9rem;
}

.control-info p {
    margin: 0;
}

body.rtl {
    direction: rtl;
}

body.rtl .calculator-card,
body.rtl .visualization-section,
body.rtl .examples-section,
body.rtl .info-section {
    text-align: right;
}

body.rtl input,
body.rtl select,
body.rtl textarea {
    direction: rtl;
    text-align: right;
}

body.rtl .mode-selector,
body.rtl .visualization-controls,
body.rtl .examples-grid {
    flex-direction: row-reverse;
}

footer {
    text-align: center;
    color: white;
    padding: 20px;
    opacity: 0.9;
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .input-row {
        grid-template-columns: 1fr;
    }

    .result-grid {
        grid-template-columns: 1fr;
    }

    .examples-grid {
        grid-template-columns: 1fr;
    }

    .calculator-card,
    .examples-section,
    .info-section,
    .visualization-section {
        padding: 20px;
    }

    #globe-container {
        height: min(70vh, 600px);
    }

    .visualization-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .control-info {
        text-align: center;
    }
}

.calculate-btn.loading::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

/* Waypoint Mode Styles */
.waypoint-airports {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.waypoint-settings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 15px;
}

.waypoint-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}

.waypoint-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.waypoint-results {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.waypoint-results h4 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.waypoint-list {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.waypoint-item {
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.waypoint-item:last-child {
    border-bottom: none;
}

.waypoint-item strong {
    color: #667eea;
    display: inline-block;
    width: 80px;
}

.waypoint-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.waypoint-summary-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.waypoint-summary-item .label {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 5px;
}

.waypoint-summary-item .value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
}

.waypoint-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.waypoint-action-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.waypoint-action-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

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

@media (max-width: 768px) {
    .waypoint-airports,
    .waypoint-settings {
        grid-template-columns: 1fr;
    }
}

/* Waypoint Mode Toggle */
.waypoint-mode-toggle {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-top: 15px;
}

.toggle-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 12px;
}

.toggle-label input[type="checkbox"] {
    margin-top: 3px;
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.toggle-text {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.toggle-text strong {
    color: #333;
    font-size: 1rem;
}

.toggle-text small {
    color: #666;
    font-size: 0.85rem;
    line-height: 1.4;
}

.search-radius-control {
    padding-left: 32px;
}

.search-radius-control label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: #555;
}

.search-radius-control input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #ddd;
    outline: none;
    -webkit-appearance: none;
}

.search-radius-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
}

.search-radius-control input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #667eea;
    cursor: pointer;
    border: none;
}

/* ============================================================
   DESIGN IMPROVEMENTS — appended 2026-03-22
   ============================================================ */

/* --- Suggestion 12: Proportional font for inputs --- */
input[type="number"],
input[type="text"],
select {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
    font-size: 1rem;
}

/* --- Suggestion 13: Collapsible warning bar --- */
.warning-bar {
    background: rgba(248, 181, 71, 0.1);
    border-left: 3px solid var(--accent, #f8b547);
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 1.2rem;
    font-size: 0.85rem;
    color: #e8edf2;
}
.warning-bar summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--accent, #f8b547);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 8px;
}
.warning-bar summary::-webkit-details-marker { display: none; }
.warning-bar summary::before {
    content: '▶';
    font-size: 0.7em;
    transition: transform 0.2s;
}
details.warning-bar[open] summary::before {
    transform: rotate(90deg);
}
.warning-bar ul {
    margin: 8px 0 0 1.2rem;
    padding: 0;
    opacity: 0.85;
}

/* --- Suggestion 14: Typography scale --- */
:root {
    --text-xs: 0.8rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.1rem;
    --text-xl: 1.5rem;
    --text-2xl: 2rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}
h1 { font-size: var(--text-2xl); font-weight: var(--font-weight-bold); }
h3 { font-size: var(--text-lg); font-weight: var(--font-weight-semibold); }
label { font-size: var(--text-sm); font-weight: var(--font-weight-medium); }
.muted, .text-muted { font-size: var(--text-xs); color: #9ba8b5; }

/* --- Suggestion 15: Micro-interactions --- */
#calculateBtn:active,
#calculateAirportsBtn:active,
#generateWaypointsBtn:active {
    transform: scale(0.97);
    transition: transform 0.08s ease;
}
#calculateBtn.loading,
#calculateAirportsBtn.loading {
    opacity: 0.7;
    pointer-events: none;
}
#coordsInput,
#airportsInput,
#waypointsInput {
    transition: opacity 0.15s ease;
}
#error {
    border-left: 3px solid #ef4444;
    animation: slideDown 0.2s ease forwards;
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes valueFlash {
    0%   { opacity: 0.3; }
    100% { opacity: 1; }
}
.result-value.updated {
    animation: valueFlash 0.3s ease forwards;
}

/* --- Suggestion 2: Endpoint marker styles --- */
.geodesic-marker-origin,
.geodesic-marker-dest {
    cursor: pointer;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}
@keyframes geodesicPinDrop {
    0%   { transform: translateY(-30px); opacity: 0; }
    70%  { transform: translateY(4px);   opacity: 1; }
    100% { transform: translateY(0);     opacity: 1; }
}
.geodesic-pin-drop {
    animation: geodesicPinDrop 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
.geodesic-marker-waypoint {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: white;
    border: 2.5px solid #1e293b;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.4);
    cursor: pointer;
}
.geodesic-marker-number {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

/* --- Suggestion 3: Frosted-glass midpoint label --- */
.geodesic-path-label {
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    padding: 5px 12px;
    border-radius: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    border: 1px solid rgba(0, 212, 255, 0.35);
    box-shadow: 0 0 12px rgba(0, 212, 255, 0.15);
    pointer-events: none;
}

/* --- Suggestion 4: Click-on-path info panel slide-in --- */
#geodesic-click-info {
    transition: opacity 0.2s ease, transform 0.2s ease;
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
}
#geodesic-click-info.geodesic-click-info--visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.gci-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.gci-route-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--accent, #f8b547);
}
.gci-close {
    background: none;
    border: none;
    color: #9ba8b5;
    cursor: pointer;
    font-size: 1rem;
    padding: 0;
    line-height: 1;
}
.gci-progress {
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin-bottom: 10px;
    overflow: hidden;
}
.gci-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #00d4ff, var(--accent, #f8b547));
    border-radius: 2px;
    transition: width 0.3s ease;
}
.gci-metrics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.gci-metric {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.gci-metric-label {
    font-size: 0.75rem;
    color: #9ba8b5;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.gci-metric-value {
    font-size: 1rem;
    font-weight: 600;
    color: #e8edf2;
}
.gci-metric-bearing {
    font-size: 0.8rem;
    color: var(--accent-2, #7cf4d2);
}

/* --- Suggestion 8: On-globe HUD overlay --- */
.geodesic-hud {
    position: absolute;
    bottom: 40px;
    left: 12px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    padding: 10px 16px;
    color: #e8edf2;
    pointer-events: none;
    min-width: 180px;
}
.hud-route {
    font-size: 0.8rem;
    color: #9ba8b5;
    margin-bottom: 4px;
}
.hud-arrow {
    color: var(--accent, #f8b547);
}
.hud-distance {
    font-size: 1.4rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.1;
}
.hud-bearing {
    font-size: 0.75rem;
    color: var(--accent-2, #7cf4d2);
    margin-top: 4px;
}
