/* style.css – mobil-first, ren och touchvänlig */

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: linear-gradient(145deg, #f0f4ff 0%, #d9e2f0 100%);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem;
}

#app {
  max-width: 480px;
  width: 100%;
  margin: 0 auto;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  border-radius: 32px;
  padding: 1.5rem 1.2rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Header */
header h1 {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 700;
  color: #1a2b4a;
  margin-bottom: 0.5rem;
}

/* Klocka & Datum */
#time-section {
  text-align: center;
  margin: 0.8rem 0 1.5rem;
}

#clock {
  font-size: 3.2rem;
  font-weight: 300;
  letter-spacing: 4px;
  color: #1a2b4a;
  transition: all 0.1s;
}

#date {
  font-size: 1.2rem;
  color: #3a4f6a;
  margin-top: 0.3rem;
}

/* Dagens väder */
#today-weather {
  background: white;
  border-radius: 24px;
  padding: 1.2rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

#today-weather h2 {
  font-size: 1.1rem;
  color: #2c3e5a;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#today-details {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#today-icon {
  font-size: 3rem;
  margin-bottom: 0.2rem;
}

#today-temp {
  font-size: 2.8rem;
  font-weight: 600;
  color: #1a2b4a;
}

#today-desc {
  font-size: 1rem;
  color: #4a5f7a;
  margin: 0.2rem 0;
}

#today-extra {
  font-size: 0.9rem;
  color: #6a7f9a;
  margin-top: 0.3rem;
}

/* Prognos */
#forecast h2 {
  font-size: 1.1rem;
  color: #2c3e5a;
  margin-bottom: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

#forecast-cards {
  display: flex;
  overflow-x: auto;
  gap: 0.8rem;
  padding-bottom: 0.5rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.forecast-card {
  flex: 0 0 120px;
  background: white;
  border-radius: 20px;
  padding: 1rem 0.6rem;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  scroll-snap-align: start;
  transition: transform 0.2s;
}

.forecast-card:active {
  transform: scale(0.95);
}

.forecast-card .day {
  font-weight: 600;
  font-size: 1rem;
  color: #1a2b4a;
}

.forecast-card .date-small {
  font-size: 0.75rem;
  color: #6a7f9a;
  margin-bottom: 0.3rem;
}

.forecast-card .icon {
  font-size: 2rem;
  margin: 0.2rem 0;
}

.forecast-card .temp {
  font-size: 1.1rem;
  font-weight: 500;
  color: #1a2b4a;
}

.forecast-card .precip {
  font-size: 0.8rem;
  color: #6a7f9a;
}

/* Uppdatera-knapp */
#refresh-btn {
  display: block;
  width: 100%;
  padding: 1rem;
  margin-top: 1rem;
  border: none;
  border-radius: 50px;
  background: #1a2b4a;
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  touch-action: manipulation;
}

#refresh-btn:active {
  background: #0f1f33;
  transform: scale(0.97);
}

/* Scrollbar styling */
#forecast-cards::-webkit-scrollbar {
  height: 4px;
}

#forecast-cards::-webkit-scrollbar-thumb {
  background: #b0c4de;
  border-radius: 10px;
}

#forecast-cards::-webkit-scrollbar-track {
  background: transparent;
}
