/* ------------------------- */
/* --- Global & Theme --- */
/* ------------------------- */
:root {
  --accent-color: #4545c4;
  --background-color: #ffffff;
  --text-primary: #1d1d1f;
  --text-secondary: #5a5a5f;
  --border-color: #d2d2d7;
  --grid-color: #f0f0f0;
}

/* import roboto */
@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Roboto+Mono:wght@400;500;700&display=swap");

/* Base styles from previous version... */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Roboto", -apple-system, sans-serif;
}
body {
  font-family: "roboto", -apple-system, sans-serif;
  background-color: var(--background-color);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  min-height: 100vh;
  overflow: hidden;
}

/* --------------------------------- */
/* --- Background Effects --- */
/* --------------------------------- */
.grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: linear-gradient(
      to right,
      var(--grid-color) 1px,
      transparent 1px
    ),
    linear-gradient(to bottom, var(--grid-color) 1px, transparent 1px);
  background-size: 40px 40px;
  z-index: 0;
  opacity: 0.5;
}

.animation-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}
.shape {
  position: absolute;
  border: 25px dashed #49494944;
  /* Faster transition for reactive animation */
  transition: all 1.5s cubic-bezier(0.65, 0, 0.35, 1);
  animation: morph 16s infinite ease-in-out;
}

/* Shape positions and keyframes are unchanged */
/* In style.css, replace the .shape-1 to .shape-4 rules */

/* --- Ambient Shape Positions (40 shapes) --- */
.shape-1 {
  top: 15%;
  left: 8%;
  width: 100px;
  height: 100px;
  animation-delay: -1s;
}
.shape-2 {
  top: 12%;
  left: 28%;
  width: 30px;
  height: 30px;
  animation-delay: -2s;
}
.shape-3 {
  top: 8%;
  left: 55%;
  width: 80px;
  height: 80px;
  animation-delay: -3s;
}
.shape-4 {
  top: 18%;
  left: 88%;
  width: 60px;
  height: 60px;
  animation-delay: -4s;
}
.shape-5 {
  top: 28%;
  left: 18%;
  width: 50px;
  height: 50px;
  animation-delay: -5s;
}
.shape-6 {
  top: 32%;
  left: 45%;
  width: 120px;
  height: 120px;
  animation-delay: -6s;
}
.shape-7 {
  top: 35%;
  left: 75%;
  width: 40px;
  height: 40px;
  animation-delay: -7s;
}
.shape-8 {
  top: 45%;
  left: 8%;
  width: 70px;
  height: 70px;
  animation-delay: -8s;
}
.shape-9 {
  top: 52%;
  left: 25%;
  width: 60px;
  height: 60px;
  animation-delay: -9s;
}
.shape-10 {
  top: 58%;
  left: 55%;
  width: 90px;
  height: 90px;
  animation-delay: -10s;
}
.shape-11 {
  top: 55%;
  left: 85%;
  width: 30px;
  height: 30px;
  animation-delay: -11s;
}
.shape-12 {
  top: 68%;
  left: 15%;
  width: 40px;
  height: 40px;
  animation-delay: -12s;
}
.shape-13 {
  top: 72%;
  left: 35%;
  width: 80px;
  height: 80px;
  animation-delay: -13s;
}
.shape-14 {
  top: 75%;
  left: 65%;
  width: 50px;
  height: 50px;
  animation-delay: -14s;
}
.shape-15 {
  top: 82%;
  left: 90%;
  width: 70px;
  height: 70px;
  animation-delay: -15s;
}
.shape-16 {
  top: 88%;
  left: 5%;
  width: 60px;
  height: 60px;
  animation-delay: -16s;
}
.shape-17 {
  top: 90%;
  left: 28%;
  width: 30px;
  height: 30px;
  animation-delay: -17s;
}
.shape-18 {
  top: 85%;
  left: 48%;
  width: 100px;
  height: 100px;
  animation-delay: -18s;
}
.shape-19 {
  top: 92%;
  left: 78%;
  width: 40px;
  height: 40px;
  animation-delay: -19s;
}
.shape-20 {
  top: 5%;
  left: 78%;
  width: 50px;
  height: 50px;
  animation-delay: -20s;
}
.shape-21 {
  top: 25%;
  left: 35%;
  width: 40px;
  height: 40px;
  animation-delay: -21s;
}
.shape-22 {
  top: 22%;
  left: 68%;
  width: 70px;
  height: 70px;
  animation-delay: -22s;
}
.shape-23 {
  top: 40%;
  left: 90%;
  width: 30px;
  height: 30px;
  animation-delay: -23s;
}
.shape-24 {
  top: 48%;
  left: 65%;
  width: 60px;
  height: 60px;
  animation-delay: -24s;
}
.shape-25 {
  top: 42%;
  left: 2%;
  width: 90px;
  height: 90px;
  animation-delay: -25s;
}
.shape-26 {
  top: 65%;
  left: 92%;
  width: 50px;
  height: 50px;
  animation-delay: -26s;
}
.shape-27 {
  top: 60%;
  left: 18%;
  width: 30px;
  height: 30px;
  animation-delay: -27s;
}
.shape-28 {
  top: 77%;
  left: 50%;
  width: 80px;
  height: 80px;
  animation-delay: -28s;
}
.shape-29 {
  top: 65%;
  left: 75%;
  width: 40px;
  height: 40px;
  animation-delay: -29s;
}
.shape-30 {
  top: 80%;
  left: 20%;
  width: 70px;
  height: 70px;
  animation-delay: -30s;
}
.shape-31 {
  top: 3%;
  left: 8%;
  width: 50px;
  height: 50px;
  animation-delay: -31s;
}
.shape-32 {
  top: 5%;
  left: 38%;
  width: 60px;
  height: 60px;
  animation-delay: -32s;
}
.shape-33 {
  top: 22%;
  left: 5%;
  width: 80px;
  height: 80px;
  animation-delay: -33s;
}
.shape-34 {
  top: 28%;
  left: 92%;
  width: 40px;
  height: 40px;
  animation-delay: -34s;
}
.shape-35 {
  top: 35%;
  left: 60%;
  width: 70px;
  height: 70px;
  animation-delay: -35s;
}
.shape-36 {
  top: 45%;
  left: 40%;
  width: 30px;
  height: 30px;
  animation-delay: -36s;
}
.shape-37 {
  top: 50%;
  left: 95%;
  width: 80px;
  height: 80px;
  animation-delay: -37s;
}
.shape-38 {
  top: 68%;
  left: 2%;
  width: 50px;
  height: 50px;
  animation-delay: -38s;
}
.shape-39 {
  top: 75%;
  left: 82%;
  width: 60px;
  height: 60px;
  animation-delay: -39s;
}
.shape-40 {
  top: 90%;
  left: 60%;
  width: 90px;
  height: 90px;
  animation-delay: -40s;
}
@keyframes morph {
  0% {
    transform: rotate(0deg) scale(1);
    border-radius: 10%;
  }
  25% {
    transform: rotate(45deg) scale(0.8);
    border-radius: 30%;
  }
  50% {
    transform: rotate(90deg) scale(1.2);
    border-radius: 50%;
    opacity: 0.7;
  }
  75% {
    transform: rotate(135deg) scale(0.9);
    border-radius: 20%;
  }
  100% {
    transform: rotate(180deg) scale(1);
    border-radius: 10%;
  }
}

/* ---------------------------------- */
/* --- Content & Interactive Prompt --- */
/* ---------------------------------- */
.content-wrapper {
  position: relative;
  z-index: 10;
  width: 90%;
  max-width: 550px;
  padding: 20px;
}
#auth {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 30px;
  backdrop-filter: blur(5px);
  border-radius: 10px;
  /* background-color: #4545c412; */
}
.logo {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 32px;
}

/* NEW: Interactive Prompt Styles */
.interactive-prompt {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(1.8rem, 5vw, 2.75rem);
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: -0.04em;
  line-height: 1.2;
  margin-bottom: 24px;
  height: 100px; /* Give it a fixed height to prevent layout shifts */
}
.cursor {
  display: inline-block;
  width: 3px;
  height: 2.5rem;
  background-color: var(--accent-color);
  margin-left: 8px;
  animation: blink 1s infinite;
  vertical-align: bottom;
}
@keyframes blink {
  50% {
    opacity: 0;
  }
}

.tagline {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 40px;
  max-width: 420px;
}

/* UPDATED: Google-compliant Button */
.google-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 24px;
  background-color: var(--background-color);
  color: #3c4043;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.google-btn:hover {
  background-color: #f8f9fa;
  border-color: #c6c6c6;
}
.google-btn svg {
  width: 20px;
  height: 20px;
  margin-right: 16px;
}

/* User info styles are unchanged */
#user-info {
  display: flex;
  align-items: center;
  width: 100%;
}
#user-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--accent-color);
  color: var(--background-color);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}
.user-details {
  margin-left: 16px;
  text-align: left;
}
#user-name {
  font-size: 18px;
  font-weight: 700;
}
#user-email {
  font-size: 15px;
  color: var(--text-secondary);
}
#logout-btn {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
#logout-btn:hover {
  border-color: var(--text-primary);
  color: var(--text-primary);
  background-color: #f9f9f9;
}
.hidden {
  display: none !important;
}

/* --------------------------------- */
/* --- Desktop Split-Screen Layout --- */
/* --------------------------------- */
@media (min-width: 1024px) {
  body {
    /* On screens wider than 1024px, create two columns.
           The left takes up the remaining space, the right is for content. */
    grid-template-columns: 1fr 40%;
    padding: 0 5vw; /* Add some padding on the sides of the whole page */
  }

  .content-wrapper {
    /* Tell the content to live in the second grid column (the right side) */
    grid-column: 2 / 3;

    /* Ensure it's vertically centered within its column */
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .animation-wrapper {
    /* The animation remains in the background, but will now be primarily
          visible in the empty first column on the left. */
    z-index: 0;
  }

  .grid-overlay {
    z-index: -1;
  }
}
