@import url('https://fonts.googleapis.com/css?family=Roboto:100,300,400');

/* base dark mode */
:root {
  color-scheme: dark;
}

body {
    margin: 0;
    text-align: center;
    color: #fff;
    font-family: 'Roboto', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 28px;
    font-weight: 100;
    overflow: hidden;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bg 5s linear infinite;
    animation-play-state: paused;
}

body.bg-running {
  animation-play-state: running;
}

/* full-screen “cards” */
.screen {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 18px;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.screen.active {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

/* small playful labels and headings */
.tiny-label {
    font-size: 12px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.75;
}

h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 300;
}

/* weather text */
#today {
    max-width: 320px;
    font-size: 14px;
    font-weight: 300;
    line-height: 1.6;
    text-align: left;
    margin: 0 auto;
    white-space: pre-line;   /* turn \n into line breaks */
}

/* primary playful button */
.primary-btn,
.ghost-btn {
    margin-top: 6px;
    padding: 10px 22px;
    border-radius: 999px;
    border: none;
    outline: none;
    font-size: 14px;
    font-weight: 300;
    cursor: pointer;
    transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, background 0.15s ease-out, color 0.15s ease-out;
}

.primary-btn {
    background: #ffffff;
    color: #111;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.45);
}

.primary-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}

.primary-btn:active {
    transform: translateY(1px) scale(0.97);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

/* subtle secondary button */
.ghost-btn {
    background: transparent;
    color: #f5f5f5;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: none;
}

.ghost-btn:hover {
    background: rgba(255, 255, 255, 0.08);
}

.ghost-btn:active {
    transform: translateY(1px) scale(0.97);
}

/* your “dropping texts” animation */
.dropping-texts {
    display: inline-block;
    width: 180px;
    text-align: left;
    height: 36px;
    vertical-align: -2px;
    position: relative;
}

.dropping-texts > div {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    position: absolute;
    font-weight: 300;
    box-shadow: 0px 60px 25px -20px rgba(0, 0, 0, 0.5);
}

/* timings for each word */
.dropping-texts > div:nth-child(1) {
    animation: roll 5s linear infinite 0s;
}
.dropping-texts > div:nth-child(2) {
    animation: roll 5s linear infinite 1s;
}
.dropping-texts > div:nth-child(3) {
    animation: roll 5s linear infinite 2s;
}
.dropping-texts > div:nth-child(4) {
    animation: roll2 5s linear infinite 3s;
}

/* main text drop animation */
@keyframes roll {
  0% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(-25deg);
  }
  3% {
    opacity: 1;
    transform: rotate(0deg);
  }
  5% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
  }
  20% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
    transform: rotate(0deg);
  }
  27% {
    font-size: 0px;
    opacity: 0.5;
    margin-left: 20px;
    margin-top: 100px;
  }
  100% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(15deg);
  }
}

@keyframes roll2 {
  0% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(-25deg);
  }
  3% {
    opacity: 1;
    transform: rotate(0deg);
  }
  5% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
  }
  30% {
    font-size: inherit;
    opacity: 1;
    margin-left: 0px;
    margin-top: 0px;
    transform: rotate(0deg);
  }
  37% {
    font-size: 1500px;
    opacity: 0;
    margin-left: -1000px;
    margin-top: -800px;
  }
  100% {
    font-size: 0px;
    opacity: 0;
    margin-left: -30px;
    margin-top: 0px;
    transform: rotate(15deg);
  }
}

/* animated background loop */
@keyframes bg {
    0% { background: #ff0075; }
    3% { background: #0094ff; }
    20% { background: #0094ff; }
    23% { background: #b200ff; }
    40% { background: #b200ff; }
    43% { background: #8BC34A; }
    60% { background: #8BC34A; }
    63% { background: #F44336; }
    80% { background: #F44336; }
    83% { background: #F44336; }
    100% { background: #0094ff; }
}

/* mobile */
@media (max-width: 480px) {
  body {
    font-size: 24px;
  }

  #today {
    max-width: 260px;
  }
}
