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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #555555 0%, #333333 100%);
    min-height: 100vh;
    padding: 0.5rem;
}

h1 {
    color: dimgrey;
    text-align: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.container {
    max-width: 70rem;
    margin: 0 auto;
    padding: 1.5rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

p {
    font-size: 1.1rem;
    color: #555;
    text-align: center;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #111;
}


nav {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 0.8rem;
    border-radius: 12px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    gap: 0.5rem;
}

nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #667eea;
    padding: 0.8rem 0.5rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    flex: 1;
    min-width: 70px;
    max-width: 90px;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

nav a i {
    font-size: 1.4rem;
    margin-bottom: 0.4rem;
}

nav a .nav-text {
    font-size: 0.75rem;
    text-align: center;
    font-weight: 600;
}

nav a:hover {
    background: #667eea;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

nav a.active {
    background: #667eea;
    color: white;
}


.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.8rem;
    margin: 1.5rem 0;
    justify-items: center;
}

.stat-card {
    background: white;
    padding: 1rem 0.5rem;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
    text-align: center;
    width: 100%;
    max-width: 120px;
    border: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    aspect-ratio: 1;
}

.stat-card h3 {
    font-size: 0.8rem;
    color: #555;
    margin-bottom: 0.5rem;
    font-weight: 600;
    line-height: 1.2;
}

.person-count {
    font-size: 1.4rem;
    font-weight: bold;
    color: #667eea;
    line-height: 1;
}

.history-list {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 10px;
    margin: 2rem 0;
    border-left: 4px solid #111;
}

.history-item {
    padding: 0.8rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.history-item:last-child {
    border-bottom: none;
}

.qr-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 2rem 0;
}

.qr-card {
    background: #f8f9fa;
    padding: 1.2rem;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #111;
    flex: 1 1 160px;
    max-width: 200px;
}

.btn {
    padding: 12px 24px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin: 5px;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    font-weight: 600;
    width: 100%;
}

.btn:hover {
    background: #5a6fd8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #666;
}

.btn-fjern {
    background: #dc3545 !important;
    padding: 8px 16px !important;
    font-size: 0.6rem !important;
}

.btn-fjern:hover {
    background: #c82333 !important;
}

/* Responsivitet for større skjermer */
@media screen and (min-width: 768px) {
    .container {
        padding: 2rem;
    }

    h1 {
        font-size: 2.5rem;
    }

    nav {
        padding: 1rem;
    }

    nav a {
        min-width: 80px;
        max-width: 100px;
        padding: 1rem 0.5rem;
    }

    nav a i {
        font-size: 1.6rem;
    }

    nav a .nav-text {
        font-size: 0.8rem;
    }

    /* OPPDATERT: Større firkanter på desktop */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.2rem;
        max-width: 600px;
        margin: 2rem auto;
    }

    .stat-card {
        max-width: 150px;
        padding: 1.2rem 0.8rem;
    }

    .stat-card h3 {
        font-size: 0.9rem;
    }

    .person-count {
        font-size: 1.8rem;
    }
}

/* OPPDATERT: Mobiloptimalisering med 3x2 grid */
@media screen and (max-width: 767px) {
    .container {
        margin: 0.25rem;
        padding: 1rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    nav a {
        min-width: 60px;
        max-width: 70px;
        padding: 0.6rem 0.3rem;
    }

    nav a i {
        font-size: 1.2rem;
    }

    nav a .nav-text {
        font-size: 0.65rem;
    }

    /* OPPDATERT: 3x2 grid på mobil */
    .stats-grid {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(2, auto);
        gap: 0.6rem;
        margin: 1rem 0;
    }

    .stat-card {
        max-width: 100px;
        padding: 0.8rem 0.4rem;
        min-height: 90px;
    }

    .stat-card h3 {
        font-size: 0.7rem;
        margin-bottom: 0.4rem;
    }

    .person-count {
        font-size: 1.2rem;
    }
}

/* OPPDATERT: Ekstra liten mobil */
@media screen and (max-width: 380px) {
    .stats-grid {
        gap: 0.4rem;
    }

    .stat-card {
        max-width: 90px;
        padding: 0.6rem 0.3rem;
        min-height: 80px;
    }

    .stat-card h3 {
        font-size: 0.65rem;
    }

    .person-count {
        font-size: 1.1rem;
    }
}

/* Legg til i CSS-filen */
.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.info-text {
    text-align: center;
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.btn-disabled {
    background: #6c757d !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-disabled:hover {
    transform: none !important;
    background: #6c757d !important;
}
/* Vær-spesifikke stiler */
.vaer-container {
    margin: 2rem 0;
}

.vaer-card {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    margin-bottom: 1.5rem;
}

.vaer-card h3 {
    color: #667eea;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vaer-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.8rem;
    max-height: 300px;
    overflow-y: auto;
}

.vaer-time {
    background: white;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.vaer-tid {
    font-weight: bold;
    color: #333;
    font-size: 0.9rem;
}

.vaer-temp {
    color: #667eea;
    font-weight: bold;
    font-size: 1.1rem;
}

.vaer-info {
    background: #e8f4fd;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #17a2b8;
}

.vaer-info h4 {
    color: #17a2b8;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.vaer-info p {
    margin: 0.5rem 0;
    text-align: left;
    background: none;
    border-left: none;
    padding: 0;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    margin: 2rem 0;
}

/* Responsivitet for vær-siden */
@media screen and (max-width: 768px) {
    .vaer-data {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .vaer-time {
        padding: 0.6rem;
    }

    .vaer-tid {
        font-size: 0.8rem;
    }

    .vaer-temp {
        font-size: 1rem;
    }
}

     .progress-container {
            width: 100%;
            background-color: #;
            border-radius: 5px;
            overflow: hidden;
        }

        .progress-bar {
            width: 0%;
            height: 30px;
            background-color: #4CAF50;
            text-align: center;
            line-height: 30px;
            color: white;
            border-radius: 5px;
            transition: width 0.5s ease-in-out; /* Smooth transition for updates */
        }

