:root {
    --primary-color: #2563eb;
    --secondary-color: #7c3aed;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;
    --dark-color: #1f2937;
    --light-color: #f3f4f6;
    --white: #ffffff;
    --text-color: #374151;
    --border-color: #e5e7eb;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background: var(--white);
    box-shadow: var(--shadow-lg);
    padding: 1rem 0;
    margin-bottom: 2rem;
}

header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0;
}

.subtitle {
    color: var(--text-color);
    font-size: 1.1rem;
    opacity: 0.8;
}

main {
    background: var(--white);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    margin-bottom: 2rem;
}

.filters {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-color);
    border-radius: 0.5rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--dark-color);
}

.filter-group select,
.filter-group input {
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.3s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    padding: 1.5rem;
    border-radius: 0.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

#currentFreqCard {
    background: linear-gradient(135deg, #f59e0b 0%, #ea580c 100%);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

#currentFreqDisplay {
    font-size: 1.8rem;
    word-break: break-word;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

.band-list {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.band-card {
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    transition: all 0.3s;
}

.band-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.band-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.band-frequency {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-radioamatoriale {
    background: #dbeafe;
    color: #1e40af;
}

.badge-libero {
    background: #d1fae5;
    color: #065f46;
}

.badge-licenziato {
    background: #fef3c7;
    color: #92400e;
}

.badge-riservato {
    background: #fee2e2;
    color: #991b1b;
}

.band-assignment {
    font-size: 1.1rem;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.band-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #6b7280;
    font-weight: 600;
}

.detail-value {
    font-size: 1rem;
    color: var(--dark-color);
}

.specific-frequency-info {
    background: #fef3c7;
    padding: 0.75rem;
    border-radius: 0.5rem;
    margin: 0.5rem 0;
    border-left: 4px solid #f59e0b;
}

.modes-display {
    font-weight: 600;
    color: var(--primary-color);
}

.countries {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.country-tag {
    background: var(--light-color);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
}

/* Frequency page specific styles */
.frequency-page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid var(--border-color);
}

.frequency-page-header h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.channel-info {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    padding: 0.75rem;
    background: linear-gradient(135deg, #e0e7ff 0%, #ddd6fe 100%);
    border-radius: 0.5rem;
}

.frequency-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.nav-button {
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: var(--white);
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: var(--shadow);
}

.nav-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.nav-button:active {
    transform: translateY(0);
}

.prev-button {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.next-button {
    background: linear-gradient(135deg, #8b5cf6 0%, #a855f7 100%);
}

.transmission-status {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-top: 1rem;
}

.status-question {
    margin-bottom: 1rem;
}

.status-question h3 {
    color: var(--dark-color);
    font-size: 1.3rem;
    text-align: center;
}

.status-answer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    font-size: 1.5rem;
    font-weight: bold;
}

.status-icon {
    font-size: 3rem;
}

.status-text {
    font-size: 2rem;
}

.status-reason {
    text-align: center;
    padding: 1rem;
    margin-top: 0.5rem;
    font-size: 1rem;
    line-height: 1.6;
}

/* Traffic light status colors */
.transmission-status.allowed {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid var(--success-color);
}

.transmission-status.allowed .status-text {
    color: #065f46;
}

.transmission-status.license-required {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 2px solid var(--warning-color);
}

.transmission-status.license-required .status-text {
    color: #92400e;
}

.transmission-status.forbidden {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 2px solid var(--danger-color);
}

.transmission-status.forbidden .status-text {
    color: #991b1b;
}

.transmission-status.unknown {
    background: linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%);
    border: 2px solid #9ca3af;
}

.transmission-status.unknown .status-text {
    color: #4b5563;
}

.legend {
    background: var(--light-color);
    padding: 1.5rem;
    border-radius: 0.5rem;
}

.legend h3 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

.legend-items {
    display: grid;
    gap: 0.75rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

footer {
    background: var(--white);
    padding: 2rem 0;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

footer p {
    margin-bottom: 0.5rem;
}

.disclaimer {
    font-size: 0.875rem;
    color: #6b7280;
}

.no-results {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
}

.no-results p {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

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

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

    .band-frequency {
        font-size: 1.25rem;
    }

    .stat-number {
        font-size: 2rem;
    }
}
