/* ============ GLOBAL STYLES ============ */
body {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;
    background-color: #000;
    color: #fff;
    font-family: Arial, sans-serif;
    overflow-y: auto;
}
/* ============ HEADER & FOOTER ============ */
header, footer {
    width: 100%;
    text-align: center;
    background-color: #333;
    padding: 1rem 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}
header h1 {
    margin: 0;
    font-size: 2.5rem;
}
.christmas-decoration {
    height: 60px;
    width: auto;
    animation: gentle-spin 20s linear infinite;
}
.christmas-decoration-right {
    animation: gentle-spin-right 20s linear infinite;
}
@keyframes gentle-spin {
    0%, 100% { transform: rotate(-5deg); }
    50% { transform: rotate(5deg); }
}
@keyframes gentle-spin-right {
    0%, 100% { transform: scaleX(-1) rotate(-5deg); }
    50% { transform: scaleX(-1) rotate(5deg); }
}
footer {
    display: block;
}
footer p {
    margin: 0;
}
/* ============ VIDEO ============ */
video {
    width: 100%;
    max-width: 800px;
    height: auto;
    margin-top: 1rem;
    margin-bottom: 1rem;
    z-index: 10;
    position: relative;
}
/* ============ MAIN CONTENT ============ */
main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    z-index: 10;
    position: relative;
    overflow-y: auto;
}
.content {
    max-width: 800px;
    text-align: left;
    padding: 1rem;
    z-index: 10;
    position: relative;
    background-color: black;
    opacity: 0.9;
}
.content h2 {
    font-size: 2rem;
    margin-top: 1.5rem;
}
.content p {
    font-size: 1.2rem;
    line-height: 1.5;
}
/* ============ BACKGROUND CANVAS (MATRIX/SNOW) ============ */
#background-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
/* Legacy support for old #matrix ID */
#matrix {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}
/* ============ TEMPERATURE WIDGET ============ */
.temp-widget {
    width: 100%;
    max-width: 800px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid #0F0;
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 2rem;
    z-index: 10;
    position: relative;
    box-sizing: border-box;
}
.temp-widget h2 {
    text-align: center;
    color: #fff;
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}
.current-temp {
    text-align: center;
    font-size: 2.5em;
    margin: 0.5rem 0;
    color: #fff;
}
.chart-container {
    background: rgba(20, 20, 20, 0.9);
    border-radius: 8px;
    padding: 15px;
}
.last-updated {
    text-align: center;
    color: #666;
    margin-top: 10px;
    font-size: 0.9rem;
}
.temp-error {
    background: #ff4444;
    color: white;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    display: none;
}
/* ============ STATUS WIDGET ============ */
.status-widget {
    background-color: rgba(0, 50, 0, 0.3);
    border: 1px solid #0F0;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}
.status-widget h3 {
    margin: 0 0 0.5rem 0;
    color: #0F0;
    font-size: 1.3rem;
    text-align: center;
}
.status-content {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem;
    border-radius: 5px;
    min-height: 50px;
    color: #fff;
    font-size: 1rem;
    line-height: 1.6;
    white-space: pre-wrap;
}
.status-content .loading {
    text-align: center;
    color: #666;
    font-style: italic;
}
.status-content .error {
    color: #ff4444;
    text-align: center;
}

/* ============ VISITOR COUNTER WIDGET ============ */
.visitor-counter {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid #0F0;
    border-radius: 10px;
    padding: 1rem;
    min-width: 200px;
    z-index: 1000;
    box-sizing: border-box;
}

.visitor-counter h3 {
    color: #0F0;
    font-size: 1rem;
    margin: 0 0 1rem 0;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.live-count {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 1rem;
    justify-content: center;
}

.pulse-dot {
    width: 12px;
    height: 12px;
    background: #0F0;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 5px #0F0;
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
        box-shadow: 0 0 15px #0F0;
    }
}

.count-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
}

.count-label {
    font-size: 0.75rem;
    color: #999;
}

.visitor-stats {
    border-top: 1px solid rgba(0, 255, 0, 0.3);
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
}

.stat-label {
    color: #999;
}

.stat-value {
    font-weight: bold;
    color: #fff;
}

/* Responsiv for mobile */
@media (max-width: 768px) {
    .visitor-counter {
        top: 10px;
        right: 10px;
        min-width: 140px;
        padding: 0.5rem;
    }
    
    .visitor-counter h3 {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .live-count {
        margin-bottom: 0.5rem;
    }
    
    .count-number {
        font-size: 1.3rem;
    }
    
    .count-label {
        font-size: 0.65rem;
    }
    
    .visitor-stats {
        padding-top: 0.5rem;
        margin-top: 0.5rem;
    }
    
    .stat-item {
        font-size: 0.7rem;
        margin-bottom: 0.3rem;
    }
    
    /* Skjul IP-adresse på mobil */
    .stat-item:last-child {
        display: none;
    }
}

/* ============ NAVIGATION ============ */
.main-nav {
    width: 100%;
    background-color: rgba(0, 50, 0, 0.3);
    border-bottom: 1px solid #0F0;
    padding: 0.75rem 0;
    text-align: center;
    z-index: 10;
    position: relative;
}

.nav-link {
    color: #0F0;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    margin: 0 0.5rem;
    border-radius: 5px;
    transition: all 0.3s;
    display: inline-block;
}

.nav-link:hover {
    background: rgba(0, 255, 0, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 0, 0.3);
}

@media (max-width: 768px) {
    .nav-link {
        font-size: 0.9rem;
        padding: 0.4rem 1rem;
        margin: 0 0.25rem;
    }
}
