:root {
    --dark-bg: rgba(20,15,15,0.9);
    --card-bg: rgba(56,52,51,0.6);
    --text-color: #ffffff;
    --text-secondary: #8f9297;
    --primary-blue: #00a3ff;
    --app-gradient: linear-gradient(45deg, #00a3ff, #00e0ff);
    --rainy-gradient: linear-gradient(45deg, #0051ff, #00a3ff);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background-image: url('images/background.jpg'); 
    background-repeat: no-repeat; 
    background-attachment: fixed; 
    background-size: 100% 100%;
}

input[type=checkbox] {
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  position: relative;
  outline: none;
  width: 35px;
  height: 18px;
  top:4px; margin: 0px 0px 0px 5px;
  background-color: #fff;
  border: 1px solid gray;
  border-radius: 50px;
  box-shadow: inset -18px 0 0 0 #aaa;
}
input[type=checkbox]:after {
  content: "";
  position: absolute;
  top: 0px;
  left: 0px;
  background: transparent;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  box-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}
input[type=checkbox]:checked {
  box-shadow: inset 17px 0 0 0 rgb(189, 72, 14);
}
input[type=checkbox]:checked:after {
  left: 17px;
}
input[type=checkbox]::-ms-check {
  display: none;
}


.app-container {
    width: 97%;
    height: 95vh;
    background-color: var(--dark-bg);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    display: flex;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 80px;
    height: 100%;
    background-color: rgba(5,1,1,1.0);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    border-top-left-radius: 20px;
    border-bottom-left-radius: 20px;
}

.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 30px;
}

.nav-items {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    flex-grow: 1;
}

.nav-item {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
}

.nav-item.active {
    background-color: var(--card-bg);
    color: var(--primary-blue);
}

.nav-item:hover {
    color: var(--text-color);
    background-color: rgba(255,255,255,0.1);
}

.user-profile {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
}

.user-profile img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 20px;
    overflow-y: scroll;
    scrollbar-width: none;
    vertical-align:bottom;
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "title title"
        "current apps"
        "hourly hourly"
        "forecast map";
    gap: 10px;
}

.main-title {
    grid-area: title;
    margin: 0px;
    padding: 0px 10px;
}

/* Current Weather Card */
.current-weather-card {
    grid-area: current;
    background-color: var(--card-bg);
    border-radius: 20px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    position: relative;
    background-size: 210px;
    background-position: top left; /* Center the image */
    background-repeat: no-repeat; /* Do not repeat the image */
}

.current-weather {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-left:180px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.temperature {
    font-size: 50px;
    font-weight: 500;
    text-align: left;
    margin: 0px;
}

.temp-value {
    font-size: 50px;
    margin: 0px;
}

.temp-unit {
    font-size: 18px;
    vertical-align: top;
    margin: 0px;
}

.weather-description {
    font-size: 14px;
    color: var(--text-secondary);
    text-align: left;
    margin: 0px;
}

.location-info {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.location, .date-time {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
}

.location-asset {
    width: 100px;
    border-radius:5px;
}

.apps-section {
    grid-area: apps;
    padding: 0 0px;
}

.apps-section h2 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.apps-title {
    display:flex;
    align-items:center;    
}

.app-card {
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    height: 220px;
    display: flex;
    flex-direction: column;
}

.app-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-weight: bold;
}

.app-row {
    display: flex;
    flex-grow: 1;
    justify-content: center;
    align-items: center;
    justify-content:space-evenly;    
}

.app-block {
    display: inline-block;
    position: relative;
    width: 120px;
    height: 120px;
    margin: 2px 10px;
}    

.app-note {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    padding:10px 0;
}

.wind-canvas {
    position: absolute;
    top: 0px; left: 0px;
    background-image: url("images/compass.svg");
    background-position: center;
    background-size: 100% 100%;
    width: 100%; height: 100%;
}

.wind-value {
    position: absolute;
    top: 35%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
}

.wind-unit {
    position: absolute;
    top: 55%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.pressure-canvas {
    position: absolute;
    top: 0px; left: 0px;
    background-image: url("images/pressure.svg");
    background-position: center;
    background-size: 100% 100%;
    width: 100%; height: 100%;
}

.pressure-value {
    position: absolute;
    top: 20%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 22px;
}

.pressure-unit {
    position: absolute;
    top: 62%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.dust-block-tau {
    position:relative;
    padding:20px 0 5px 0;
    display:inline-block;
    white-space:nowrap;    
}

.dust-block {
    position:relative;
    padding:0 0 0 0;
    display:inline-block;
    white-space:nowrap;    
}

.dust-visibility {
    font-size:40px;
}

.dust-visibility-unit {
    position:absolute;
    top:45px; left:15px;
    font-size:12px;
    color: var(--text-secondary);
}

.globe-canvas {
    position: absolute;
    top: 0px; left: 0px;
    background-position: center;
    background-size: 100% 100%;
    width: 100%; height: 100%;
}

.globe-dot {
    position: absolute;
    top: 42px; left: 55px;
}

.sunset-canvas {
    position: absolute;
    top: 0px; left: 0px;
    background-position: center;
    background-size: 100% 100%;
    width: 100%; height: 100%;
    background-image:url('images/sunset.png');
}

.sun-time {
    position: absolute;
    top: 3%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 24px;
    font-weight:bold;
}

.sunset-time {
    position: absolute;
    top: 78%; left: 0;
    width: 100%;
    text-align: center;
    font-size: 12px;
}

.hourly-section {
    grid-area: hourly;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    height: 110px;
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

.hourly-block {
    font-size: 12px;
    display: inline-block;
    text-align:center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.forecast-section {
    grid-area: forecast;
    height: 400px;
    display: flex;
    flex-direction: column;
    align-items: top;
    overflow: hidden;
    min-width: 300px;
    gap: 5px;
}

.forecast-block {
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--card-bg);
    border-radius: 15px;
    padding: 10px;
    height: 76px;
    width: 100%;
    justify-content: space-evenly;
}

.forecast-day {
    height:100%;
    display:flex;
    align-items:center;
    padding:0 0 0 5px;
    font-size:14px;
    white-space: nowrap;
}

.forecast-symbol {
    height:100%;
    display:flex;
    align-items:center;
    padding:5px;    
}

.forecast-values {
    height:100%;
    min-width:110px;
    display:flex;
    align-items:flex-start;
    justify-content:space-evenly;
    flex-direction:column;
    font-size:14px;
    color:var(--text-secondary);
}

.forecast-temperature {
    position:relative;
    padding:0px;
    display:inline-block;
    white-space:nowrap;    
    align-items: center;
    width:120px;
}

.forecast-colorbar {
    width:110px;
    height:11px;
    border-radius:5px;
}

.topography { stroke: #ffffff; stroke-width: 1.25; fill: none; }
.graticule  { stroke: #707070; stroke-width: 1.00; fill: none; }

.map-section {
    grid-area: map;
    background-color: transparent;
    border-radius: 15px;
    padding: 0px;
    height: 400px;
    position: relative;
    overflow: hidden;
}

.window {
    display: none;
    position: absolute;
    width: 390px;
    height: 380px;
    background-color: rgba(5,1,1,1.0);
    z-index: 1001;
    box-shadow: 0px 0px 10px 0px #695f5d;
    border-radius: 5px;
}

.window-background {
    display: none;
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 1000;
}

.window-title {
    display: flex;
    height: 100%;
    height: 30px;
    padding: 5px 10px;
    background-color: #342721;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
    font-size: 14px;
}

.window-bottom {
    text-align:right;
    padding:10px 20px;
    height:50px;
    width:100%;
    background-color: #201c1a;
    border-bottom-left-radius: 5px;
    border-bottom-right-radius: 5px;    
}

.model-block {
    cursor:pointer;
    margin:10px 0;
    background-color:#764616; 
    border-radius:5px;
    padding:5px;
    font-size:14px;
    display:flex;
    flex-direction:row;
    align-items:center;    
}


button {
    border-radius: 15px;
    border:1px solid white;
    padding: 5px 20px 5px 20px;
    background:none;
    background-color: black;
    color:white;
    text-decoration:none;
    white-space:nowrap;
    text-align:center;
    margin:1px;
    font-size:12px;
    line-height:15px;
    outline:none;
    cursor: pointer;
}
button:hover {
    background-color: white;
    border:1px solid #aaa;
    color:black;
}

input {
    background-color: #444;
    color: white;
    border-radius: 10px;
    border:none;
    margin:1px;
    font-size:14px;
    padding: 5px 10px 5px 10px;
    line-height: 15px;
    box-shadow: 0 0 4px #bbb;
    outline:none;
}

select {
    background-image:linear-gradient(to bottom, rgb(200,100,50) 5%, rgb(100,50,25) 100%);
    border-radius: 10px;
    display: inline-block;
    font: inherit;
    font-size:14px;
    line-height: 15px;
    padding: 5px 10px 5px 10px;
    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    margin:1px;
    border:1px solid rgb(50,25,12);
    color:white;
    background-color: rgb(200,100,0);
    outline:none;
}
select::-ms-expand {
  display: none;
}


/* Responsive adjustments */
@media (max-width: 1100px) {
    .app-container {
        display: flex;
    }
    .main-content {
        grid-template-columns: 2 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "title title"
            "current forecast"
            "hourly hourly"
            "apps apps"
            "map map"
    }

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

@media (max-width: 800px) {
    .app-container {
        display: flex;
    }

    .main-content {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "title"
            "current"
            "hourly"
            "apps"
            "forecast"
            "map";
    }
        
    .apps-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

@media (max-width: 600px) {
    .app-container {
        display: block;
        overflow: visible;
        width: 100%;
        height: 100vh;
    }

    .main-content {
        height: 100%;
        margin: 0px;
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
        grid-template-areas:
            "title"
            "current"
            "hourly"
            "apps"
            "forecast"
            "map";
    }

    .sidebar {
        width: 100%;
        height: 70px;
        flex-direction: row;
        padding: 0 20px;
        border-radius: 0 0;
    }

    .logo-container {
        margin-bottom: 0;
        flex-direction: row;
        gap: 10px;
    }
    
    .nav-items {
        flex-direction: row;
        margin-left: 20px;
    }   
    
    .notification-icon, .user-profile {
        margin: 0 10px;
    }

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