:root {
  --background-color: #000000;

  --text-color: #fbfbfc;
  --text-muted: #9b8a9e;

  --primary-color: #2d1b4e;

  --box-color: rgba(58, 31, 92, 0.5);
  --box-visible-color: #8b5cf6;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Arial", sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  overflow: hidden;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: rgba(58, 31, 92, 0.2);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(139, 92, 246, 0.5);
  border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(139, 92, 246, 0.7);
}
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction:column;
  gap: 10px;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  background-color: rgba(0, 0, 0, 0.9);
}

.loader {
  border: 8px solid #222121;
  border-top: 8px solid #8b5cf6;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  animation: spin 2s linear infinite;
}
.loading-screen span {
  color: var(--text-muted);
  font-size: 1.2em;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
.background-svg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 1500px;
  height: 700px;
  opacity: 0.1;
  z-index: -1;
  pointer-events: none;
}

@media(max-width: 1400px){
    .background-svg {
        width: 1200px;
        height: 600px;
    }
}
@media(max-width: 1300px){
    .background-svg {
        width: 1000px;
        height: 500px;
    }
}
@media (max-width: 1200px) {
  .background-svg {
    display: none;
  }
  body {
    background-image: radial-gradient(
      circle at center,
      #10032d 0%,
      #09001b 10%,
      #000000 100%
    );
    background-size: cover;
    background-attachment: fixed;
  }
}

#app {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 1400px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}
.header {
    padding: 0;
    display: flex;
    gap: 5px;
    justify-content: space-between;
    width: 100%;
}
.header h1 {
    font-size: 1.5em;
    margin: 0;
    letter-spacing: 1px;
    
}
.start{
    display: flex;
    align-items: center;
    gap: 20px;
}
.modes {
    display: flex;
    gap: 5px;
}
.mode-btn {
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 5px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}
.mode-btn.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.mode-btn:hover:not(.active) {
    background-color: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.2);
    color: var(--box-visible-color);
}
.mode-btn.active:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.end{
    display: flex;
    gap: 10px;
    position: relative;
    background-color: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-muted);
    padding: 5px 25px 5px 0px;
    border-radius: 4px;
    z-index: 2;
    justify-content: flex-start;
    margin-right: 70px;
    flex-wrap: wrap;
}

.end span {
    position: absolute;
    top: 50%;
    border-left: 1px solid var(--text-muted);
    right: -10px;
    transform: translate(-50%, -50%);
    font-size: 22px;
    color: var(--text-muted);
    z-index: 1;
}
.end input{
    background-color: transparent;
    color: var(--text-muted);
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    z-index: 2;
}
.end input:focus{
    outline: none;
    border: none;
    color: #fff;
}

.search-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: -75px;
    background-color: var(--primary-color);
    border: none;
    color: #fff;
    padding: 10px 10px;
    cursor: pointer;
    border-radius: 4px;
    font-size: 0.9em;
}

.main{
    display: flex;
    gap: 20px;
    flex-direction: column;

}
.first-row{
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}
.second-row{
    display: flex;
    gap: 20px;
    width: 100%;
    align-items: stretch;
}
.card {
  background: rgba(58, 31, 92, 0.2);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 20px;
  box-sizing: border-box;
  border-radius: 12px;
}


.main{
  display: flex;
  gap: 20px;
  flex-direction: column;
  flex: 1;
}

.main-info{
  display: flex;
  gap: 14px;
  flex-direction: column;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}

.main-info .time {
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0;
  padding: 0;
  letter-spacing: 0.4px;
}

.main-info .header {
  display: flex;
  gap: 16px;
  flex-direction: column;
  flex: 1;
}
.city-description {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.city-desc {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.city-desc h1,
.city-desc h2 {
  margin: 0;
  font-size: 1.5em;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.city-desc p {
  margin: 0;
  font-size: 0.9em;
  color: var(--text-muted);
  letter-spacing: 0.3px;
}

.temp {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
}

.temp h1,
.temp .temprature {
  margin: 0;
  font-size: 4em;
  font-weight: 600;
  letter-spacing: 0px;
  line-height: 1;
}

.temp-details {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: flex-start;
  font-size: 0.9em;
}

.temp-details h2 {
  margin: 0;
  font-size: 1em;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.main-info.card {
  background: linear-gradient(145deg, rgba(58, 31, 92, 0.35), rgba(29, 15, 50, 0.35));
  border: 1px solid rgba(139, 92, 246, 0.25);
}

.descIcon {
  font-size: 48px;
  color: var(--box-visible-color);
  display: flex;
  align-items: center;
  justify-content: center;
}
.descIcon img {
  width: 70px;
  height: 70px;
}
.descIcon span {
  font-size: 52px;
}


.hourly-forecast{
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 3;
  min-width: 0;
}
.hourly-forecast .upper {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  width: 100%;
}
.hourly-forecast .upper > div {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}
.hourly-forecast .upper > div h2 {
  margin: 0;
  font-size: 1.2em;
}
.hourly-forecast .upper > div p {
  margin: 0;
  font-size: 0.9em;
  color: var(--text-muted);
}

.hourly-forecast .lower {
  display: flex;
  gap: 15px;
  justify-content: space-around;
  padding-top: 10px;
  border-top: 1px solid rgba(139, 92, 246, 0.2);
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
}
.hourly-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 10px;
  border-radius: 8px;
  background: rgba(139, 92, 246, 0.1);
  min-width: 70px;
}
.hourly-item .hour {
  font-size: 0.85em;
  color: var(--text-muted);
  margin: 0;
}
.hourly-item .hourly-icon {
  font-size: 28px;
  color: var(--box-visible-color);
}
.hourly-item .hourly-icon img {
  width: 40px;
  height: 40px;
}
.hourly-item .hourly-temp {
  font-size: 1em;
  font-weight: bold;
  margin: 0;
  color: var(--text-color);
}
.other-cities{
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 280px;
  max-width: 350px;
}
.weekly-forecast{
  display: flex;
  gap: 15px;
  flex: 3;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  min-width: 0;
  width: 100%;
}

.weekly-day-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px 12px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  min-width: 85px;
  flex: 1;
  transition: all 0.3s ease;
}

.weekly-day-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  transform: translateY(-2px);
}

.weekly-day-item.today {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
}

.weekly-day-item .day-name {
  font-size: 0.9em;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
  letter-spacing: 0.5px;
}

.weekly-day-item .day-date {
  font-size: 0.8em;
  margin: 0;
  color: var(--text-muted);
}

.weekly-day-item .weekly-icon {
  font-size: 36px;
  margin: 4px 0;
}

.weekly-day-item .day-temps {
  font-size: 0.95em;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
  white-space: nowrap;
}

.weekly-day-item .day-temps .low-temp {
  color: var(--text-muted);
  font-weight: 500;
}

.add_city{
  background-color: transparent;
  border: 1px dashed var(--text-muted);
  color: var(--text-muted);
  padding: 12px;
  cursor: pointer;
  border-radius: 8px;
  font-size: 0.9em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.add_city:hover {
  border-color: var(--box-visible-color);
  color: var(--box-visible-color);
  background: rgba(139, 92, 246, 0.05);
}

.add_city .plus {
  font-size: 1.2em;
  font-weight: bold;
}


.city-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.08);
  border: 1px solid rgba(139, 92, 246, 0.15);
  transition: all 0.2s ease;
  position: relative;
}

.city-item:hover {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
}
.city-item .first-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.city-item .first-col .city-time {
  font-size: 0.75em;
  color: var(--text-muted);
  margin: 0;
}
.city-item .first-col .city-name {
  font-size: 1em;
  font-weight: 500;
  margin: 0;
}

.city-item .second-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.city-item .second-col .material-symbols-outlined,
.city-item .second-col span {
  font-size: 32px;
}

.city-item .second-col .city-temp {
  font-size: 1.1em;
  font-weight: 600;
  margin: 0;
  color: var(--text-color);
  min-width: 45px;
  text-align: center;
}

.delete {
  position: absolute;
  top: -10px;
  right: -10px;
  opacity: 0;
  background: rgba(220, 38, 38, 0.15);
  border: 1px solid rgba(220, 38, 38, 0.3);
  color: #ef4444;
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

.delete:hover {
  background: rgba(220, 38, 38, 0.25);
  border-color: rgba(220, 38, 38, 0.5);
  color: #dc2626;
}

.delete .material-symbols-outlined {
  font-size: 18px;
}

.city-item:hover .delete {
  opacity: 1;
}

@media (max-width: 1024px) {
  body {
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
    padding: 20px 0;
  }
  
  #app {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 15px;
  }
  
  .header {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .start {
    width: 100%;
    justify-content: space-between;
  }
  
  .end {
    width: 100%;
    margin-right: 0;
    padding-right: 10px;
    flex-direction: row;
    align-items: center;
  }
  
  .end span {
    right: -5px;
    display: none;
  }
  
  .search-btn {
    position: static;
    transform: none;
    width: 100%;
    margin-top: 10px;
  }
  .search-btn span{
    display: none;
  }
  
  .first-row {
    flex-direction: column;
  }
  
  .main-info {
    min-width: 100%;
    max-width: 100%;
  }
  
  .hourly-forecast .upper {
    flex-wrap: wrap;
  }
  
  .hourly-forecast .upper > div {
    min-width: calc(50% - 10px);
  }
}

@media (max-width: 768px) {
  #app {
    gap: 15px;
    padding: 0 12px;
  }
  
  .header {
    padding: 0;
  }
  
  .header h1 {
    font-size: 1.3em;
  }
  
  .start {
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
  }
  
  .modes {
    width: 100%;
    justify-content: space-between;
  }
  
  .mode-btn {
    flex: 1;
    text-align: center;
  }
  
  .end input {
    width: 100%;
  }
  
  .card {
    padding: 15px;
  }
  
  .first-row,
  .second-row {
    gap: 15px;
  }
  
  .second-row {
    flex-direction: column;
  }
  
  .main-info .time {
    padding: 0;
    font-size: 0.8em;
  }
  
  .city-description {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }
  
  .descIcon span {
    font-size: 42px;
  }
  
  .descIcon img {
    width: 60px;
    height: 60px;
  }
  
  .temp h1,
  .temp .temprature {
    font-size: 3em;
  }
  
  .temp-details {
    gap: 12px;
    font-size: 0.85em;
  }
  
  .hourly-forecast {
    gap: 15px;
  }
  
  .hourly-forecast .upper {
    gap: 15px;
  }
  
  .hourly-forecast .upper > div h2 {
    font-size: 1em;
  }
  
  .hourly-forecast .upper > div p {
    font-size: 0.85em;
  }
  
  .hourly-forecast .lower {
    gap: 10px;
    overflow-x: auto;
    justify-content: flex-start;
  }
  
  .hourly-item {
    flex-shrink: 0;
    min-width: 65px;
    padding: 8px;
  }
  
  .other-cities {
    flex: none;
    width: 100%;
    max-width: 100%;
  }
  
  .weekly-forecast {
    flex: none;
    width: 100%;
  }
}

@media (max-width: 480px) {
  body {
    padding: 15px 0;
  }
  
  #app {
    gap: 12px;
    padding: 0 10px;
  }
  
  .header {
    padding: 0;
  }
  
  .header h1 {
    font-size: 1.1em;
  }
  
  .mode-btn {
    padding: 6px 8px;
    font-size: 0.8em;
  }
  
  .end {
    padding: 5px 15px 5px 5px;
  }
  
  .end input {
    padding: 4px 8px;
    font-size: 0.9em;
  }
  
  .search-btn {
    padding: 8px;
    font-size: 0.85em;
  }
  
  .card {
    padding: 12px;
  }
  
  .first-row,
  .second-row {
    gap: 12px;
  }
  
  .main-info .time {
    padding: 0;
    font-size: 0.75em;
  }
  
  .city-desc h1,
  .city-desc h2 {
    font-size: 1.2em;
  }
  
  .city-desc p {
    font-size: 0.8em;
  }
  
  .temp h1,
  .temp .temprature {
    font-size: 2.5em;
  }
  
  .temp-details {
    gap: 10px;
    font-size: 0.8em;
  }
  
  .temp-details h2 {
    font-size: 0.9em;
  }
  
  .descIcon span {
    font-size: 36px;
  }
  
  .descIcon img {
    width: 50px;
    height: 50px;
  }
  
  .hourly-forecast .upper {
    gap: 10px;
  }
  
  .hourly-forecast .upper > div {
    min-width: calc(50% - 5px);
  }
  
  .hourly-forecast .upper > div h2 {
    font-size: 0.95em;
  }
  
  .hourly-forecast .upper > div p {
    font-size: 0.8em;
  }
  
  .hourly-forecast .lower {
    gap: 8px;
    padding-top: 8px;
    justify-content: center;
  }
  
  .hourly-item {
    min-width: 60px;
    padding: 6px;
    gap: 6px;
  }
  
  .hourly-item .hour {
    font-size: 0.75em;
  }
  
  .hourly-item .hourly-icon {
    font-size: 24px;
  }
  
  .hourly-item .hourly-temp {
    font-size: 0.9em;
  }
  
  .other-cities {
    gap: 10px;
  }
  
  .add_city {
    padding: 10px;
    font-size: 0.85em;
  }
  
  .city-item {
    padding: 10px 12px;
  }
  
  .city-item .first-col .city-time {
    font-size: 0.7em;
  }
  
  .city-item .first-col .city-name {
    font-size: 0.9em;
  }
  
  .city-item .second-col .material-symbols-outlined,
  .city-item .second-col span {
    font-size: 28px;
  }
  
  .city-item .second-col .city-temp {
    font-size: 1em;
  }
  
  .delete {
    opacity: 1;
  }
  .weekly-day-item {
    min-width: 80px !important;
    padding: 12px 10px;
    gap: 10px;
  }
}

@media (max-width: 375px) {
  body {
    padding: 10px 0;
  }
  
  #app {
    gap: 10px;
    max-width: 100%;
    padding: 0 8px;
  }
  
  .header h1 {
    font-size: 1em;
  }
  
  .start {
    gap: 10px;
  }
  
  .mode-btn {
    padding: 5px 6px;
    font-size: 0.75em;
  }
  
  .card {
    padding: 10px;
  }
  
  .first-row,
  .second-row {
    gap: 10px;
  }
  
  .main-info .time {
    padding: 0;
  }
  
  .city-desc h1,
  .city-desc h2 {
    font-size: 1.1em;
  }
  
  .temp h1,
  .temp .temprature {
    font-size: 2.2em;
  }
  
  .temp-details {
    gap: 8px;
    font-size: 0.75em;
  }
  
  .descIcon span {
    font-size: 32px;
  }
  
  .hourly-forecast .upper > div h2 {
    font-size: 0.9em;
  }
  
  .hourly-forecast .upper > div p {
    font-size: 0.75em;
  }
  
  .hourly-item {
    min-width: 55px;
    padding: 5px;
  }
  
  .city-item {
    padding: 8px 10px;
  }
  
  .city-item .second-col {
    gap: 8px;
  }
  
  .city-item .second-col .material-symbols-outlined,
  .city-item .second-col span {
    font-size: 24px;
  }
}

@media (max-width: 1200px) {
  .weekly-forecast {
    gap: 10px;
    padding: 15px;
  }
  
  .weekly-day-item {
    min-width: 70px;
    padding: 12px 8px;
    gap: 10px;
  }
  
  .weekly-day-item .weekly-icon {
    font-size: 32px;
  }
  
  .weekly-day-item .day-temps {
    font-size: 0.85em;
  }
}

@media (max-width: 900px) {
  .weekly-forecast {
    overflow-x: auto;
    justify-content: flex-start;
    padding: 15px 10px;
  }
  
  .weekly-day-item {
    flex-shrink: 0;
    min-width: 80px;
  }
}

@media (max-width: 600px) {
  .weekly-forecast {
    gap: 8px;
  }
  
  .weekly-day-item {
    min-width: 65px;
    padding: 10px 6px;
    gap: 8px;
  }
  
  .weekly-day-item .day-name {
    font-size: 0.8em;
  }
  
  .weekly-day-item .day-date {
    font-size: 0.7em;
  }
  
  .weekly-day-item .weekly-icon {
    font-size: 28px;
  }
  
  .weekly-day-item .day-temps {
    font-size: 0.8em;
  }
}

@media (max-width: 375px) {
  .weekly-forecast {
    padding: 10px 8px;
    gap: 6px;
  }
  
  .weekly-day-item {
    min-width: 58px;
    padding: 8px 10px;
    gap: 6px;
  }
  
  .weekly-day-item .day-name {
    font-size: 0.75em;
  }
  
  .weekly-day-item .day-date {
    font-size: 0.65em;
  }
  
  .weekly-day-item .weekly-icon {
    font-size: 24px;
  }
  
  .weekly-day-item .day-temps {
    font-size: 0.75em;
  }
}