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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background-image: url('vattentornet.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
    min-height: 100vh;
    padding: 20px;
    color: #333;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(2px);
    z-index: -1;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
}

header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.back-button {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: white;
    font-size: 1.5rem;
}

.back-button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.last-updated {
    font-size: 0.85rem;
    opacity: 0.95;
}

/* Cards */
.weather-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.card-header {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section titles */
.section-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Toggle switch */
.toggle-container {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    overflow-x: auto;
}

.toggle-switch {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 5px;
    display: inline-flex;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.toggle-button {
    background: transparent;
    border: none;
    padding: 10px 15px;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    transition: all 0.3s ease;
    white-space: nowrap;
    min-width: 80px;
    text-align: center;
}

.toggle-button.active {
    background: linear-gradient(135deg, #007A3D 0%, #005028 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 61, 0.3);
}

.toggle-button:hover:not(.active) {
    background: rgba(0, 122, 61, 0.1);
}

@media (min-width: 768px) {
    .toggle-button {
        padding: 12px 25px;
        font-size: 1rem;
        min-width: 100px;
    }
}

/* Loading and errors */
.loading {
    text-align: center;
    padding: 60px;
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.error {
    background: rgba(255, 59, 48, 0.95);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
}

/* Detail cards */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.detail-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
}

.detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.detail-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.detail-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.detail-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.detail-subtext {
    font-size: 0.75rem;
    color: #888;
}

/* Charts */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.chart-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.chart-header {
    font-size: 1rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.chart-container {
    position: relative;
    height: 250px;
}

/* Hourly forecast */
.hourly-forecast {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    margin-bottom: 30px;
    overflow: hidden;
}

.hourly-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    padding: 15px 0;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

.hourly-scroll::-webkit-scrollbar {
    height: 8px;
}

.hourly-scroll::-webkit-scrollbar-track {
    background: rgba(0, 122, 61, 0.1);
    border-radius: 10px;
}

.hourly-scroll::-webkit-scrollbar-thumb {
    background: rgba(0, 122, 61, 0.5);
    border-radius: 10px;
}

.hour-item {
    min-width: 80px;
    text-align: center;
    padding: 12px;
    background: rgba(0, 122, 61, 0.08);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.hour-item:hover {
    background: rgba(0, 122, 61, 0.15);
    transform: translateY(-3px);
}

.hour-time {
    font-size: 0.85rem;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.hour-icon {
    font-size: 2rem;
    margin: 8px 0;
}

.hour-temp {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.hour-wind {
    font-size: 0.75rem;
    color: #666;
}

/* Content visibility */
.view-content {
    display: none;
}

.view-content.active {
    display: block;
}

/* Responsive */
@media (min-width: 768px) {
    body {
        padding: 20px;
    }

    .charts-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chart-container {
        height: 300px;
    }

    .details-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 1200px) {
    .charts-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .details-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}
    .install-btn {
    position: fixed;
    top: 20px;              /* Flyttad till toppen */
    right: 20px;            /* Höger hörn */
    padding: 12px 18px;     /* Större knapp */
    background: rgba(255, 255, 255, 0.95);  /* Mer synlig */
    backdrop-filter: blur(10px);
    border: 2px solid rgba(0, 122, 61, 0.3);  /* Grön ram */
    border-radius: 12px;    /* Rundad men inte cirkel */
    color: #007A3D;         /* Grön färg */
    cursor: pointer;
    font-size: 14px;        /* Större text */
    font-weight: 600;
    opacity: 0.9;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 6px;
}

    .install-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 1);
    box-shadow: 0 6px 16px rgba(0, 122, 61, 0.2);
}
/* Om-länk */
.about-link {
    text-align: center;
    margin-top: 25px;
    padding-bottom: 40px;
}

.about-link a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 8px;
    display: inline-block;
}

.about-link a:hover {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.1);
}
/* iOS Modal Styling */
.ios-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    justify-content: center;
    align-items: flex-end;
    padding-bottom: 80px; /* Placeras ovanför Safaris meny */
}

.ios-modal-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    width: 90%;
    max-width: 400px;
    position: relative;
    color: #333;
    text-align: left;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.3);
}

.close-ios {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #888;
}

.ios-modal-content h3 { margin-top: 0; color: #000; }
.ios-modal-content ol { padding-left: 20px; line-height: 1.6; }

/* En liten pil som pekar ner mot Dela-knappen */
.ios-arrow {
    width: 0; height: 0; 
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-top: 15px solid #fff;
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
}