* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background: #2a2a2a;
    color: #e0e0e0;
    min-height: 100vh;
    padding: 6px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    overflow-x: hidden;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.title {
    font-size: 1em;
    font-weight: bold;
    color: #d4af37;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.mode-switch {
    display: flex;
    gap: 4px;
}

.mode-btn {
    padding: 6px 12px;
    background: #4a4a4a;
    border: 1px solid #1a1a1a;
    color: #e0e0e0;
    cursor: pointer;
    font-size: 0.75em;
    border-radius: 3px;
    box-shadow: inset 0 -2px 0 rgba(0,0,0,0.3);
    transition: all 0.2s;
}

.mode-btn:active {
    box-shadow: inset 0 2px 0 rgba(0,0,0,0.3);
}

.mode-btn.active {
    background: #d4af37;
    color: #1a1a1a;
    font-weight: bold;
    box-shadow: inset 0 2px 0 rgba(0,0,0,0.2);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

.demo-btn {
    padding: 4px 10px;
    background: #3a3a3a;
    border: 1px solid #1a1a1a;
    color: #888;
    cursor: pointer;
    font-size: 0.65em;
    border-radius: 3px;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.demo-btn:hover {
    background: #4a4a4a;
    color: #aaa;
}

.demo-btn.active {
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
    color: #fff;
    border-color: #cc4444;
    animation: demo-pulse 2s ease-in-out infinite;
}

@keyframes demo-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(255, 107, 107, 0.6); }
}

.demo-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(90deg, #ff6b6b, #ee5a5a, #ff6b6b);
    background-size: 200% 100%;
    color: #fff;
    text-align: center;
    padding: 4px;
    font-size: 0.75em;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 1001;
    animation: demo-banner 3s linear infinite;
}

@keyframes demo-banner {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.instruments-panel {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 6px;
    max-width: 100%;
    width: 100%;
    justify-items: center;
}

.gauge {
    margin-top: 4px;
    position: relative;
    aspect-ratio: 1;
    background: radial-gradient(circle at 30% 30%, #3a3a3a, #1a1a1a);
    border-radius: 50%;
    box-shadow:
        inset 0 2px 4px rgba(0,0,0,0.8),
        0 2px 4px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px;
    min-width: 0;
    max-width: 200px;
    width: 86%;
}

/* Brushed steel bezel */
.gauge::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    background: linear-gradient(
        135deg,
        #9a9a9a 0%,
        #6a6a6a 10%,
        #b0b0b0 20%,
        #5a5a5a 35%,
        #8a8a8a 50%,
        #4a4a4a 65%,
        #a0a0a0 80%,
        #6a6a6a 90%,
        #8a8a8a 100%
    );
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.3),
        inset 0 -1px 1px rgba(0,0,0,0.3),
        0 3px 6px rgba(0,0,0,0.5);
    z-index: -1;
}

/* Inner dark ring */
.gauge::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 50%;
    border: 2px solid #1a1a1a;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
    pointer-events: none;
}

/* Screws container */
.gauge-screws {
    position: absolute;
    inset: -6px;
    pointer-events: none;
}

.gauge-screw {
    position: absolute;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 35% 35%, #888, #444 50%, #333);
    border-radius: 50%;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.4),
        inset 0 -1px 1px rgba(0,0,0,0.4),
        0 1px 2px rgba(0,0,0,0.5);
}

.gauge-screw::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 6px;
    height: 1px;
    background: linear-gradient(180deg, #222, #555, #222);
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 0 0 1px rgba(0,0,0,0.5);
}

.gauge-screw.top-left { top: 12%; left: 12%; }
.gauge-screw.top-right { top: 12%; right: 12%; }
.gauge-screw.bottom-left { bottom: 12%; left: 12%; }
.gauge-screw.bottom-right { bottom: 12%; right: 12%; }

.gauge-label {
    position: absolute;
    top: 20%;
    font-size: 0.9em;
    color: #d4af37;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.2px;
}

.gauge-value {
    font-size: 2em;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 0 6px rgba(212, 175, 55, 0.6);
    line-height: 1;
    margin-top: 5%;
}

.gauge-unit {
    font-size: 0.45em;
    color: #c0c0c0;
    margin-left: 2px;
}

.gauge-sub {
    font-size: 0.55em;
    color: #a0a0a0;
    margin-top: 3px;
    text-align: center;
    line-height: 1.2;
}

.gauge-wind-dir {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin-top: 2px;
}

.wind-arrow {
    display: inline-block;
    font-size: 1.4em;
    color: #d4af37;
    filter: drop-shadow(0 0 3px rgba(212, 175, 55, 0.6));
    transition: transform 0.5s ease;
    line-height: 1;
}

.gauge-dir-text {
    font-size: 0.7em;
    color: #e0e0e0;
    font-weight: bold;
}

.score-gauge {
    margin-top: 6px;
    grid-column: span 3;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 0 8px 8px;
    text-align: center;
    background: none;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.score-gauge svg {
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}

.score-gauge > svg {
    flex-shrink: 0;
    width: 100%;
    max-width: clamp(180px, 35vw, 240px);
}

.score-info-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    min-width: 140px;
    max-width: 200px;
}

.score-leds {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: center;
    padding: 4px 0;
}

.led {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1.5px solid #3a3a3a;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.8);
}

.led-red {
    background: #2a0a0a;
}
.led-red.led-on {
    background: radial-gradient(circle at 40% 35%, #ff6666, #cc2222);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3),
                0 0 8px rgba(255,50,50,0.6),
                0 0 16px rgba(255,50,50,0.3);
}

.led-orange {
    background: #2a1500;
}
.led-orange.led-on {
    background: radial-gradient(circle at 40% 35%, #ffaa44, #cc7722);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3),
                0 0 8px rgba(255,150,50,0.6),
                0 0 16px rgba(255,150,50,0.3);
}

.led-yellow {
    background: #2a2200;
}
.led-yellow.led-on {
    background: radial-gradient(circle at 40% 35%, #ffdd66, #ccaa22);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3),
                0 0 8px rgba(255,200,50,0.6),
                0 0 16px rgba(255,200,50,0.3);
}

.led-green {
    background: #0a2a0a;
}
.led-green.led-on {
    background: radial-gradient(circle at 40% 35%, #88ff88, #33aa33);
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.3),
                0 0 8px rgba(80,255,80,0.6),
                0 0 16px rgba(80,255,80,0.3);
}

.score-info-panel {
    background:
        linear-gradient(#0e0e0e, #0e0e0e) padding-box,
        linear-gradient(135deg, #9a9a9a, #5a5a5a, #a0a0a0, #4a4a4a, #8a8a8a) border-box;
    border: 4px solid transparent;
    border-radius: 10px;
    padding: 10px 12px;
    box-shadow:
        inset 0 1px 4px rgba(0,0,0,0.8),
        inset 0 0 12px rgba(0,0,0,0.4),
        0 2px 6px rgba(0,0,0,0.6);
    position: relative;
    min-width: 170px;
}

/* Panel screws (steel) */
.panel-screw {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: radial-gradient(circle at 35% 35%, #888, #555 60%, #444);
    border: 0.8px solid #333;
    box-shadow:
        inset 0 1px 1px rgba(255,255,255,0.3),
        0 1px 1px rgba(0,0,0,0.3);
}
.panel-screw::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 4px;
    height: 0.8px;
    background: linear-gradient(180deg, #333, #666, #333);
    transform: translate(-50%, -50%) rotate(30deg);
}
.panel-screw.top-left { top: 4px; left: 4px; }
.panel-screw.top-right { top: 4px; right: 4px; }
.panel-screw.bottom-left { bottom: 4px; left: 4px; }
.panel-screw.bottom-right { bottom: 4px; right: 4px; }

.score-value-big {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
    color: #888;
}

.score-message {
    font-size: 0.85em;
    font-weight: bold;
    margin-top: 2px;
    line-height: 1.3;
    color: #ccc;
}

.score-details {
    font-size: 0.7em;
    margin-top: 6px;
    opacity: 0.9;
    line-height: 1.4;
}

.score-tap-hint {
    font-size: 0.6em;
    color: #777;
    margin-top: 6px;
    opacity: 0.7;
}

.score-excellent .score-message { color: #88ff88; }
.score-moderate .score-message { color: #ffbb44; }
.score-difficult .score-message { color: #ff9944; }
.score-poor .score-message { color: #ff6666; }
.score-night .score-message { color: #9999bb; }
.score-night .score-details { color: #7777aa; }
.score-night .score-tap-hint { color: #668; }
.score-night .led { border-color: #1a1a2a; }
.score-night .score-info-panel {
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,1),
        inset 0 0 4px rgba(100,100,180,0.4),
        inset 0 0 15px rgba(100,100,180,0.3),
        0 2px 6px rgba(0,0,0,1);
}

/* Score category inner glows */
.score-excellent .score-info-panel {
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,1),
        inset 0 0 4px rgba(80,255,80,0.6),
        inset 0 0 15px rgba(80,255,80,0.4),
        0 2px 6px rgba(0,0,0,1);
}

.score-moderate .score-info-panel {
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,1),
        inset 0 0 4px rgba(255,200,20,0.6),
        inset 0 0 15px rgba(255,200,20,0.4),
        0 2px 6px rgba(0,0,0,1);
}

.score-difficult .score-info-panel {
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,1),
        inset 0 0 4px rgba(255,150,50,0.6),
        inset 0 0 15px rgba(255,150,50,0.4),
        0 2px 6px rgba(0,0,0,1);
}

.score-poor .score-info-panel {
    box-shadow:
        inset 0 1px 1px rgba(0,0,0,1),
        inset 0 0 4px rgba(255,70,70,0.6),
        inset 0 0 15px rgba(255,70,70,0.5),
        0 2px 6px rgba(0,0,0,1);
}

.timeline-panel {
    position: relative;
    background:
        linear-gradient(#1a1a1a, #1a1a1a) padding-box,
        linear-gradient(135deg, #9a9a9a, #5a5a5a, #a0a0a0, #4a4a4a, #8a8a8a) border-box;
    border: 4px solid transparent;
    border-radius: 10px;
    padding: 14px 14px 12px;
    margin-bottom: 8px;
    box-shadow:
        inset 0 1px 4px rgba(0,0,0,0.8),
        inset 0 0 20px rgba(0,0,0,0.3),
        0 3px 6px rgba(0,0,0,0.5);
}

/* Timeline panel uses steel-colored screws */
.timeline-panel > .panel-screw {
    background: radial-gradient(circle at 35% 35%, #888, #555 60%, #444);
    border-color: #333;
}
.timeline-panel > .panel-screw::after {
    background: linear-gradient(180deg, #333, #666, #333);
}

.timeline-title {
    font-size: 0.8em;
    color: #d4af37;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 1px;
}

.timeline {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.timeline-grid {
    display: grid;
    grid-template-columns: repeat(24, minmax(60px, 1fr));
    gap: 4px;
}

.timeline-slot {
    background: radial-gradient(circle at 30% 30%, #3a3a3a, #1a1a1a);
    border: 2px solid #2a2a2a;
    padding: 8px 4px;
    text-align: center;
    border-radius: 4px;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.timeline-slot.excellent {
    background: radial-gradient(circle at 30% 30%, #2a5a2a, #1a3a1a);
    border-color: #4a8a4a;
}

.timeline-slot.excellent .timeline-score,
.timeline-slot.excellent .timeline-time {
    color: #88ff88;
    text-shadow: 0 0 4px rgba(136, 255, 136, 0.6);
}

.timeline-slot.moderate {
    background: radial-gradient(circle at 30% 30%, #6a6531, #45401f);
    border-color: #b3a458;
}

.timeline-slot.moderate .timeline-score,
.timeline-slot.moderate .timeline-time {
    color: #ffd344;
    text-shadow: 0 0 4px rgba(223, 197, 67, 0.6);
}

.timeline-slot.difficult {
    background: radial-gradient(circle at 30% 30%, #5a3a2a, #3a2215);
    border-color: #8a5a3a;
}

.timeline-slot.difficult .timeline-score,
.timeline-slot.difficult .timeline-time {
    color: #ffac30;
    text-shadow: 0 0 4px rgba(255, 180, 68, 0.6);
}

.timeline-slot.poor {
    background: radial-gradient(circle at 30% 30%, #5a2a2a, #3a1a1a);
    border-color: #8a4a4a;
}

.timeline-slot.poor .timeline-score,
.timeline-slot.poor .timeline-time {
    color: #dc2634;
    text-shadow: 0 0 4px rgba(255, 102, 102, 0.6);
}

.timeline-slot.night {
    background: radial-gradient(circle at 30% 30%, #151828, #0a0d18);
    border-color: #1a2040;
    opacity: 0.45;
}

.timeline-slot.night .timeline-score,
.timeline-slot.night .timeline-time {
    color: #8888aa;
    text-shadow: none;
}

.timeline-slot.night .timeline-icon {
    opacity: 0.6;
}

.timeline-slot.night .timeline-wind {
    color: #555570;
}

.timeline-time {
    font-size: 0.75em;
    font-weight: bold;
    margin-bottom: 4px;
    color: #d4af37;
}

.timeline-score {
    font-size: 1.3em;
    font-weight: bold;
    margin: 4px 0;
    color: #ffffff;
}

.timeline-icon {
    font-size: 1.1em;
    margin: 4px 0;
}

.timeline-wind {
    font-size: 0.65em;
    margin-top: 2px;
    color: #a0a0a0;
}

.timeline-sun {
    font-size: 0.6em;
    color: #f0a040;
    font-weight: bold;
    margin: 1px 0;
    text-shadow: 0 0 4px rgba(240, 160, 64, 0.5);
}

.status-bar {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 2px solid #1a1a1a;
    border-radius: 6px;
    font-size: 0.85em;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.status-label {
    color: #d4af37;
    font-weight: bold;
}

.status-item span:not(.status-label) {
    color: #d0d0d0;
}

.weather-attribution {
    font-size: 0.75em;
    color: #808080;
    font-style: italic;
}

.config-btn {
    position: fixed;
    bottom: 15px;
    right: 15px;
    width: 50px;
    height: 50px;
    background: radial-gradient(circle at 30% 30%, #d4af37, #a08020);
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 50%;
    font-size: 1.5em;
    cursor: pointer;
    box-shadow:
        0 4px 8px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s;
    z-index: 100;
}

.config-btn:active {
    transform: scale(0.95);
    box-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(0,0,0,0.2);
}

.config-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.config-modal.open {
    display: block;
}

.config-content {
    max-width: 600px;
    margin: 40px auto;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
}

.config-title {
    font-size: 1.2em;
    color: #d4af37;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin: 15px 0;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.8em;
    margin-bottom: 6px;
    color: #d4af37;
    font-weight: bold;
}

.input-group input {
    padding: 10px;
    background: #1a1a1a;
    border: 2px solid #4a4a4a;
    color: #e0e0e0;
    border-radius: 4px;
    font-size: 1em;
}

.input-group input:focus {
    outline: none;
    border-color: #d4af37;
}

.btn {
    padding: 12px 24px;
    background: radial-gradient(circle at 30% 30%, #d4af37, #a08020);
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    cursor: pointer;
    font-weight: bold;
    border-radius: 4px;
    margin: 5px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(255,255,255,0.3);
    transition: all 0.2s;
}

.btn:active {
    transform: scale(0.98);
    box-shadow:
        0 1px 2px rgba(0,0,0,0.5),
        inset 0 1px 0 rgba(0,0,0,0.2);
}

.btn-close {
    background: radial-gradient(circle at 30% 30%, #8a4a4a, #5a2a2a);
    color: #ffffff;
}

.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    flex-direction: column;
    gap: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #3a3a3a;
    border-top: 4px solid #d4af37;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #d4af37;
    font-size: 1.2em;
    font-weight: bold;
}

.pioupiou-link {
    color: #d4af37;
    text-decoration: none;
    font-size: 1em;
}

.pioupiou-link:hover {
    text-decoration: underline;
}

.config-section {
    margin-bottom: 18px;
    padding-bottom: 12px;
    border-bottom: 1px solid #3a3a3a;
}

.config-section:last-of-type {
    border-bottom: none;
}

.config-section-title {
    color: #d4af37;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 10px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.config-map {
    height: 200px;
    border: 2px solid #4a4a4a;
    border-radius: 4px;
    margin-bottom: 10px;
    background: #1a1a1a;
}

.config-map .leaflet-tile {
    filter: brightness(0.75) contrast(1.1);
}

.config-hint {
    font-size: 0.75em;
    color: #888;
    margin-top: 6px;
}

.config-hint-box {
    font-size: 0.75em;
    color: #aaa;
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 4px;
    padding: 8px 10px;
    margin-top: 8px;
}

.wind-source-link {
    color: #d4af37;
    text-decoration: none;
}

.wind-source-link:hover {
    text-decoration: underline;
}

.detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.detail-modal.open {
    display: block;
}

.detail-content {
    max-width: 500px;
    margin: 40px auto;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
}

.detail-title {
    font-size: 1.1em;
    color: #d4af37;
    font-weight: bold;
    margin-bottom: 12px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 6px;
    background: linear-gradient(180deg, #338833, #226622);
    color: #fff;
    font-size: 0.7em;
    border-radius: 3px;
    vertical-align: middle;
    letter-spacing: 1px;
    box-shadow: 0 0 8px rgba(50, 200, 50, 0.5);
    animation: live-pulse 2s ease-in-out infinite;
}

@keyframes live-pulse {
    0%, 100% { box-shadow: 0 0 4px rgba(50, 200, 50, 0.4); }
    50% { box-shadow: 0 0 12px rgba(50, 200, 50, 0.8); }
}

.detail-score-display {
    text-align: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #4a4a4a;
}

.detail-score-value {
    font-size: 2.5em;
    font-weight: bold;
    line-height: 1;
}

.detail-score-label {
    font-size: 0.85em;
    margin-top: 4px;
    color: #a0a0a0;
}

.detail-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.detail-row {
    display: flex;
    align-items: center;
    padding: 8px 10px;
    background: rgba(0,0,0,0.3);
    border-radius: 4px;
    gap: 10px;
}

.detail-row-icon {
    font-size: 1.2em;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.detail-row-label {
    flex: 1;
    font-size: 0.85em;
    color: #e0e0e0;
}

.detail-row-value {
    font-size: 0.8em;
    color: #a0a0a0;
    text-align: right;
    min-width: 55px;
}

.detail-row-penalty {
    font-size: 0.8em;
    font-weight: bold;
    text-align: right;
    min-width: 40px;
}

.penalty-zero {
    color: #ff6666;
}

.penalty-neg {
    color: #ffbb44;
}

.penalty-none {
    color: #88ff88;
}

.detail-close-area {
    text-align: center;
    margin-top: 12px;
}

.score-gauge {
    cursor: pointer;
    transition: transform 0.15s;
}

.score-gauge:hover {
    transform: scale(1.02);
}

.score-gauge:hover svg {
    filter: drop-shadow(0 4px 12px rgba(212, 175, 55, 0.25))
            drop-shadow(0 4px 8px rgba(0,0,0,0.7));
}

.timeline-slot {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.timeline-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.5);
}

.timeline-slot:active {
    transform: translateY(0);
}

@media (max-width: 600px) {
    .instruments-panel {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 4px;
    }

    .gauge {
        padding: 3px;
        border: 1px solid #1a1a1a;
    }

    .gauge-value {
        font-size: 1.8em;
    }

    .gauge-label {
        font-size: 0.75em;
    }

    .gauge-sub {
        font-size: 0.5em;
    }

    .gauge-dir-text {
        font-size: 0.6em;
    }

    .wind-arrow {
        font-size: 1.1em;
    }

    .score-info-side {
        min-width: 120px;
    }

    .score-message {
        font-size: 0.8em;
    }

    .score-details {
        font-size: 0.8em;
    }

    .timeline-grid {
        grid-template-columns: repeat(24, 70px);
    }
}

@media (max-width: 500px) {
    .gauge-label {
        font-size: 0.6em;
    }
    .gauge-value {
        font-size: 1.2em;
    }
}

@media (max-width: 400px) {
    body {
        padding: 4px;
    }

    .gauge-value {
        font-size: 1.25em;
    }

    .gauge-label {
        font-size: 0.55em;
    }

    .gauge-sub {
        font-size: 0.45em;
    }

    .gauge-dir-text {
        font-size: 0.55em;
    }

    .wind-arrow {
        font-size: 0.9em;
    }

    .score-value-big {
        font-size: 2.2em;
    }

    .score-gauge {
        flex-direction: column;
        gap: 6px;
    }

    .score-info-side {
        min-width: unset;
        max-width: 90%;
        width: 100%;
    }

    .score-info-panel {
        min-width: unset;
        width: 100%;
    }

    .led {
        width: 12px;
        height: 12px;
    }

    .header {
        flex-direction: column;
        gap: 6px;
        padding: 6px 10px;
    }
}

@media (max-width: 345px) {
    body {
        padding: 4px;
    }

    .gauge-value {
        font-size: 0.8em;
    }

    .gauge-label {
        font-size: 0.45em;
    }
}

/* Help modal */
.status-help a {
    color: #888;
    text-decoration: none;
    font-size: 0.85em;
}

.status-help a:hover {
    color: #d4af37;
}

.help-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    padding: 20px;
    overflow-y: auto;
}

.help-modal.open {
    display: block;
}

.help-content {
    max-width: 520px;
    margin: 40px auto;
    background: linear-gradient(180deg, #3a3a3a 0%, #2a2a2a 100%);
    border: 3px solid #1a1a1a;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.8);
}

.help-title {
    font-size: 1.1em;
    color: #d4af37;
    font-weight: bold;
    margin-bottom: 16px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.help-body {
    font-size: 0.9em;
    line-height: 1.5;
    color: #d0d0d0;
}

.help-body p {
    margin-bottom: 12px;
}

.help-section {
    margin-bottom: 16px;
}

.help-section-title {
    color: #d4af37;
    font-size: 0.85em;
    font-weight: bold;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.help-colors {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.help-color {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85em;
    font-weight: bold;
}

.help-color.green {
    background: rgba(80, 200, 80, 0.2);
    color: #88ff88;
    border: 1px solid #4a8a4a;
}

.help-color.yellow {
    background: rgba(200, 170, 50, 0.2);
    color: #ffcc44;
    border: 1px solid #8a7a4a;
}

.help-color.orange {
    background: rgba(200, 120, 50, 0.2);
    color: #ff9944;
    border: 1px solid #8a5a3a;
}

.help-color.red {
    background: rgba(200, 80, 80, 0.2);
    color: #ff6666;
    border: 1px solid #8a4a4a;
}

.help-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9em;
}

.help-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #3a3a3a;
}

.help-table td:first-child {
    color: #e0e0e0;
    white-space: nowrap;
}

.help-table td:last-child {
    color: #a0a0a0;
    text-align: right;
}

.help-table tr:last-child td {
    border-bottom: none;
}

.help-hint {
    font-size: 0.8em;
    color: #888;
    font-style: italic;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #3a3a3a;
}

.help-close-area {
    text-align: center;
    margin-top: 16px;
}