/* naru.day — Sci-Fi Weather Station */
/* Palette */
:root {
    --deep-bg: #0D0618;
    --dark-violet: #1A0A2E;
    --muted-purple: #2A1040;
    --hot-pink: #FF69B4;
    --cyan: #00E5FF;
    --candy-yellow: #FFDD57;
    --lawn-green: #7CFC00;
    --white: #FFFFFF;
    --pale-violet: #D4C0E8;
    --error-red: #FF3B30;
    --drift-speed: 4s;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--pale-violet);
    background: var(--deep-bg);
    overflow-x: hidden;
}

/* Mountain Landscape Background */
#mountain-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.mountain-layer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 1.2s ease;
}

.mountain-layer.visible {
    opacity: 1;
}

.mountain-back {
    height: 45%;
    background: var(--deep-bg);
    clip-path: polygon(0% 100%, 0% 65%, 5% 55%, 12% 40%, 20% 50%, 28% 30%, 35% 45%, 42% 25%, 50% 35%, 58% 20%, 65% 38%, 72% 28%, 80% 42%, 88% 32%, 95% 48%, 100% 38%, 100% 100%);
    transition-delay: 0s;
}

.mountain-mid {
    height: 40%;
    background: var(--dark-violet);
    clip-path: polygon(0% 100%, 0% 70%, 8% 55%, 15% 45%, 22% 58%, 30% 35%, 38% 50%, 45% 30%, 52% 42%, 60% 28%, 68% 45%, 75% 35%, 82% 48%, 90% 38%, 100% 55%, 100% 100%);
    transition-delay: 0.3s;
}

.mountain-front {
    height: 35%;
    background: var(--muted-purple);
    clip-path: polygon(0% 100%, 0% 75%, 6% 60%, 14% 50%, 22% 62%, 30% 45%, 38% 55%, 46% 40%, 54% 52%, 62% 38%, 70% 50%, 78% 42%, 86% 55%, 94% 45%, 100% 60%, 100% 100%);
    transition-delay: 0.6s;
    filter: url(#noise-filter);
}

/* Noise filter for mountain front layer */
.mountain-front::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.15;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.02' numOctaves='3'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

/* Atmospheric Bubbles */
#bubbles-container {
    position: fixed;
    top: 0;
    left: 280px;
    width: calc(100% - 280px);
    height: 100%;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}

.bubble {
    position: absolute;
    border-radius: 50%;
    animation: bubble-drift var(--drift-speed) ease-in-out infinite;
}

.bubble-pink {
    background: rgba(255, 105, 180, 0.20);
}

.bubble-cyan {
    background: rgba(0, 229, 255, 0.15);
}

.bubble-yellow {
    background: rgba(255, 221, 87, 0.25);
}

@keyframes bubble-drift {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

/* Sidebar */
#sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    background: var(--dark-violet);
    border-right: 1px solid var(--hot-pink);
    z-index: 100;
    display: flex;
    flex-direction: column;
    transform: translateX(-280px);
    transition: transform 0.6s ease-out;
    overflow-y: auto;
}

#sidebar.visible {
    transform: translateX(0);
}

.sidebar-header {
    padding: 24px 20px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.domain-wordmark {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 24px;
    color: var(--white);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-toggle-btn {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.hamburger-line {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--white);
    transition: transform 0.3s ease;
}

.sidebar-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0 20px 20px;
}

/* Gauges */
.gauge-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
}

.gauge-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gauge-svg {
    width: 80px;
    height: 80px;
}

.gauge-bg {
    fill: none;
    stroke: var(--muted-purple);
    stroke-width: 5;
}

.gauge-progress {
    fill: none;
    stroke-width: 5;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 1.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gauge-pink {
    stroke: var(--hot-pink);
}

.gauge-cyan {
    stroke: var(--cyan);
}

.gauge-value {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -70%);
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.gauge-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--pale-violet);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* Sidebar Navigation */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 20px 0;
    border-top: 1px solid var(--muted-purple);
    margin-top: auto;
}

.nav-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    color: var(--pale-violet);
    letter-spacing: 0.04em;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 4px;
    transition: background 0.2s ease, color 0.2s ease;
}

.nav-label:hover {
    background: rgba(255, 105, 180, 0.1);
    color: var(--white);
}

.nav-label.active {
    background: rgba(255, 105, 180, 0.15);
    color: var(--hot-pink);
}

.nav-label.locked {
    cursor: not-allowed;
    opacity: 0.6;
}

.nav-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot-green {
    background: var(--lawn-green);
}

.dot-yellow {
    background: var(--candy-yellow);
}

.lock-icon {
    margin-left: auto;
}

.sidebar-footer {
    padding: 16px 0;
    border-top: 1px solid var(--muted-purple);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.station-id,
.coordinates {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--cyan);
    letter-spacing: 0.04em;
    opacity: 0.7;
}

/* Main Content */
#main-content {
    margin-left: 280px;
    padding: 48px 48px 80px;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

/* Report Cards */
.report-card {
    position: relative;
    background: rgba(42, 16, 64, 0.85);
    padding: 0;
    overflow: hidden;
}

/* Border animation elements */
.report-border-top,
.report-border-right,
.report-border-bottom,
.report-border-left {
    position: absolute;
    background: var(--cyan);
    z-index: 3;
}

.report-border-top {
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
}

.report-border-right {
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: top;
}

.report-border-bottom {
    bottom: 0;
    right: 0;
    height: 1px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: right;
}

.report-border-left {
    top: 0;
    left: 0;
    width: 1px;
    height: 100%;
    transform: scaleY(0);
    transform-origin: bottom;
}

.report-card.animate-border .report-border-top {
    animation: border-draw-h 0.3s ease forwards;
}

.report-card.animate-border .report-border-right {
    animation: border-draw-v 0.3s ease forwards;
    animation-delay: 0.3s;
}

.report-card.animate-border .report-border-bottom {
    animation: border-draw-h 0.3s ease forwards;
    animation-delay: 0.6s;
}

.report-card.animate-border .report-border-left {
    animation: border-draw-v 0.3s ease forwards;
    animation-delay: 0.9s;
}

@keyframes border-draw-h {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes border-draw-v {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

.report-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 24px;
    background: rgba(13, 6, 24, 0.6);
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.report-card.content-visible .report-header,
.report-card.content-visible .report-body {
    opacity: 1;
}

.report-number {
    font-family: 'Share Tech Mono', monospace;
    font-size: 14px;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.report-timestamp {
    font-family: 'Share Tech Mono', monospace;
    font-size: 12px;
    color: var(--pale-violet);
    letter-spacing: 0.04em;
    opacity: 0.7;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.lock-icon-header {
    margin-left: 8px;
}

.report-body {
    padding: 28px 24px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.report-title {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
    font-size: 28px;
    color: var(--white);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
    line-height: 1.3;
}

.report-text {
    font-family: 'Nunito', sans-serif;
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--pale-violet);
    margin-bottom: 24px;
}

.report-data-row {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

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

.data-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 11px;
    color: var(--pale-violet);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    opacity: 0.7;
}

.data-value {
    font-family: 'Share Tech Mono', monospace;
    font-size: 18px;
    color: var(--cyan);
    letter-spacing: 0.04em;
}

.pending-value {
    color: var(--candy-yellow);
}

.locked-value {
    color: var(--hot-pink);
}

.locked-text {
    opacity: 0.5;
    font-style: italic;
}

/* Report Pending */
.report-pending {
    opacity: 0.8;
}

/* Report Locked */
.report-locked {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Shake Error Animation */
@keyframes shake-error {
    0% { transform: translateX(0); }
    12% { transform: translateX(-8px); }
    25% { transform: translateX(8px); }
    37% { transform: translateX(-6px); }
    50% { transform: translateX(6px); }
    62% { transform: translateX(-3px); }
    75% { transform: translateX(3px); }
    100% { transform: translateX(0); }
}

.shake {
    animation: shake-error 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97);
}

.shake .report-border-top,
.shake .report-border-right,
.shake .report-border-bottom,
.shake .report-border-left {
    background: var(--error-red);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #sidebar {
        width: 100%;
        height: 56px;
        flex-direction: row;
        transform: translateY(-56px);
        border-right: none;
        border-bottom: 1px solid var(--hot-pink);
        overflow: visible;
    }

    #sidebar.visible {
        transform: translateY(0);
    }

    .sidebar-header {
        width: 100%;
        padding: 12px 20px;
        flex-direction: row;
        align-items: center;
    }

    .sidebar-toggle-btn {
        display: flex;
    }

    .sidebar-content {
        position: absolute;
        top: 56px;
        left: 0;
        width: 100%;
        background: var(--dark-violet);
        border-bottom: 1px solid var(--hot-pink);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        padding: 0 20px;
    }

    .sidebar-content.open {
        max-height: 600px;
        padding: 16px 20px;
    }

    .gauge-stack {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }

    .gauge-svg {
        width: 60px;
        height: 60px;
    }

    #main-content {
        margin-left: 0;
        margin-top: 56px;
        padding: 24px 16px 60px;
    }

    #bubbles-container {
        left: 0;
        width: 100%;
    }

    .mountain-back,
    .mountain-mid {
        display: none;
    }

    .report-title {
        font-size: 20px;
    }

    .report-data-row {
        gap: 16px;
    }

    .data-value {
        font-size: 15px;
    }
}

@media (max-width: 480px) {
    .domain-wordmark {
        font-size: 18px;
    }

    .report-body {
        padding: 20px 16px;
    }

    .report-header {
        padding: 10px 16px;
        gap: 8px;
    }
}
