@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@400;500;600;700&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');



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

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img, canvas {
  max-width: 100%;
}

body {
  display: grid;
  font-family: 'Space Grotesk', sans-serif;
  min-height: 100vh;
  grid-template-rows: auto 1fr;
  padding: 50px;
  background-color: black;
  color: white;
}

.navbar {
  
  height: 60px;
  display: flex;
  border-bottom: solid  1px rgba(85, 85, 85, 0.455);
  align-items:center;
  gap: 15px;
  padding-bottom: 45px

}

.logo {
  font-weight: 700;
  letter-spacing: 10px
}

.logo-png {
  width: 44px;
  height: auto;
  border-radius: 15px;
}

.search-menu {
  display: flex;
  position: relative;
  align-items: center;
  background-color: rgba(39, 39, 39, 0.556);
  border-radius: 25px;
  border: 1px solid #46d9f688;
  height: 44px;
  width: 35vw;
  margin: 15%;
  

}

.search-label {
  margin: 20px;
  display: none;
  color:rgba(240, 248, 255, 0.523)
}

.search-input {
  background: transparent;
  border: none;
  outline: none;
  color:#fff

}



.temp-toggle {
  display: flex;
  background: rgba(30, 30, 30, 0.8);
  border-radius: 25px;
  padding: 4px;
  border: 1px solid #333;
  
}

.temp-btn {
  background: transparent;
  border: none;
  color: #888;
  padding: 8px 14px;
  border-radius: 20px;
  cursor: pointer;
  font-family: 'Space Grotesk', sans-serif;
  transition: all 0.3s ease;
}

.temp-btn.active {
  background: rgba(70, 217, 246, 0.15);  /* голубой полупрозрачный фон */
  color: #46d9f6;          
              /* голубой текст */
  box-shadow: 0 0 15px rgba(70, 217, 246, 0.3); /* свечение */
}

.clock-block {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 16px;
  letter-spacing: 2px;
  margin-right: 20px;
}

.status-dot {
  width: 8px;
  height: 8px;
  background: #00d9a5;     /* зелёно-голубой цвет */
  border-radius: 50%;
  box-shadow: 0 0 8px #00d9a5;  /* свечение точки */
}

.clock-time {
  color: #fff;
  font-variant-numeric: tabular-nums;  /* моноширинные цифры, не прыгают */
}


.dashboard-grid {
  display: grid;

  grid-template-rows: auto auto ; 
  gap: 20px; 
  padding: 20px;
  background-color: #0b0d10; 
  
  grid-template-columns: 1fr;
    grid-template-areas:
      "current"
      "graph"
      "extend"
      "sub1"
      "sub2"
      "sub3"
      "sub4";
}

/* Общие стили для всех карточек */
.card {
  background-color: #111419; /* Цвет фона блоков */
  border: 1px solid #1a1f26; /* Тонкая рамка */
  border-radius: 16px; /* Закругление углов */
  padding: 24px;
  color: #ffffff;
  transition: 0.8s ease;
  min-width: 0; /* чтобы широкий контент не распирал колонку */
  overflow: hidden;
}

/* Привязываем блоки к нашей карте (areas) */
.current-weather {
  grid-area: current;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  border: 1px solid #46d9f639;
  background: linear-gradient(to top, rgba(70, 217, 246, 0.1), transparent);
}

.card:hover {
  border: 1px solid #46d9f667;
}

.temporal-dynamics {
  grid-area: graph;
  min-height: 260px;
}

#tdChart {
  width: 100% !important;
  height: 200px !important;
}

.extended-projection {
  grid-area: extend;
}

.city-dsc {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sector-label {
  font-size: 2rem;
  letter-spacing: 3px;
  color: #46d9f6;
  filter: drop-shadow(0px 5px 15px #46d9f6)
}

.search-txt {
  display: none
}

.icon {
  width: 33px;
  height: 33px;
  color: #46d9f6;
}

.temp-wrap {
  flex: 1;
  display: flex;
  justify-content:center;
  align-items: center;
  flex-direction: column;
}
.t_m_m {
  color:#888888c2;
  font-size: 0.95rem
}

.temp {
  font-size: 5rem;
  font-weight: 500;
}

.deg {
  font-size: 2rem;
  vertical-align: super;
  color:#46d9f6
}

/* Четвертая маленькая карточка (давление) перенесется автоматически на новую строку под UV-индекс */
.sub-card {
  display:flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 150px;
  padding: 20px;
}

.num_dop_cards {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: auto;
  width: 100%
  
}

.num_dop_cards i {
  color: #888;
  width: 20px;
  height: 20px;
}

.cards_nums {
  color: #888;
  font-weight: 300;
  font-size: 0.85rem;
  letter-spacing: 2px;
}

.info {
  display: flex;
  align-items: baseline;
  gap: 6px;
  
}



.b_txt {
  font-size: 2rem;
  color:#fff;
  
}

.s_txt {
  font-size: 0.85rem;
  color:#46d9f6;
}

.dscr {
  font-weight:300;
  letter-spacing: 2px;
  color:#888;
  font-size: 0.75rem;
  white-space: nowrap;
}

.block-dscr {
  color: #c7c7c7;
  font-size: 1.5rem;
  margin: 10px 0  10px 0
}

.day-weather {
  display: flex;
  flex-direction: column;
  justify-content:  flex-start;
  gap: 10px;
  flex-wrap: wrap;
}

.day {
  
  display: grid;
  grid-template-columns: 50px 30px 80px 80px 80px;
  gap: 10px;
  justify-content: space-between;
  background-color: #1a1f26;
  border: 1px solid #46d9f61b;
  border-radius: 10px;
  width: 100%;
  padding: 12px 15px;
  align-items: center;   
  padding-top:10px;
  
}

.day-name {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.day .condition {
  font-size: 0.9rem;
  display: flex;      
  text-overflow: ellipsis;     
  justify-content: center;
  align-items: center;
  color: #888;
  max-width:100px
}


.day .max-t {
  white-space: nowrap;
  font-size: 1.1rem;
  font-weight: 600;
  color: #46d9f6;
}


.day .min-t {
  white-space: nowrap;
  color: #888;
}

.i {
  width: 24px;
  height: 24px;
  display: flex;           /* добавь это */
  align-items: center; 
  color: #46d9f6;
  justify-content: center;
}


.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.chart-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 3px;
  color: #888;
}

.cycle-btn {
  font-size: 11px;
  letter-spacing: 2px;
  color: #46d9f6;
  border: 1px solid #46d9f660;
  background: rgba(70,217,246,0.08);
  border-radius: 6px;
  padding: 5px 12px;
  cursor: pointer;
}

.today {
  color: #8888889e;
  font-size: 1rem;
}


.error {
  position: fixed;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #fff;
  border: 1px solid #888;
  border-radius: 15px;
  color: black;
  height: 30px;
  width: 200px;
  z-index: 9999;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
  transition: 0.8s ease;
  pointer-events: none;
  opacity: 0;
}
.error.show {
  top: 47px;
  opacity: 1;
  pointer-events: auto;
}



.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);   /* строго под полем ввода */
  left: 0;
  right: 0;
  width: 100%;
  padding: 6px;
  background: #111419;
  border: 1px solid #1a1f26;
  border-radius: 12px;
  overflow: hidden;
  z-index: 9999;
  display: none;
  box-shadow: 0 5px 20px rgba(2, 40, 34, 0.836)
}

.suggestion-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
}

.suggestion-item:hover {
  background: rgba(70, 217, 246, 0.08)
}

.suggestion-name {
  color: #fff;
  font-size: 0.95rem;

}

.suggestion-country {
  color: #888;
  font-size: 0.8rem
}


@media (max-width: 576px) {

  body {
    padding: 12px;
  }

  /* Шапка: переносим элементы, поиск — на всю ширину второй строкой */
  .navbar {
    height: auto;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px 12px;
    padding-bottom: 16px;
  }

  .logo-png {
    width: 30px;
    border-radius: 15px;
  }

  .logo {
    font-size: 1.1rem;
    letter-spacing: 3px;
  }

  .search-menu {
    order: 5;            /* уводим строку поиска вниз шапки */
    flex: 1 0 100%;
    width: 100%;
    margin: 0;
    height: 40px;
    padding: 0 14px;
  }

  .search-input {
    font-size: 13px;
    width: 100%;
    margin-left: 0;
  }

  .temp-toggle {
    padding: 3px;
  }

  .temp-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  .clock-block {
    font-size: 0.8rem;
    gap: 8px;
    margin-right: 0;
  }

  /* Сетка дашборда: компактнее */
  .dashboard-grid {
    padding: 0;
    gap: 14px;
  }

  .card {
    padding: 18px;
  }

  .sector-label {
    font-size: 1.5rem;
  }

  .temp {
    font-size: 3.6rem;
  }

  
  .day {
    grid-template-columns: 38px 22px minmax(0, 1fr);
    grid-template-areas:
      "name icon cond"
      "min  min  max";
    gap: 6px 8px;
    padding: 10px 12px;
  }

  .day .day-name { grid-area: name; }
  .day .i        { grid-area: icon; }

  .day .condition {
    grid-area: cond;
    font-size: 0.8rem;
    max-width: none;
    justify-content: flex-start;
    text-align: left;
    min-width: 0;
  }

  .day .min-t {
    grid-area: min;
    justify-self: start;
  }

  .day .max-t {
    grid-area: max;
    justify-self: end;
  }

  .day .min-t,
  .day .max-t {
    font-size: 0.95rem;
  }

}


@media (min-width: 576px) {
  .logo {
    font-size: 1rem;
    letter-spacing: 3px;
    
  }
  .navbar {
    gap: 20px;
    padding-bottom: 20px;
    height: 40px;
    justify-content: center;
  }
  .logo-png {
    width: 33px;
  }
  .search-menu {
    width: 25vw;
    margin: 3px
  }
  

  .search-input {
    font-size: 13px;
    margin-left: 10px;
  }

  .clock-block {
    font-size: 0.85rem;
    margin: 15px
  }
  .temp-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
  }

  
}


@media (min-width: 768px) {

  .logo {
    letter-spacing: 3px;
    transform: scale(0.9);
  }
  .navbar {
    gap: 15px;
    padding-bottom: 25px;
    height: 50px;
    display: flex;
    justify-content: center;
  }
  .logo-png {
    width: 38px;
  }
  .search-menu {
    width: 30vw;
    margin: 3vw;
  }
  

  .search-input {
    font-size: 15px;
    margin-left: 20px;
  }
  
  
}

@media (min-width: 992px) {
  .logo {
    letter-spacing: 3px;
    transform: scale(1.3);
  }
  .navbar {
    gap: 25px;
    padding-bottom: 35px;
    height: 60px
  }
  .logo-png {
    width: 44px;
  }
  .search-menu {
    width: 35vw;
    margin: 5vw
  }
  

  .search-label {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
  }
  .search-txt {
    display: flex
  }
  .temp-toggle {
    padding: 10px;
  }

  .temp-btn {
    padding: 6px 10px;
    font-size: 0.9rem;
  }

  .clock-block {
    font-size: 1.3rem;
    gap: 10px;
  }
  
}



@media (min-width: 1200px)  {
  .navbar {
    gap: 30px;
    justify-content: center;
    height: 60px;
    display: flex;
  
  
  }  
  .logo-png {
    width: 50px;
    
  }
  .logo {
    letter-spacing: 3px;
    transform: scale(2);
    margin: 0 5vw 0 3vw
  }
  .search-menu {
    width: 40vw;
    margin: 5vw
  }

  .dashboard-grid {
    grid-template-areas:
    "current current graph   graph   graph  graph"
    "extend  extend  sub1    sub2    sub3  sub4";
    grid-template-columns: repeat(6, 1fr); 
     }

  .day {
    gap: 1px;
    
  }

  .day .condition {
    font-size: 0.75rem;
    
  }

  .day .min-t,
  .day .max-t {
    font-size: 0.85rem;
  }

  .day span:first-child {
    font-size: 0.85rem;
  }
  .search-label {
    justify-content: flex-start;
    align-items: center;
    white-space: nowrap;
    display: flex
  }
  .temp-toggle {
    padding: 10px;
  }

  .temp-btn {
    padding: 6px 10px;
    font-size: 1rem;
  }

  .clock-block {
    font-size: 1.5rem;
    gap: 10px;
  }
  
}