@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@300;400&family=PT+Sans+Narrow&display=swap');

:root {
  --dark-skin: rgba(255, 255, 255, 0.02);
  --dark-switch: rgba(153, 149, 149, 0.4);
  --dark-toggle: rgb(7, 3, 44);
  --dark-toggle-bd: rgb(59, 57, 75);
  --dark-text: white;
  --dark-text-mobile: var(--dark-text);
  --dark-hover: rgba(0,0,0,0.3);
  --dark-hover-text: grey;
  --dark-hover-border: white;
  --dark-currbg: rgb(206, 206, 206);
  --dark-currtxt: rgb(6, 4, 20);
  --dark-border-btm: white;
  --dark-skin-mobile:rgba(117, 100, 106, 0.205);

  --dark-box-shadow: 2px 2px 2px rgba(37, 23, 99, 0.377), 2px 2px 2px rgb(94, 74, 150), 2px 2px 2px rgb(10, 5, 56);

  --light-skin: rgba(97, 96, 96, 0.02);
  --light-switch: rgba(39, 36, 36, 0.4);
  --light-toggle: rgb(228, 210, 210);
  --light-toggle-bd: rgb(104, 97, 97);
  --light-text: rgb(7, 3, 44);
  --light-text-mobile: rgb(226, 21, 21);
  --light-hover: rgba(39, 36, 36, 0.4);
  --light-hover-text: rgb(228, 210, 210);
  --light-hover-border: rgb(228, 210, 210);
  --light-currbg: rgb(6, 4, 20);
  --light-currtxt: rgb(228, 210, 210);
  --light-border-btm: rgb(7, 3, 44);
  --light-skin-mobile: rgba(117, 100, 106, 0.205);

  --light-box-shadow: 2px 2px 2px rgb(155, 145, 145), 2px 2px 2px rgb(155, 145, 145), 2px 2px 2px rgb(155, 145, 145);
}

.dark {
  --bg-img: url(./IMG-7815.jpg);
  --bg-skin: var(--dark-skin);
  --txt-color: var(--dark-text);
  --txt-color-mobile: var(--dark-text-mobile);
  --bg-switch: var(--dark-switch);
  --bg-toggle: var(--dark-toggle);
  --bg-hover: var(--dark-hover);
  --hover-text: var(--dark-hover-text);
  --hover-border: var(--dark-hover-border);
  --curr-datebg: var(--dark-currbg);
  --curr-datetxt: var(--dark-currtxt);
  --cal-box-shadow: var(--dark-box-shadow);
  --bd-btm: var(--dark-border-btm);
  --toggle-bd: var(--dark-toggle-bd);
  --skin-mobile: var(--dark-skin-mobile);
}

.light {
  --bg-img: url(./wavy-kiss-prints.jpg);
  --bg-skin: var(--light-skin);
  --txt-color: var(--light-text);
  --txt-color-mobile: var(--light-text-mobile);
  --bg-switch: var(--light-switch);
  --bg-toggle: var(--light-toggle);
  --bg-hover: var(--light-hover);
  --hover-text: var(--light-hover-text);
  --hover-border: var(--light-hover-border);
  --curr-datebg: var(--light-currbg);
  --curr-datetxt: var(--light-currtxt);
  --cal-box-shadow: var(--light-box-shadow);
  --bd-btm: var(--light-border-btm);
  --toggle-bd: var(--light-toggle-bd);
  --skin-mobile: var(--light-skin-mobile);
}

* {
  margin: 0;
  padding: 0;
  letter-spacing: 0.1em;
  box-sizing: border-box;
  /* font-size: 14px; */
}

html, body {
  letter-spacing: 0.02em;
  min-height: 100vh;
  background: linear-gradient(165deg, rgb(6, 3, 34), #111, rgb(6, 4, 20));
  font-family: 'Oswald', sans-serif;
}


section i {
  position: absolute;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px #fff,
  0 0 20px #fff,
  0 0 30px #fff,
  0 0 50px #fff;
  animation: stars 20s infinite;
}

@keyframes stars {
  0% {
    opacity: 0;
  }

  10% {
    opacity: 0.7;
  }

  90% {
    opacity: 0.5;
  }

  100% {
    opacity: 0;
  }
}

main {
  display: grid;
  place-items: center;
  z-index: 999;
  transform: translate(0, 70px);
  position: absolute;
}

main::before {
  content: '';
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background-image: var(--bg-img);
  background-size: 600px 600px;
  background-position: bottom center;
  position: absolute;
  box-shadow: 2px 5px 8px rgb(116, 111, 111), 2px 5px 8px rgb(156, 144, 144), 2px 5px 8px rgb(161, 156, 156);
}

.box {
  position: relative;
  z-index: 1000,
}

.calendar {
  position: relative;
  width: max-content;
  height: 480px;
  background: var(--bg-skin);
  box-shadow: var(--cal-box-shadow);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-right: 2px solid rgba(255, 252, 252, 0.2);
  border-bottom: 2px solid rgba(255, 252, 252, 0.2);
  backdrop-filter: blur(5px);
  border-radius: 8px;
  padding: 10px;
  overflow: hidden;
  color: var(--txt-color);
  letter-spacing: 0.05em;
}

.calendar-date-display {
  padding: 10px 0 15px;
  margin: 0 18px 10px;
  font-size: 16pt;
  text-align: center;
  border-bottom: 2px solid var(--bd-btm);
  font-variant: all-small-caps; 
  color: var(--txt-color-mobile);
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18pt;
  margin: 0 5px;  
  font-variant: all-small-caps;
  height: 40px;
}

.month-arrow {
  font-weight: bold;
  border: 2px solid transparent;
  border-radius: 50%;
  display: grid;
  place-content: center;
  cursor: pointer;
  height: 38px;
  width: 38px;
  padding-bottom: 5px;
}

.month-arrow:hover {
  border: 2px solid var(--hover-border);
  background-color: var(--bg-hover);
  color: var(--hover-text);
  transition: .3s ease-in-out;
}

.calendar-body {
  padding: 10px;
  height: 300px;
}

.calendar-weekdays {
  display: grid;
  place-items: center; 
  grid-template-columns: repeat(7, 1fr);  
  gap: 2px;
  font-size: 13pt;
  margin-bottom: 2px;
}

.calendar-weekdays div {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 6px;
}


.calendar-days {
  display: grid;
  place-items: center;
  grid-template-columns: repeat(7, 1fr);   
  gap: 2px;
}

.calendar-days div {
  width: 40px;
  height: 40px;
  border: 2px solid transparent;
  display: grid;
  place-items: center;
  border-radius: 50%;
}

.calendar-days div:hover:not(.today) {
  background-color: var(--bg-hover);
  transition: 0.3s ease-in-out;
  opacity: 0.7;
}

.prev-month-days,
.next-month-days {
  opacity: 0.6;
}

.today {
  color: var(--curr-datetxt);
  background-color: var(--curr-datebg);
}

.invisible{
  opacity: 0;
  cursor: default;
}

.calendar-footer {
  padding: 10px 10px 0;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.toggle {
  display: flex;
}

.toggle span {
  margin-right: 10px;
  text-transform: capitalize;
}

.light-mode-switch {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 40px;
  height: 22px;
  border-radius: 14px;
  border: 2px solid var(--toggle-bd);
  background-color: var(--bg-switch);
  cursor: pointer;
}

.light-mode-switch::before {
  content: '';
  background-color: var(--bg-toggle);
  border-radius: 50%;
  width: 18px;
  height: 18px;
  position: absolute;
  transition: left 0.2s ease-in-out;
}

.light .light-mode-switch:checked::before {
  left: calc(1px + 45%);
}

@media (max-width: 650px) {  

  main::before {
    height: 480px;
    width: 340px;
    background-size: 340px 480px;
    border-radius: 8px;
    background-position: center center;
    -webkit-filter: blur(3px);
      filter: blur(3px);
  }  

  .calendar {
    backdrop-filter: none;
  } 

  
  .calendar-weekdays div,
  .calendar-days div {
    height: 40px;
    width: 40px;
    font-size: 12pt;
    border-radius: 6px;
    }

  .calendar-days div:not(.today) {
    background-color: var(--skin-mobile);
    color: var(--txt-color-mobile);
  }

  .calendar-footer {
     font-size: 13pt;
  }
}

