/* =========================================================
   NAVTEX SIMULATOR — STYLES
========================================================= */

:root {
    --bg: #030807;
    --bg-soft: #06100e;
    --panel: #071310;
    --panel-2: #0a1815;
    --mint: #00d8c3;
    --mint-light: #1cebd7;
    --mint-soft: rgba(0, 216, 195, 0.10);
    --mint-border: rgba(0, 216, 195, 0.25);
    --white: #eefaf7;
    --text: #d7e8e4;
    --muted: #76908b;
    --border: rgba(135, 220, 207, 0.12);
    --danger: #ff5f5f;
    --radius: 18px;
    --max-width: 1280px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(
            circle at 50% -20%,
            rgba(0, 216, 195, 0.08),
            transparent 40%
        ),
        var(--bg);
    color: var(--text);
    font-family: "Inter", sans-serif;
    overflow-x: hidden;
}

/* Background */
.background-grid {
    position: fixed;
    inset: 0;
    pointer-events: none;
    opacity: 0.18;
    background-image:
        linear-gradient(rgba(0, 216, 195, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 216, 195, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    mask-image: linear-gradient(to bottom, black, transparent 85%);
    z-index: -3;
}

.background-glow {
    position: fixed;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 216, 195, 0.06), transparent 65%);
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: -2;
}

.page-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0;
    background: var(--mint);
    box-shadow: 0 0 12px var(--mint);
    z-index: 9999;
}

/* Header */
.topbar {
    width: 100%;
    height: 78px;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: rgba(3, 8, 7, 0.84);
    backdrop-filter: blur(18px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 40px;
    height: 40px;
    border: 1px solid var(--mint-border);
    background: var(--mint-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--mint);
    border-radius: 10px;
    box-shadow: inset 0 0 20px rgba(0,216,195,0.04);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-main {
    color: var(--white);
    font-family: "Rajdhani", sans-serif;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.brand-sub {
    margin-top: 4px;
    color: var(--mint);
    font-size: 9px;
    letter-spacing: 0.2em;
    font-weight: 700;
}

.navigation {
    display: flex;
    gap: 32px;
}

.nav-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.15em;
    position: relative;
    transition: 0.25s;
}

.nav-link:hover,
.nav-link.active {
    color: var(--mint);
}

.nav-link.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -12px;
    height: 1px;
    background: var(--mint);
    box-shadow: 0 0 10px var(--mint);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 8px var(--mint);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Main Content */
main {
    position: relative;
}

/* Hero Section */
.hero {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 110px 28px 80px;
}

.hero-content {
    max-width: 850px;
    margin-bottom: 55px;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mint);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.22em;
    margin-bottom: 18px;
}

.eyebrow span {
    width: 25px;
    height: 1px;
    background: var(--mint);
    box-shadow: 0 0 10px var(--mint);
}

.hero h1 {
    font-family: "Rajdhani", sans-serif;
    font-size: clamp(64px, 10vw, 130px);
    line-height: 0.82;
    font-weight: 700;
    letter-spacing: -0.04em;
    color: var(--white);
}

.hero h1 span {
    color: var(--mint);
    display: inline-block;
}

.hero-description {
    margin-top: 32px;
    max-width: 650px;
    color: var(--muted);
    line-height: 1.8;
    font-size: 15px;
}

/* Device Panel */
.device-panel {
    padding: 28px;
    border: 1px solid var(--border);
    background: linear-gradient(145deg, rgba(8, 22, 18, 0.95), rgba(4, 12, 10, 0.98));
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0,0,0,0.35);
    position: relative;
    overflow: hidden;
}

.device-panel::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--mint), transparent);
    opacity: 0.6;
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 28px;
}

.panel-kicker {
    color: var(--mint);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.2em;
    margin-bottom: 5px;
}

.panel-header h2 {
    color: var(--white);
    font-family: "Rajdhani", sans-serif;
    font-size: 32px;
    letter-spacing: 0.03em;
}

.device-id {
    color: var(--muted);
    font-family: "Rajdhani", sans-serif;
    font-size: 12px;
    letter-spacing: 0.12em;
}

.device-id span {
    color: var(--mint);
}

/* Device Display */
.device-display {
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--mint-border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 24px;
    box-shadow: inset 0 0 20px rgba(0, 216, 195, 0.02);
}

.display-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--mint-border);
}

.display-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.display-label {
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.display-value {
    color: var(--mint);
    font-family: "Courier Prime", monospace;
    font-size: 16px;
    font-weight: 700;
}

.display-screen {
    background: #000;
    border: 2px solid var(--mint);
    border-radius: 8px;
    padding: 24px;
    min-height: 280px;
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 16px;
    position: relative;
    box-shadow:
        inset 0 0 20px rgba(0, 216, 195, 0.1),
        0 0 20px rgba(0, 216, 195, 0.05);
}

.screen-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--muted);
    text-align: center;
}

.screen-placeholder i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.screen-placeholder p {
    font-size: 14px;
    line-height: 1.6;
}

.screen-content {
    color: var(--mint);
    font-family: "Courier Prime", monospace;
    font-size: 12px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    text-align: left;
}

.display-status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.status-indicator {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--mint);
    box-shadow: 0 0 6px var(--mint);
    animation: pulse 1.5s infinite;
}

/* Controls */
.device-controls {
    margin: 24px 0;
    padding: 24px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.control-group {
    margin-bottom: 20px;
}

.control-group:last-child {
    margin-bottom: 0;
}

.control-group label {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.18em;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.area-input {
    width: 100%;
    max-width: 100px;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--mint-border);
    border-radius: 8px;
    color: var(--mint);
    font-family: "Rajdhani", monospace;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    transition: 0.25s;
}

.area-input:focus {
    outline: none;
    border-color: var(--mint);
    box-shadow: 0 0 12px rgba(0, 216, 195, 0.3);
    background: rgba(0, 216, 195, 0.08);
}

.area-input::placeholder {
    color: rgba(0, 216, 195, 0.4);
}

.input-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: 9px;
    opacity: 0.7;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
    gap: 8px;
}

.area-btn {
    padding: 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text);
    font-family: "Rajdhani", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    cursor: pointer;
    transition: 0.25s;
}

.area-btn:hover {
    border-color: var(--mint-border);
    background: var(--mint-soft);
    color: var(--mint);
}

.area-btn.active {
    background: var(--mint);
    border-color: var(--mint);
    color: #00110e;
    box-shadow: 0 0 12px rgba(0, 216, 195, 0.4);
}

/* Action Buttons */
.device-actions {
    display: flex;
    gap: 12px;
    margin: 24px 0;
    flex-wrap: wrap;
}

.action-btn {
    flex: 1;
    min-width: 140px;
    padding: 14px 20px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: 0.25s;
}

.action-btn:hover {
    background: var(--mint-soft);
    border-color: var(--mint-border);
    color: var(--mint);
}

.action-btn.primary {
    background: var(--mint);
    border-color: var(--mint);
    color: #00110e;
    box-shadow: 0 0 20px rgba(0, 216, 195, 0.2);
}

.action-btn.primary:hover {
    background: var(--mint-light);
    box-shadow: 0 0 30px rgba(0, 216, 195, 0.3);
}

.action-btn.secondary {
    color: var(--danger);
    border-color: rgba(255, 95, 95, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(255, 95, 95, 0.1);
    border-color: rgba(255, 95, 95, 0.5);
}

.action-btn.tertiary {
    color: var(--muted);
}

/* Disclaimer */
.device-disclaimer {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: rgba(255, 95, 95, 0.08);
    border: 1px solid rgba(255, 95, 95, 0.3);
    border-radius: 10px;
    color: #ffa0a0;
    font-size: 11px;
    line-height: 1.6;
}

.device-disclaimer i {
    flex-shrink: 0;
    margin-top: 2px;
}

.device-disclaimer strong {
    display: block;
    margin-bottom: 4px;
    color: #ff7f7f;
}

.device-disclaimer p {
    margin: 4px 0;
}

/* Messages Section */
.messages-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 28px;
}

.section-heading {
    margin-bottom: 40px;
}

.section-heading .eyebrow {
    margin-bottom: 18px;
}

.section-heading h2 {
    color: var(--white);
    font-family: "Rajdhani", sans-serif;
    font-size: 42px;
    line-height: 1.1;
}

.messages-grid {
    display: grid;
    gap: 24px;
}

.message-card {
    padding: 24px;
    border: 1px solid var(--border);
    background: rgba(7, 19, 16, 0.5);
    border-radius: 12px;
    transition: 0.25s;
}

.message-card:hover {
    background: rgba(7, 19, 16, 0.8);
    border-color: var(--mint-border);
}

.message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border);
}

.message-area {
    font-family: "Rajdhani", sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--mint);
}

.message-time {
    font-size: 10px;
    color: var(--muted);
}

.message-type {
    display: inline-block;
    padding: 4px 8px;
    background: var(--mint-soft);
    border: 1px solid var(--mint-border);
    border-radius: 4px;
    color: var(--mint);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.1em;
}

.message-content {
    color: var(--text);
    font-family: "Courier Prime", monospace;
    font-size: 11px;
    line-height: 1.6;
    white-space: pre-wrap;
    word-wrap: break-word;
    margin: 12px 0;
}

.no-messages {
    text-align: center;
    padding: 60px 20px;
    color: var(--muted);
}

.no-messages i {
    font-size: 48px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.no-messages p {
    font-size: 14px;
}

/* Info Section */
.info-section {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 80px 28px;
}

.info-card {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
    padding: 40px;
    border: 1px solid var(--border);
    background: rgba(7, 19, 16, 0.3);
    border-radius: var(--radius);
}

.info-number {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--mint-soft);
    border: 1px solid var(--mint-border);
    border-radius: 12px;
    font-family: "Rajdhani", sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--mint);
}

.info-card h2 {
    color: var(--white);
    font-family: "Rajdhani", sans-serif;
    font-size: 28px;
    margin-bottom: 16px;
}

.info-card p {
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 12px;
}

.sources-card {
    padding: 40px;
    border: 1px solid var(--mint-border);
    background: var(--mint-soft);
    border-radius: var(--radius);
}

.sources-title {
    color: var(--mint);
    font-family: "Rajdhani", sans-serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 20px;
}

.sources-list {
    display: grid;
    gap: 12px;
}

.sources-list a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px;
    background: rgba(0, 216, 195, 0.1);
    border-radius: 8px;
    color: var(--mint);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.25s;
}

.sources-list a:hover {
    background: rgba(0, 216, 195, 0.2);
    transform: translateX(4px);
}

.sources-list i {
    font-size: 10px;
}

/* Footer */
footer {
    border-top: 1px solid var(--border);
    padding: 40px 28px;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

footer div {
    margin-bottom: 8px;
}

footer strong {
    color: var(--white);
    font-weight: 700;
}

/* Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Print Styles */
@media print {
    * {
        background: transparent !important;
        color: #000 !important;
        text-shadow: none !important;
        box-shadow: none !important;
        border: none !important;
    }

    body {
        background: white;
        color: black;
        font-family: "Courier Prime", monospace;
    }

    .topbar,
    .hero-content,
    .panel-header,
    .device-display,
    .device-controls,
    .device-actions,
    .device-disclaimer,
    .messages-section,
    .info-section,
    footer,
    .page-progress,
    .background-grid,
    .background-glow,
    nav,
    .nav-link {
        display: none !important;
    }

    .print-content {
        padding: 0;
        margin: 0;
    }

    .print-header {
        text-align: center;
        margin-bottom: 20px;
        border-bottom: 2px solid black;
        padding-bottom: 10px;
    }

    .print-header h1 {
        font-size: 20px;
        margin: 0;
        font-weight: bold;
    }

    .print-header p {
        font-size: 11px;
        margin: 5px 0 0 0;
    }

    .print-message {
        page-break-inside: avoid;
        margin-bottom: 20px;
        white-space: pre-wrap;
        font-size: 11px;
        line-height: 1.4;
    }

    .print-footer {
        margin-top: 30px;
        text-align: center;
        font-size: 10px;
        border-top: 1px solid black;
        padding-top: 10px;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .display-header {
        grid-template-columns: 1fr 1fr;
    }

    .device-actions {
        flex-direction: column;
    }

    .action-btn {
        width: 100%;
    }

    .area-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .info-card {
        flex-direction: column;
        gap: 20px;
    }

    .panel-header {
        flex-direction: column;
        gap: 12px;
    }
}