/* Source By ChatGPT */
:root {
  --golden: 1.618;
  --unit: 10px;
  --radius: calc(var(--unit) * 0.5 * var(--golden));
  --gap: calc(var(--unit) * var(--golden));
  --padding: calc(var(--unit) * var(--golden));
  --card-width: calc(60 * var(--unit));
  --card-height: calc(26 * var(--unit));
  --logo-size: calc(12.8 * var(--unit));
  --font-large: calc(2.2 * var(--unit));
  --font-medium: calc(1.2 * var(--unit));
  --font-small: calc(1.05 * var(--unit));
  --overlay-opacity: 0.152;
}

body {
  position: relative;
  margin: 0;
  padding: 0;
  font-family: system-ui, sans-serif;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  box-sizing: border-box;
  overflow: hidden;
  opacity: 0;
}

body.visible {
  opacity: 1;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: url('background.jpg') no-repeat center center;
  background-size: cover;
  z-index: -1;
  pointer-events: none;
  user-select: none;
}

.card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background-color: #ffffff;
  color: #222;
  border-radius: 16px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  padding: var(--padding);
  width: 90%;
  max-width: var(--card-width);
  height: var(--card-height);
  box-sizing: border-box;
  gap: var(--gap);
  backdrop-filter: blur(16px);
}

.card-left {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo {
  width: var(--logo-size);
  height: var(--logo-size);
  border-radius: 20%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  object-fit: cover;
}

.logo-image {
  width: var(--logo-size);
  height: var(--logo-size);
  background-image: url('icon.png');
  background-size: cover;
  background-position: center;
  border-radius: 20%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  pointer-events: none;
  user-select: none;
}

.card-right {
  flex: 1.618;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--gap);
}

.card-right h1 {
  font-size: 31px;
  font-weight: 700;
  margin: 0;
  margin-top: -2px;
}

.card-right p {
  font-size: var(--font-medium);
  margin: -6px 0 0 0;
  color: #444;
}

#subtitle {
  font-size: 16px;
  font-weight: 600;
  color: #888;
  transition: opacity 1s ease;
  min-height: 24px;
  opacity: 1;
  display: block;
  margin-top: -6px;
  margin-bottom: 8px;
}

#subtitle.fade-out {
  opacity: 0;
}

#button-container {
  display: flex;
  gap: var(--gap);
  flex-wrap: wrap;
  margin-top: 10px;
  min-height: 30px;
  margin-bottom: 5px;
}

.button-image {
  width: 140px;
  height: 43px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  border-radius: 8px;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  -moz-user-select: none;
}

.button-wrapper {
  position: relative;
  display: inline-block;
  padding: 0;
  margin: 0;
  line-height: 0;
  overflow: hidden;
  border-radius: 8px;
  outline: 1px solid #e5e5e5;
  transition: outline 0.2s ease;
  user-select: none;
}

.button-wrapper.pressed .button-image {
  transform: scale(0.95);
  transition: transform 120ms ease;
}

.button-wrapper img {
  display: block;
  width: 140px;
  height: auto;
  border-radius: 0;
  margin: 0;
  padding: 0;
  transition: transform 120ms ease;
}

.button-wrapper.pressed img {
  transform: scale(0.95);
}

.cooldown-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 0%;
  height: 100%;
  background: rgba(0, 0, 0, var(--overlay-opacity));
  pointer-events: none;
  z-index: 2;
  transition: width 0.4s ease;
}

.rotated-text {
  position: fixed;
  top: 20px;
  left: 0;
  transform: rotate(90deg) translateY(-100%);
  transform-origin: top left;
  white-space: nowrap;
  font-size: 12px;
  color: #190d0d;
  padding: 10px;
  z-index: 9999;
}

@media (max-width: 600px) {
  body {
    align-items: center;
    justify-content: center;
    padding: 10px;
  }

  .card {
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    height: auto;
    padding: 20px;
    gap: 20px;
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    top: -40px;
  }

  .card-left {
    justify-content: flex-start;
    width: 100%;
  }

  .logo,
  .logo-image {
    width: 80px;
    height: 80px;
  }

  .card-right {
    width: 100%;
    gap: 10px;
    align-items: flex-start;
  }

  .card-right h1 {
    font-size: 25px;
    text-align: left;
    margin-bottom: 5px;
  }

  .card-right p,
  #subtitle {
    font-size: 15px;
    text-align: left;
    margin-bottom: 20px;
  }

  #button-container {
    gap: 10px;
    margin-top: 10px;
    justify-content: flex-start;
  }

  .button-image {
    width: 130px;
    height: 39px;
  }

  .rotated-text {
    position: fixed;
    top: unset;
    bottom: 12px;
    left: 0;
    right: 0;
    transform: none;
    transform-origin: unset;
    text-align: center;
    white-space: normal;
    padding: 8px 16px;
    font-size: 11px;
    z-index: 9999;
    color: #4f4f4f;
  }
}

@media (prefers-color-scheme: dark) {
  .card {
    background-color: #000000;
    color: #fff;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.15);
  }

  #subtitle {
    color: #909095;
  }

  .logo-image {
  background-color: #1c1c1e;
  }

  .button-wrapper {
  border-radius: 8px;
  outline: 1px solid #000000;
  }

  .rotated-text {
  color: #7e7979;
  }
  
  body::before {
  background: url('background \(dark\).jpg') no-repeat center center;
  background-size: cover;
  }
}
