/* Word Sneak - Corporate Bubblegum UI */

:root {
  --bubblegum-pink: #f8b4d4;
  --bubblegum-dark: #e88ab8;
  --corporate-blue: #5b9bd5;
  --corporate-light: #e8f4fc;
  --mint: #b8e6d5;
  --cream: #fff9f5;
  --text-dark: #2d3748;
  --text-soft: #5a6c7d;
  --shadow-soft: 0 4px 20px rgba(248, 180, 212, 0.25);
  --shadow-card: 0 8px 32px rgba(91, 155, 213, 0.15);
  --radius: 20px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  background: linear-gradient(160deg, var(--corporate-light) 0%, var(--cream) 40%, var(--bubblegum-pink) 100%);
  color: var(--text-dark);
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  position: relative;
}

/* Main view */
.main-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 520px;
  width: 100%;
}

.title {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  font-weight: 700;
  color: var(--text-dark);
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.subtitle {
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  color: var(--text-soft);
  margin: 0 0 1.5rem;
}

.genie-wrapper {
  margin: 1rem 0 1.5rem;
}

.genie-btn {
  display: block;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 50%;
  transition: transform 0.2s ease, filter 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.genie-btn:hover {
  transform: scale(1.05);
  filter: brightness(1.02);
}

.genie-btn:active {
  transform: scale(0.98);
}

.genie-img {
  display: block;
  width: clamp(220px, 52vw, 300px);
  height: auto;
  border-radius: 50%;
  object-fit: cover;
}

/* Words container */
.words-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  min-height: 4rem;
  margin-bottom: 1rem;
}

.word-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.2rem;
  font-size: clamp(0.95rem, 2.5vw, 1.1rem);
  font-weight: 600;
  color: var(--text-dark);
  background: rgba(255, 255, 255, 0.9);
  border: 2px solid var(--bubblegum-dark);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  opacity: 0;
  transform: scale(0.6) translateY(10px);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.word-bubble.visible {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.word-bubble:nth-child(1).visible { transition-delay: 0.1s; }
.word-bubble:nth-child(2).visible { transition-delay: 0.25s; }
.word-bubble:nth-child(3).visible { transition-delay: 0.4s; }

.click-again {
  font-size: 0.9rem;
  color: var(--text-soft);
  margin: 0;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease 0.5s, transform 0.3s ease 0.5s;
}

.click-again.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Office link - bottom right */
.office-link {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(91, 155, 213, 0.3);
  transition: background 0.2s, color 0.2s;
}

.office-link:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--corporate-blue);
}

/* Brain Rot AI link - bottom left */
.brainrot-link {
  position: fixed;
  bottom: 1.25rem;
  left: 1.25rem;
  font-size: 0.85rem;
  color: var(--text-soft);
  text-decoration: none;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(91, 155, 213, 0.3);
  transition: background 0.2s, color 0.2s;
}

.brainrot-link:hover {
  background: rgba(255, 255, 255, 0.95);
  color: var(--corporate-blue);
}

/* Office overlay (deskhell) */
.office-overlay {
  position: fixed;
  inset: 0;
  background: rgba(45, 55, 72, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.office-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.office-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s;
}

.office-close:hover {
  background: rgba(255, 255, 255, 0.35);
}

.deskhell-img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* Mobile tweaks */
@media (max-width: 480px) {
  #app {
    padding: 1rem;
  }

  .genie-img {
    width: clamp(200px, 58vw, 260px);
  }

  .word-bubble {
    padding: 0.5rem 1rem;
  }

  .office-link {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
  }

  .brainrot-link {
    bottom: 1rem;
    left: 1rem;
    font-size: 0.8rem;
  }
}
