#description {
  font-size: 32px;
  margin-top: 0;
  opacity: 0;

  animation: fadeRight 1s ease 0.8s forwards;
}

html,
body {
  margin: 0;
  overflow-x: hidden;
}

.row {
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
}

.align-left {
  text-align: left;
}

.align-center {
  align-items: center;
  justify-content: center;
}

.column {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

* {
  font-family: Arial, sans-serif;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
  box-sizing: border-box;
}

.logo {
  position: absolute;
  top: 50px;
  left: 20px;

  width: 400px;
  height: auto;

  transform: translateX(-100px);
  opacity: 0;

  animation: fadeRight 1s ease 0.5s forwards;
}

.title-logo {
  transform: scale(0.7);
}

.container-background {
  position: relative;

  min-height: calc(100vh - 40px);
  min-height: calc(100dvh - 40px);
  height: auto;

  margin: 20px;

  display: flex;
  align-items: stretch;
  justify-content: center;

  background: transparent;

  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);

  padding: 5px;

  overflow: hidden;
}

.container-background-border {
  position: absolute;

  width: var(--background-size, 200vmax);
  height: var(--background-size, 200vmax);

  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);

  background: conic-gradient(
    #ea4335 0deg 90deg,
    #f9ab00 90deg 180deg,
    #34a853 180deg 270deg,
    #4285f4 270deg 360deg
  );

  animation: rotate-background 20s linear infinite;
}

.particle {
  position: absolute;

  border-radius: 50%;

  background: black;

  width: 6px;
  height: 6px;
  opacity: 0.65;
  box-shadow: 2px 2px 0px rgba(0, 0, 0, 0.25);

  z-index: -1;

  animation: particle-drift ease infinite;
}

.container {
  z-index: 100;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: center;

  width: 100%;
  min-height: 0;
  height: auto;

  padding: 20px;

  border-radius: 10px;
  background: white;

  position: relative;
  overflow: hidden;
}

.container h1 {
  font-size: 96px;
  margin: 0;

  padding-top: 150px;

  opacity: 0;
  animation: fadeRight 1s ease 0.7s forwards;
}

.google-circle {
  position: absolute;

  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: #4285f4;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  font-weight: bold;

  z-index: -1;
}

.google-circle.green {
  background: #34a853;
  right: 50px;
  top: -350px;

  transform: translate(0px, -150px);

  animation: circleAnimation 1s ease forwards;
}

.google-circle.blue {
  background: #4285f4;
  right: -175px;
  bottom: -200px;

  transform: translate(300px, 200px);

  animation: circleAnimation 1s ease forwards;
}

.google-circle.yellow {
  background: #f9ab00;
  left: 50px;
  bottom: -350px;

  transform: translate(-300px, 150px);

  animation: circleAnimation 1s ease forwards;
}

.google-circle.red {
  background: #ea4335;
  left: -80px;
  top: -250px;

  transform: translate(-250px, -250px);

  animation: circleAnimation 1s ease forwards;
}

.button-container {
  display: flex;
  justify-content: center;
  align-items: center;

  margin-top: clamp(20px, 5%, 40px);
  width: 100%;

  gap: 16px;
}

.button-wrapper {
  width: clamp(200px, 75%, 400px);
  height: 50px;

  opacity: 0;

  display: flex;
  justify-content: center;
  align-items: center;

  border-radius: 20px;

  cursor: pointer;

  transition: transform 0.2s ease;
}

.container a {
  --button-before-color: white;

  pointer-events: none;

  position: relative;
  z-index: 0;

  width: 100%;
  height: 50px;

  font-size: 16px;

  color: black;
  background: white;

  border: 1px solid #ccc;
  border-radius: 20px;

  overflow: hidden;

  text-decoration: none;

  transition: transform 0.2s ease;
}

.container a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 0;
  border-radius: 10px;
  background: var(--button-before-color);
  z-index: -1;
  transition: width 0.5s ease-in-out;
}

.container a img {
  position: absolute;
  top: 50%;
  left: -20px;
  transform: translateY(-50%);

  border-radius: 10px;

  width: 50px;
  height: 50px;

  transition:
    left 0.5s ease-in-out,
    transform 0.2s ease;

  z-index: 2;
}

.container a span {
  position: relative;

  font-size: 18px;
  font-weight: bold;

  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.container .button-wrapper:hover a {
  transform: translateX(0) scale(1.05);
}

.container .button-wrapper:active a {
  transform: translateX(0) scale(0.95);
}

.container .button-wrapper:hover a::before {
  width: 100%;
}

.container .button-wrapper:hover a img {
  left: calc(100% - 30px);
}

.container .button-wrapper:has(a.disabled) {
  cursor: not-allowed;
  background: #f4f4f4;
  border-color: #bbb;
  color: #555;
}

.container .button-wrapper:has(a.disabled):active {
  transform: translateX(0) scale(1.05);
}

.container a.disabled img {
  filter: grayscale(100%);
  opacity: 0.8;
}

/* ============================================================
   Linktree-like Multi-Type Components (img, divider, text)
   ============================================================ */

.tree-img-card {
  display: flex;
  flex-direction: column;
  width: clamp(200px, 75%, 400px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid #ccc;
  background: white;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.06);
  opacity: 0;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.tree-img-card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.tree-img-card img {
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: contain;
  background: #fdfdfd;
  display: block;
  padding: 12px;
}

.tree-img-caption {
  padding: 8px 14px;
  font-size: 15px;
  font-weight: bold;
  text-align: center;
  color: #333;
  background: #fafafa;
  border-top: 1px solid #eee;
}

.tree-divider {
  --color: #e0e0e0;
  width: clamp(160px, 50%, 280px);
  height: 2px;
  background: var(--color);
  border-radius: 2px;
  margin: 4px auto;
  opacity: 0;

  z-index: 100;
}

.tree-text {
  width: clamp(200px, 75%, 400px);
  text-align: center;
  opacity: 0;
}

.tree-heading {
  font-size: 18px;
  font-weight: bold;
  color: #202124;
  margin: 6px 0 2px;
}

.tree-paragraph {
  font-size: 14px;
  color: #666;
  margin: 4px 0;
  line-height: 1.4;
}

.tree-error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: clamp(200px, 75%, 400px);
  padding: 24px 20px;
  border-radius: 16px;
  background: white;
  border: 1px solid #ea4335;
  box-shadow: 0 4px 12px rgba(234, 67, 53, 0.12);
  text-align: center;
  box-sizing: border-box;
}

.tree-error-icon {
  font-size: 32px;
  margin-bottom: 8px;
}

.tree-error-msg {
  font-size: 15px;
  color: #555;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

.tree-retry-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 24px;
  font-size: 15px;
  font-weight: bold;
  color: white;
  background: #ea4335;
  border: none;
  border-radius: 50px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(234, 67, 53, 0.35);
  transition:
    background 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease;
}

.tree-retry-btn:hover {
  background: #d93025;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(234, 67, 53, 0.4);
}

.tree-retry-btn:active {
  transform: translateY(0);
}

@media (max-width: 850px) {
  .container-background {
    margin: 10px;
  }

  .container h1 {
    font-size: 48px;
    padding-top: 110px;
  }

  .container p {
    font-size: 16px;
  }

  .logo {
    width: 300px;
  }

  .google-circle.green {
    right: -300px;
  }

  .google-circle.blue {
    right: -300px;
  }

  .google-circle.yellow {
    left: -300px;
  }

  .google-circle.red {
    left: -150px;
  }
}

@keyframes circleAnimation {
  to {
    transform: translate(0, 0);
  }
}

@keyframes fadeRight {
  from {
    transform: translateX(-50px);
  }
  to {
    transform: translateX(0px);
    opacity: 1;
  }
}

@keyframes rotate-background {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }

  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

@keyframes particle-drift {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-120px);
  }

  100% {
    transform: translateY(0px);
  }
}

/* --------------------------------------------------------------------------
   Accessibility & Motion Preferences
   -------------------------------------------------------------------------- */
/* User explicitly disabled motion */
html[data-motion="disabled"] .container-background-border,
html[data-motion="disabled"] .particle {
  animation: none !important;
}

html[data-motion="disabled"] .container a,
html[data-motion="disabled"] .container a::before,
html[data-motion="disabled"] .tree-img-card,
html[data-motion="disabled"] .tree-img-card img,
html[data-motion="disabled"] .tree-heading,
html[data-motion="disabled"] .tree-divider,
html[data-motion="disabled"] .logo,
html[data-motion="disabled"] .container h1,
html[data-motion="disabled"] #description {
  opacity: 1 !important;
  transform: none !important;
  animation: none !important;
  transition: none !important;
}

html[data-motion="disabled"] .container a img {
  transition: none !important;
}

html[data-motion="disabled"] .google-circle {
  transform: translate(0, 0) !important;
  animation: none !important;
}

/* OS prefers reduced motion, unless user explicitly enabled motion */
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="enabled"]) .container-background-border,
  html:not([data-motion="enabled"]) .particle {
    animation: none !important;
  }

  html:not([data-motion="enabled"]) .container a img {
    transition: none !important;
  }

  html:not([data-motion="enabled"]) .container a,
  html:not([data-motion="enabled"]) .tree-img-card,
  html:not([data-motion="enabled"]) .tree-img-card img,
  html:not([data-motion="enabled"]) .tree-heading,
  html:not([data-motion="enabled"]) .tree-divider,
  html:not([data-motion="enabled"]) .logo,
  html:not([data-motion="enabled"]) .container h1,
  html:not([data-motion="enabled"]) #description {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }

  html:not([data-motion="enabled"]) .google-circle {
    transform: translate(0, 0) !important;
    animation: none !important;
  }
}
