:root {
    --primary-color: #d32f2f;
    /* Signal Red */
    --secondary-color: #1976d2;
    /* Trustworthy Blue */
    --bg-color: #121212;
    /* Dark Background */
    --surface-color: #1e1e1e;
    /* Card Background */
    --text-color: #e0e0e0;
    /* Light Text */
    --text-muted: #a0a0a0;
    --accent-color: #ff5252;
    --font-main: 'Roboto', sans-serif;
    --font-mono: 'Roboto Mono', monospace;
    --warning-color: #ffcc00;
}

/* Custom Scrollbar for modern look */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Hero Section */
.hero {
    position: relative;
    height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at center, #2c3e50 0%, #000000 100%);
    overflow: hidden;
    border-bottom: 4px solid var(--primary-color);
}

/* Abstract Background Pattern */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 100%;
    /* Ensure container takes full width for positioning context */
}

.pmr-radio-container {
    position: absolute;
    top: -60px;
    /* Move it up into the corner relative to content or hero */
    right: 0;
    max-width: 80px;
    /* Much smaller */
    opacity: 0.8;
}

/* On mobile, maybe keep it smaller or hide it if it overlaps? 
   Let's keep it but ensure it doesn't break layout */
@media (max-width: 768px) {
    .pmr-radio-container {
        position: relative;
        top: 0;
        right: 0;
        margin: 0 auto 20px auto;
        opacity: 1;
    }
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero .subtitle {
    font-size: 1.5rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    font-family: var(--font-mono);
}

/* Signal Icon Animation */
.signal-icon {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 60px;
    gap: 5px;
    margin-bottom: 20px;
}

.bar {
    width: 10px;
    background-color: var(--text-muted);
    border-radius: 2px;
    animation: signal-pulse 1.5s infinite ease-in-out;
}

.bar-1 {
    height: 20%;
    animation-delay: 0s;
}

.bar-2 {
    height: 40%;
    animation-delay: 0.2s;
}

.bar-3 {
    height: 60%;
    animation-delay: 0.4s;
}

.bar-4 {
    height: 80%;
    animation-delay: 0.6s;
    background-color: var(--accent-color);
    box-shadow: 0 0 10px var(--accent-color);
}

@keyframes signal-pulse {

    0%,
    100% {
        opacity: 0.5;
        transform: scaleY(1);
    }

    50% {
        opacity: 1;
        transform: scaleY(1.1);
    }
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    border: 2px solid var(--primary-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--primary-color);
    box-shadow: 0 0 15px rgba(211, 47, 47, 0.4);
}

/* Sections */
section {
    padding: 80px 0;
}

.intro {
    text-align: center;
}

.intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--accent-color);
}

.lead {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

/* Emergency Channel Card */
.emergency-channel {
    display: flex;
    justify-content: center;
}

.channel-card {
    background-color: var(--surface-color);
    border: 1px solid #333;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    max-width: 500px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.channel-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
}

.channel-header {
    background-color: var(--primary-color);
    padding: 20px;
    text-align: center;
}

.channel-header h3 {
    margin: 0;
    color: white;
    font-size: 1.5rem;
    text-transform: uppercase;
}

.channel-body {
    padding: 40px;
    text-align: center;
}

.channel-number {
    font-size: 8rem;
    font-weight: 900;
    line-height: 1;
    color: var(--text-color);
    margin-bottom: 20px;
    font-family: var(--font-mono);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.channel-body strong {
    color: var(--accent-color);
}

footer {
    background-color: #000;
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid #333;
    margin-top: 50px;
}

footer p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 10px;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ... existing styles ... */

/* Navigation */
.navbar {
    background-color: #000;
    border-bottom: 1px solid #333;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--text-color);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--primary-color);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
}

.nav-links li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: color 0.3s;
    text-transform: uppercase;
}

.nav-links li a:hover,
.nav-links li a.active {
    color: var(--primary-color);
}

/* Page Content */
.page-content {
    padding: 60px 20px;
    min-height: 60vh;
}

.page-content h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

/* Text & Lists */
.rules-list {
    margin-left: 20px;
    margin-top: 20px;
}

.rules-list li {
    margin-bottom: 15px;
    padding-left: 10px;
}

/* Alert Box */
.alert-box {
    background-color: rgba(211, 47, 47, 0.15);
    border-left: 5px solid var(--primary-color);
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.equip-card {
    background-color: var(--surface-color);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #333;
}

.equip-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

/* Tables */
.equipment-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    background-color: var(--surface-color);
}

.equipment-table th,
.equipment-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

.equipment-table th {
    background-color: #1a1a1a;
    color: var(--primary-color);
}

.prio-high {
    color: var(--accent-color);
    font-weight: bold;
}

.prio-med {
    color: orange;
}

.prio-low {
    color: var(--text-muted);
}

/* Hamburger Menu Base Styles */
.hamburger {
    display: none;
}

.hamburger .bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}

/* Nav Buttons */
.nav-btn {
    border: none;
    background: none;
    color: var(--text-color);
    text-transform: uppercase;
    font-family: var(--font-main);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    padding: 8px 15px;
    border-radius: 4px;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
}

.nav-links li .nav-btn:hover {
    background-color: #333;
    color: white;
}

.warning-btn {
    background-color: #ffcc00;
    color: #000;
    margin-right: 10px;
}

.warning-btn:hover {
    background-color: #ffd700 !important;
    box-shadow: 0 0 15px rgba(255, 204, 0, 0.6);
    transform: scale(1.05);
}

.warning-btn {
    animation: pulse-warning 3s infinite;
}

@keyframes pulse-warning {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(255, 204, 0, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
    }
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--surface-color);
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #444;
    width: 90%;
    max-width: 700px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
}

.close-btn {
    color: var(--text-muted);
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover {
    color: var(--accent-color);
}

/* NINA Warnings Section */
.nina-section {
    background-color: #2c2c2c;
    /* Darker background to stand out */
    border-radius: 8px;
    padding: 30px;
    margin: 40px auto;
    max-width: 800px;
    border: 1px solid #444;
    text-align: center;
}

.nina-header h3 {
    color: #ffd700;
    /* Warning Yellow */
    margin-bottom: 5px;
}

.nina-header p {
    color: var(--text-muted);
    font-size: 0.9em;
    margin-bottom: 20px;
}

.nina-container {
    min-height: 50px;
}

.warning-item {
    background: #333;
    border-left: 5px solid #ccc;
    padding: 15px;
    margin-bottom: 10px;
    text-align: left;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border-radius: 4px;
}

.warning-item.safe {
    border-left-color: #4caf50;
    /* Green */
}

.warning-item.low {
    border-left-color: #ffeb3b;
    /* Yellow */
}

.warning-item.medium {
    border-left-color: #ff9800;
    /* Orange */
}

.warning-item.high,
.warning-item.severe {
    border-left-color: #f44336;
    /* Red */
}

.warning-icon {
    font-size: 1.5rem;
}

.warning-content strong {
    display: block;
    margin-bottom: 5px;
    color: #fff;
    font-size: 1.1rem;
}

.warning-details {
    font-size: 0.95rem;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.warning-link {
    font-size: 0.85rem;
    color: var(--secondary-color);
    text-decoration: none;
}

.warning-link:hover {
    text-decoration: underline;
}

.nina-footer {
    margin-top: 20px;
}

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 30px;
    color: var(--text-muted);
}

.loading-spinner::before {
    content: "";
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top: 4px solid var(--warning-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Nav */
@media (max-width: 768px) {
    .nav-container {
        /* Keep flex-direction: row; so logo and hamburger are side-by-side */
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 60px;
        /* Adjust based on navbar height */
        gap: 0;
        flex-direction: column;
        background-color: rgba(0, 0, 0, 0.95);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        z-index: 99;
        padding: 20px 0;
    }

    .nav-links .nav-btn {
        margin: 5px 0;
        width: 80%;
        text-align: center;
    }

    .warning-btn {
        margin-right: 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 15px 0;
    }

    .hamburger {
        display: block;
        cursor: pointer;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero h1 {
        font-size: 2rem;
    }

    .channel-number {
        font-size: 5rem;
    }

    section {
        padding: 50px 0;
    }
}