* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #0a0a15;
    color: #e0e0e0;
    padding: 20px;
    padding-top: 110px;
    min-height: 100vh;
}

@media (max-width: 768px) {
    body {
        padding: 10px;
        padding-top: 20px;
    }
}

.site-header {
    position: relative;
    max-width: 1400px;
    margin: 0 auto 110px auto;
}

@media (max-width: 768px) {
    .site-header {
        margin: 0 auto 20px auto;
    }
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 30px;
    background: rgba(20, 20, 30, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(100, 150, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

@media (max-width: 768px) {
    .nav-bar {
        flex-direction: column;
        gap: 10px;
        padding: 10px 15px;
    }
}

.site-header .logo {
    position: absolute;
    left: 50%;
    top: -95px;
    transform: translateX(-50%);
    z-index: 10;
    text-align: center;
}

.site-header img {
    max-width: 300px;
    height: auto;
    filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.8));
}

@media (max-width: 768px) {
    .site-header .logo {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        margin-bottom: 15px;
    }

    .site-header img {
        max-width: 200px;
    }
}

.nav-links {
    display: flex;
    gap: 12px;
}

.nav-links.left {
    justify-content: flex-start;
}

.nav-links.right {
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .nav-links {
        flex-wrap: wrap;
        justify-content: center !important;
        gap: 8px;
    }
}

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(100, 149, 237, 0.2);
    border: 1px solid rgba(100, 149, 237, 0.4);
    border-radius: 6px;
    color: #87ceeb;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .nav-link {
        padding: 10px 14px;
        font-size: 12px;
    }
}

.nav-link:hover {
    background: rgba(100, 149, 237, 0.4);
    border-color: rgba(100, 149, 237, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(100, 149, 237, 0.3);
}

.nav-link::before {
    content: '🔗';
    font-size: 14px;
}

.main-container {
    display: flex;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

@media (max-width: 1200px) {
    .main-container {
        flex-direction: column;
        gap: 15px;
    }
}

.left-panel {
    background: rgba(20, 20, 30, 0.95);
    width: 100%;
    flex-shrink: 0;
    border-radius: 12px;
    border: 2px solid rgba(100, 150, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 20px;
}

@media (max-width: 1200px) {
    .left-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .left-panel {
        padding: 15px;
    }
}

.right-panel {
    display: none; /* Temporarily hidden */
    flex: 1;
    background: rgba(20, 20, 30, 0.95);
    border-radius: 12px;
    border: 2px solid rgba(100, 150, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    padding: 20px;
    min-width: 640px;
}

@media (max-width: 1200px) {
    .right-panel {
        min-width: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    .right-panel {
        padding: 15px;
    }
}

.right-panel h2 {
    color: #6495ed;
    margin-bottom: 15px;
    text-align: center;
}

@media (max-width: 768px) {
    .right-panel h2 {
        font-size: 18px;
    }
}

.right-panel iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    background: white;
}

@media (max-width: 768px) {
    .right-panel iframe {
        height: 400px;
    }
}

.header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid rgba(100, 150, 255, 0.3);
}

.header h1 {
    font-size: 24px;
    color: #6495ed;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 18px;
    }
}

.last-update {
    font-size: 12px;
    color: #888;
}

.section {
    background: rgba(30, 30, 45, 0.8);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.section-title {
    font-size: 16px;
    font-weight: bold;
    color: #6495ed;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 12px;
}

@media (max-width: 480px) {
    .metrics-grid {
        grid-template-columns: 1fr;
    }
}

.metric {
    background: rgba(50, 50, 70, 0.6);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid #6495ed;
}

.metric-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.metric-value {
    font-size: 22px;
    font-weight: bold;
    color: #fff;
}

.metric-unit {
    font-size: 12px;
    color: #aaa;
    margin-left: 4px;
}

.summary-box {
    background: linear-gradient(135deg, rgba(100, 149, 237, 0.2), rgba(70, 130, 180, 0.2));
    border-radius: 8px;
    padding: 15px;
    margin-top: 12px;
    border: 1px solid rgba(100, 150, 255, 0.3);
}

.summary-title {
    font-size: 14px;
    font-weight: bold;
    color: #87ceeb;
    margin-bottom: 8px;
}

.summary-text {
    font-size: 13px;
    line-height: 1.6;
    color: #e0e0e0;
}

.band-recommendations {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.band-chip {
    background: rgba(100, 149, 237, 0.3);
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 12px;
    font-weight: bold;
    border: 1px solid rgba(100, 149, 237, 0.5);
}

.band-chip.good {
    background: rgba(50, 205, 50, 0.3);
    border-color: rgba(50, 205, 50, 0.5);
}

.band-chip.fair {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.5);
}

.band-chip.poor {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.5);
}

.status-indicator {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.status-good {
    background: #32cd32;
}

.status-fair {
    background: #ffa500;
}

.status-poor {
    background: #dc143c;
}

.loading {
    text-align: center;
    padding: 20px;
    color: #888;
}

.error {
    background: rgba(220, 20, 60, 0.2);
    border: 1px solid rgba(220, 20, 60, 0.5);
    padding: 10px;
    border-radius: 6px;
    margin: 10px 0;
    font-size: 12px;
}

.refresh-btn {
    background: rgba(100, 149, 237, 0.3);
    border: 1px solid rgba(100, 149, 237, 0.5);
    color: #e0e0e0;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    margin-top: 10px;
    width: 100%;
}

.refresh-btn:hover {
    background: rgba(100, 149, 237, 0.5);
}

@media (max-width: 768px) {
    .refresh-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

.reception-list {
    max-height: 200px;
    overflow-y: auto;
    margin-top: 10px;
}

.reception-item {
    background: rgba(50, 50, 70, 0.4);
    padding: 8px 10px;
    margin-bottom: 6px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
}

.reception-item .location {
    font-weight: bold;
    color: #87ceeb;
}

.reception-item .band {
    background: rgba(100, 149, 237, 0.3);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
}

.reception-item .distance {
    color: #ffa500;
    font-size: 11px;
}

.reception-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .reception-stats {
        grid-template-columns: 1fr;
    }
}

.stat-box {
    background: rgba(50, 50, 70, 0.4);
    padding: 8px;
    border-radius: 6px;
    text-align: center;
}

.stat-value {
    font-size: 18px;
    font-weight: bold;
    color: #6495ed;
}

.stat-label {
    font-size: 10px;
    color: #999;
    text-transform: uppercase;
    margin-top: 2px;
}

.no-data {
    text-align: center;
    padding: 20px;
    color: #888;
    font-size: 13px;
}

/* Location Settings Panel */
.location-settings {
    background: rgba(50, 50, 70, 0.6);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.location-header {
    font-size: 13px;
    margin-bottom: 8px;
    color: #e0e0e0;
}

.location-icon {
    margin-right: 4px;
}

.location-controls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.location-input {
    flex: 1;
    min-width: 120px;
    background: rgba(30, 30, 45, 0.8);
    border: 1px solid rgba(100, 149, 237, 0.4);
    border-radius: 4px;
    padding: 6px 10px;
    color: #e0e0e0;
    font-size: 13px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.location-input:focus {
    outline: none;
    border-color: rgba(100, 149, 237, 0.8);
}

.location-button {
    background: rgba(100, 149, 237, 0.3);
    border: 1px solid rgba(100, 149, 237, 0.5);
    color: #e0e0e0;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.location-button:hover {
    background: rgba(100, 149, 237, 0.5);
}

.location-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 480px) {
    .location-controls {
        flex-direction: column;
    }

    .location-input {
        min-width: 100%;
    }

    .location-button {
        width: 100%;
    }
}

/* Bands Analyzed Section */
.bands-analyzed {
    background: rgba(100, 149, 237, 0.15);
    border-radius: 6px;
    padding: 8px 12px;
    margin-bottom: 15px;
    font-size: 12px;
    color: #e0e0e0;
    text-align: center;
    border: 1px solid rgba(100, 149, 237, 0.3);
}

.bands-icon {
    margin-right: 6px;
}

/* Sun Times */
.sun-times {
    text-align: center;
    padding: 10px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.2), rgba(255, 140, 0, 0.2));
    border-radius: 8px;
    border: 1px solid rgba(255, 165, 0, 0.3);
    font-size: 13px;
    color: #ffd700;
    font-weight: bold;
}

/* Time-Based Outlook */
.time-based-outlook {
    margin-top: 12px;
}

.time-blocks-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

@media (max-width: 1200px) {
    .time-blocks-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .time-blocks-container {
        grid-template-columns: 1fr;
    }
}

.time-block {
    background: rgba(30, 30, 45, 0.8);
    border-radius: 8px;
    padding: 12px;
    border: 1px solid rgba(100, 150, 255, 0.2);
}

.time-block-current {
    background: linear-gradient(135deg, rgba(28, 75, 159, 0.25), rgba(61, 89, 112, 0.25));
    border: 2px solid rgba(100, 149, 237, 0.5);
    box-shadow: 0 0 15px rgba(100, 149, 237, 0.3);
}

.time-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(100, 150, 255, 0.2);
    color: #87ceeb;
}

.time-block-current .time-block-header {
    color: #ffd700;
}

.time-range {
    font-size: 11px;
    color: #aaa;
    font-weight: normal;
}

.time-block-recommendations {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-recommendations {
    text-align: center;
    padding: 15px;
    color: #888;
    font-size: 12px;
    font-style: italic;
}

/* Recommendation Items */
.recommendation-item {
    background: rgba(50, 50, 70, 0.6);
    border-radius: 6px;
    padding: 10px;
    border-left: 3px solid #6495ed;
}

.recommendation-item.good {
    border-left-color: #32cd32;
    background: rgba(50, 205, 50, 0.1);
}

.recommendation-item.fair {
    border-left-color: #ffa500;
    background: rgba(255, 165, 0, 0.1);
}

.recommendation-item.poor {
    border-left-color: #dc143c;
    background: rgba(220, 20, 60, 0.1);
}

.rec-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.rec-band {
    font-weight: bold;
    color: #6495ed;
    font-size: 13px;
}

.rec-regions {
    color: #e0e0e0;
    font-size: 12px;
}

.rec-condition {
    margin-left: auto;
    font-size: 10px;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(100, 149, 237, 0.3);
    border: 1px solid rgba(100, 149, 237, 0.5);
}

.recommendation-item.good .rec-condition {
    background: rgba(50, 205, 50, 0.3);
    border-color: rgba(50, 205, 50, 0.5);
    color: #32cd32;
}

.recommendation-item.fair .rec-condition {
    background: rgba(255, 165, 0, 0.3);
    border-color: rgba(255, 165, 0, 0.5);
    color: #ffa500;
}

.recommendation-item.poor .rec-condition {
    background: rgba(220, 20, 60, 0.3);
    border-color: rgba(220, 20, 60, 0.5);
    color: #dc143c;
}

.rec-note {
    font-size: 11px;
    color: #ccc;
    margin-bottom: 4px;
    line-height: 1.4;
}

.rec-source {
    font-size: 10px;
    color: #999;
    margin-top: 4px;
}

.source-indicator {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(70, 130, 180, 0.2);
    border-radius: 4px;
    font-size: 10px;
}

.psk-confirmation {
    font-size: 11px;
    color: #87ceeb;
    margin-top: 4px;
    padding-left: 4px;
}

.band-stats {
    font-size: 11px;
    color: #ffa500;
    margin-top: 6px;
    padding: 4px 8px;
    background: rgba(255, 165, 0, 0.1);
    border-left: 2px solid rgba(255, 165, 0, 0.4);
    border-radius: 3px;
}

/* Mode Restriction Badges */
.mode-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: bold;
    text-transform: uppercase;
    margin-left: 4px;
    margin-right: 4px;
}

.mode-digital {
    background: rgba(138, 43, 226, 0.3);
    border: 1px solid rgba(138, 43, 226, 0.6);
    color: #ba55d3;
}

@media (max-width: 768px) {
    .rec-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rec-condition {
        margin-left: 0;
    }
}
