/* ========== Reset & Base ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Poppins', sans-serif;
  background: #0a0a1a;
  color: #f0f0f5;
  min-height: 100vh;
  overflow-x: hidden;
  max-width: 100vw;
  line-height: 1.6;
}

/* ========== Navbar ========== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 2rem;
  background: rgba(10, 10, 26, 0.8);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

/* Navbar Auth */
.nav-auth {
  display: flex;
  align-items: center;
}

.auth-btn {
  padding: 0.4rem 1.1rem;
  border-radius: 50px;
  border: 1px solid rgba(168, 85, 247, 0.4);
  background: rgba(168, 85, 247, 0.1);
  color: #d4b5ff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.6);
}

.auth-user {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.auth-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.4);
  object-fit: cover;
}

.auth-name {
  font-size: 0.82rem;
  color: #d4b5ff;
  font-weight: 500;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-logout-btn {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(240, 240, 245, 0.5);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-logout-btn:hover {
  background: rgba(255, 107, 107, 0.15);
  color: #ff9b9b;
}

.nav-icon {
  font-size: 1.5rem;
}

.nav-title {
  font-size: 1.25rem;
  font-weight: 700;
  background: linear-gradient(135deg, #ff6b6b, #a855f7, #00d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ========== Hero Section ========== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 3rem;
  position: relative;
  overflow: hidden;
}

.hero-bg-shapes {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.3;
  animation: float 12s ease-in-out infinite;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: #a855f7;
  top: -10%;
  right: -5%;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: #ff6b6b;
  bottom: 10%;
  left: -5%;
  animation-delay: -4s;
}

.shape-3 {
  width: 350px;
  height: 350px;
  background: #00d4ff;
  top: 40%;
  left: 50%;
  animation-delay: -8s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -30px) scale(1.05); }
  66% { transform: translate(-20px, 20px) scale(0.95); }
}

.hero-content {
  text-align: center;
  position: relative;
  z-index: 1;
  max-width: 700px;
  animation: fadeInUp 0.8s ease both;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 1.2rem;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, #ff6b6b, #a855f7, #00d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(240, 240, 245, 0.7);
  margin-bottom: 2rem;
  font-weight: 300;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 2.2rem;
  border-radius: 50px;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  text-decoration: none;
  font-weight: 600;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  font-family: 'Poppins', sans-serif;
  transition: all 0.3s ease;
  box-shadow: 0 4px 25px rgba(168, 85, 247, 0.35);
}

.hero-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 35px rgba(168, 85, 247, 0.5);
}

/* ========== Hero Gallery ========== */
.hero-gallery {
  width: 100%;
  max-width: 1200px;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
  overflow: hidden;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.gallery-track {
  display: flex;
  gap: 1.2rem;
  animation: scroll 35s linear infinite;
  width: max-content;
}

.gallery-track:hover {
  animation-play-state: paused;
}

@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.gallery-card {
  flex-shrink: 0;
  width: 220px;
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.1);
  animation: fadeInUp 0.6s ease both;
  animation-delay: calc(var(--delay) * 0.1s);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-card:hover img {
  transform: scale(1.1);
}

.card-label {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.5rem 0.8rem;
  background: linear-gradient(transparent, rgba(0,0,0,0.8));
  font-size: 0.8rem;
  font-weight: 600;
  color: white;
}

/* ========== Floating Chat Widget ========== */
.chat-widget {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 1000;
}

/* Chat bubble button */
.chat-bubble-btn {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-size: 1.6rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 30px rgba(168, 85, 247, 0.5);
  transition: all 0.3s ease;
  position: relative;
}

.chat-bubble-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 40px rgba(168, 85, 247, 0.65);
}

.bubble-icon-close {
  display: none;
  font-size: 1.4rem;
  font-style: normal;
}

.chat-widget.open .bubble-icon-open { display: none; }
.chat-widget.open .bubble-icon-close { display: block; }

/* Pulse animation on bubble */
.bubble-pulse {
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(168, 85, 247, 0.4);
  animation: pulse 2s ease-in-out infinite;
}

.chat-widget.open .bubble-pulse { display: none; }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0; }
}

/* Chat window */
.chat-window {
  position: absolute;
  bottom: 80px;
  right: 0;
  width: 380px;
  height: 520px;
  background: #12122a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 60px rgba(0, 0, 0, 0.6);
  animation: chatWindowIn 0.3s ease both;
}

.chat-widget.open .chat-window {
  display: flex;
}

@keyframes chatWindowIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Chat window header */
.chat-window-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.2));
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
}

.chat-window-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.2rem;
}

.chat-window-title strong {
  font-size: 0.9rem;
  display: block;
}

.chat-window-title small {
  font-size: 0.7rem;
  color: #4ade80;
  display: block;
}

.chat-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(255, 255, 255, 0.6);
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.chat-close-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: white;
}

/* Messages */
.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

/* Push messages to bottom when there are few */
.chat-messages .message:first-child {
  margin-top: auto;
}

.chat-messages::-webkit-scrollbar {
  width: 4px;
}

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(168, 85, 247, 0.3);
  border-radius: 2px;
}

.message {
  display: flex;
  max-width: 88%;
  animation: fadeInUp 0.3s ease both;
}

.assistant-message {
  align-self: flex-start;
}

.user-message {
  align-self: flex-end;
}

.message-bubble {
  padding: 0.7rem 1rem;
  border-radius: 16px;
  font-size: 0.85rem;
  line-height: 1.55;
}

.assistant-message .message-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-top-left-radius: 4px;
}

.user-message .message-bubble {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border-top-right-radius: 4px;
}

.message-bubble p {
  margin-bottom: 0.4rem;
}

.message-bubble p:last-child {
  margin-bottom: 0;
}

.message-bubble strong {
  font-weight: 600;
}

/* Typing indicator */
.typing-indicator {
  display: flex;
  gap: 5px;
  padding: 0.7rem 1rem;
  align-items: center;
}

.typing-indicator span {
  width: 7px;
  height: 7px;
  background: rgba(168, 85, 247, 0.6);
  border-radius: 50%;
  animation: typingBounce 1.4s ease-in-out infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.4; }
  30% { transform: translateY(-6px); opacity: 1; }
}

/* Suggestions */
.suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0 0.8rem 0.6rem;
  justify-content: center;
}

.suggestion-chip {
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  color: #d4b5ff;
  padding: 0.3rem 0.7rem;
  border-radius: 50px;
  font-size: 0.72rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.suggestion-chip:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.5);
}

.suggestions.hidden {
  display: none;
}

/* Chat Input */
.chat-input-area {
  padding: 0.7rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  padding: 0.5rem 0.5rem 0.5rem 0.8rem;
  transition: border-color 0.3s ease;
}

.input-wrapper:focus-within {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.08);
}

#chat-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #f0f0f5;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  resize: none;
  max-height: 80px;
  line-height: 1.4;
}

#chat-input::placeholder {
  color: rgba(240, 240, 245, 0.35);
}

.send-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 3px 12px rgba(168, 85, 247, 0.4);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none;
}

/* Chat window footer / disclaimer */
.chat-window-footer {
  padding: 0.5rem 0.8rem;
  font-size: 0.62rem;
  color: rgba(240, 240, 245, 0.35);
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  flex-shrink: 0;
}

/* My Plans button in navbar */
.my-plans-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  color: #d4b5ff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.my-plans-btn:hover {
  background: rgba(168, 85, 247, 0.2);
  border-color: rgba(168, 85, 247, 0.5);
}

@media (max-width: 480px) {
  .my-plans-btn span { display: none; }
  .my-plans-btn { padding: 0.35rem 0.5rem; }
}

/* ========== My Plans Section ========== */
.my-plans-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 5rem 1.5rem 2rem;
}

.my-plans-section.hidden {
  display: none;
}

.my-plans-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.my-plans-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  background: linear-gradient(135deg, #f0f0f5, #a855f7);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.my-plans-close {
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.5);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.my-plans-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

/* Plans list */
.my-plans-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.my-plans-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: rgba(240, 240, 245, 0.4);
  font-size: 0.9rem;
}

/* Plan card in list */
.plan-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.3rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease both;
  cursor: default;
}

.plan-card:hover {
  border-color: rgba(168, 85, 247, 0.25);
  background: rgba(168, 85, 247, 0.05);
}

.plan-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.15));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  flex-shrink: 0;
}

.plan-card-info {
  flex: 1;
  min-width: 0;
}

.plan-card-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #f0f0f5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.plan-card-meta {
  display: flex;
  gap: 0.8rem;
  margin-top: 0.2rem;
}

.plan-card-meta span {
  font-size: 0.7rem;
  color: rgba(240, 240, 245, 0.4);
}

.plan-card-btn {
  padding: 0.45rem 1rem;
  border-radius: 50px;
  border: 1px solid rgba(168, 85, 247, 0.3);
  background: rgba(168, 85, 247, 0.1);
  color: #d4b5ff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.plan-card-btn:hover {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border-color: transparent;
}

.my-plans-loading {
  text-align: center;
  padding: 2rem;
  color: rgba(240, 240, 245, 0.4);
  font-size: 0.85rem;
}

/* ========== Auth Promo Banner ========== */
.auth-promo {
  position: relative;
  max-width: 720px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  animation: fadeInUp 0.8s ease both;
  animation-delay: 1s;
}

.auth-promo.hidden {
  display: none;
}

.auth-promo-glow {
  position: absolute;
  inset: -1px;
  border-radius: 18px;
  background: linear-gradient(135deg, #a855f7, #6366f1, #00d4ff);
  opacity: 0.15;
  filter: blur(1px);
  animation: glowPulse 4s ease-in-out infinite;
}

.auth-promo-content {
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.4rem;
  background: rgba(18, 18, 42, 0.9);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 18px;
}

.auth-promo-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.auth-promo-text {
  flex: 1;
}

.auth-promo-text p {
  font-size: 0.82rem;
  color: rgba(240, 240, 245, 0.8);
  line-height: 1.4;
}

.auth-promo-text strong {
  color: #d4b5ff;
}

.auth-promo-sub {
  font-size: 0.7rem !important;
  color: rgba(240, 240, 245, 0.4) !important;
  margin-top: 0.15rem;
}

.auth-promo-btn {
  flex-shrink: 0;
  padding: 0.5rem 1.2rem;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.auth-promo-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.4);
}

.auth-promo-dismiss {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.8rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-promo-dismiss:hover {
  background: rgba(255, 255, 255, 0.2);
  color: white;
}

@media (max-width: 600px) {
  .auth-promo-content {
    flex-direction: column;
    text-align: center;
    gap: 0.7rem;
    padding: 1.2rem 1rem;
  }

  .auth-promo-icon { font-size: 1.3rem; }
}

/* ========== Auth Modal ========== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease;
}

.auth-overlay.hidden {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.auth-modal {
  width: 90%;
  max-width: 400px;
  background: #16162e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 2rem 1.8rem;
  position: relative;
  animation: fadeInUp 0.3s ease both;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.auth-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: none;
  color: rgba(255, 255, 255, 0.5);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.auth-modal-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.auth-tab {
  flex: 1;
  padding: 0.6rem;
  border: none;
  background: transparent;
  color: rgba(240, 240, 245, 0.5);
  font-family: 'Poppins', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-tab.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.2));
  color: #f0f0f5;
}

/* Social Buttons */
.auth-social {
  display: flex;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.social-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f0f5;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.social-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}

.google-btn:hover { border-color: rgba(66, 133, 244, 0.5); }
.facebook-btn:hover { border-color: rgba(24, 119, 242, 0.5); }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  margin-bottom: 1.2rem;
  gap: 0.8rem;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-divider span {
  font-size: 0.72rem;
  color: rgba(240, 240, 245, 0.35);
  white-space: nowrap;
}

/* Form fields */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.auth-field input {
  width: 100%;
  padding: 0.7rem 1rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f0f5;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.3s ease;
}

.auth-field input::placeholder {
  color: rgba(240, 240, 245, 0.3);
}

.auth-field input:focus {
  border-color: rgba(168, 85, 247, 0.5);
  box-shadow: 0 0 15px rgba(168, 85, 247, 0.08);
}

.auth-error {
  padding: 0.5rem 0.8rem;
  border-radius: 8px;
  background: rgba(255, 107, 107, 0.1);
  border: 1px solid rgba(255, 107, 107, 0.2);
  color: #ff9b9b;
  font-size: 0.75rem;
  text-align: center;
}

.auth-error.hidden { display: none; }

.auth-submit {
  padding: 0.7rem;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.3rem;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.35);
}

.auth-note {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(240, 240, 245, 0.3);
  margin-top: 1rem;
}

.register-only.hidden { display: none; }

/* ========== Footer ========== */
.footer {
  text-align: center;
  padding: 2rem;
  color: rgba(240, 240, 245, 0.3);
  font-size: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.footer-link {
  color: #d4b5ff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-link:hover {
  color: #a855f7;
}

/* ========== Animations ========== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeInUp 0.4s ease both;
}

.hidden {
  display: none;
}

/* ========== Error message ========== */
.error-bubble {
  background: rgba(255, 107, 107, 0.12) !important;
  border-color: rgba(255, 107, 107, 0.25) !important;
  color: #ff9b9b;
}

/* ========== Markdown-like formatting ========== */
.message-bubble ol,
.message-bubble ul {
  padding-left: 1.2rem;
  margin: 0.3rem 0;
}

.message-bubble li {
  margin-bottom: 0.2rem;
}

.message-bubble code {
  background: rgba(168, 85, 247, 0.15);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-size: 0.82em;
}

.message-bubble pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 0.6rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 0.4rem 0;
}

.message-bubble pre code {
  background: none;
  padding: 0;
}

/* ========== Plan Roadmap Section ========== */
.plan-section {
  padding: 4rem 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

.plan-section.hidden {
  display: none;
}

.plan-header {
  text-align: center;
  margin-bottom: 3rem;
  animation: fadeInUp 0.6s ease both;
}

.plan-title {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ff6b6b, #a855f7, #00d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}

.plan-subtitle {
  color: rgba(240, 240, 245, 0.6);
  font-size: 1rem;
  margin-bottom: 1rem;
}

.plan-badge {
  display: inline-block;
  padding: 0.3rem 1rem;
  border-radius: 50px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #d4b5ff;
  font-size: 0.8rem;
  font-weight: 600;
}

/* Roadmap container */
.plan-roadmap {
  position: relative;
}

/* ========== Calendar Layout ========== */
.calendar-month {
  margin-bottom: 2.5rem;
  animation: fadeInUp 0.5s ease both;
}

.calendar-month-header {
  text-align: center;
  font-size: 1.3rem;
  font-weight: 700;
  color: #f0f0f5;
  margin-bottom: 1rem;
  padding: 0.8rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.12), rgba(99, 102, 241, 0.08));
  border-radius: 14px;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.calendar-dow {
  margin-bottom: 4px;
  gap: 6px;
}

.calendar-dow-cell {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(168, 85, 247, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 0;
}

.calendar-cell {
  min-height: 100px;
  border-radius: 12px;
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
  position: relative;
  display: flex;
  flex-direction: column;
}

.calendar-cell-empty {
  background: transparent;
  border-color: transparent;
}

.calendar-cell-past {
  opacity: 0.35;
}

.calendar-cell-today {
  border-color: rgba(168, 85, 247, 0.5) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.15);
}

.calendar-cell-today .calendar-cell-date {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-cell-active {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  cursor: pointer;
}

.calendar-cell-active:hover {
  border-color: rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.1);
  transform: translateY(-2px);
}

.calendar-cell-date {
  font-size: 0.72rem;
  font-weight: 600;
  color: rgba(240, 240, 245, 0.5);
  margin-bottom: 0.3rem;
}

.calendar-cell-icon {
  font-size: 1.2rem;
  text-align: center;
  margin-bottom: 0.2rem;
}

.calendar-cell-title {
  font-size: 0.65rem;
  font-weight: 600;
  color: #f0f0f5;
  line-height: 1.3;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex: 1;
}

.calendar-cell-duration {
  font-size: 0.58rem;
  color: rgba(240, 240, 245, 0.4);
  margin-top: auto;
  padding-top: 0.2rem;
}

/* ========== Day Modal ========== */
.day-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.day-modal {
  background: #1a1a2e;
  border: 1px solid rgba(168, 85, 247, 0.25);
  border-radius: 20px;
  padding: 1.8rem;
  max-width: 500px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 0 60px rgba(168, 85, 247, 0.15);
  animation: fadeInUp 0.3s ease;
}

.day-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: rgba(240, 240, 245, 0.6);
  font-size: 1.3rem;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.day-modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #f0f0f5;
}

.day-modal-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.day-modal-icon {
  font-size: 2rem;
}

.day-modal-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: #d4b5ff;
}

.day-modal-day {
  font-size: 0.72rem;
  color: rgba(240, 240, 245, 0.45);
}

.day-modal-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #f0f0f5;
  margin-bottom: 0.6rem;
}

.day-modal-task {
  font-size: 0.85rem;
  color: rgba(240, 240, 245, 0.65);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.day-modal-tip {
  font-size: 0.78rem;
  color: #4ade80;
  padding: 0.6rem 0.8rem;
  background: rgba(74, 222, 128, 0.06);
  border-radius: 10px;
  border: 1px solid rgba(74, 222, 128, 0.12);
  margin-bottom: 1rem;
}

.day-modal-expand {
  display: block;
  width: 100%;
  padding: 0.6rem;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 10px;
  color: #d4b5ff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.day-modal-expand:hover {
  background: rgba(168, 85, 247, 0.18);
  border-color: rgba(168, 85, 247, 0.35);
}

/* Plan loading state */
.plan-loading {
  text-align: center;
  padding: 3rem;
}

.plan-loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid rgba(168, 85, 247, 0.15);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.plan-loading-text {
  color: rgba(240, 240, 245, 0.6);
  font-size: 0.9rem;
}

/* ========== Diet Section ========== */
.diet-section {
  margin-top: 2.5rem;
  padding: 1.8rem;
  background: rgba(74, 222, 128, 0.04);
  border: 1px solid rgba(74, 222, 128, 0.12);
  border-radius: 20px;
  animation: fadeInUp 0.5s ease both;
}

.diet-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.diet-header-icon {
  font-size: 2.2rem;
}

.diet-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #4ade80;
  margin-bottom: 0.2rem;
}

.diet-description {
  font-size: 0.8rem;
  color: rgba(240, 240, 245, 0.55);
  line-height: 1.4;
}

.diet-meals {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.diet-meal {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  padding: 1rem;
  transition: all 0.3s ease;
}

.diet-meal:hover {
  border-color: rgba(74, 222, 128, 0.25);
  background: rgba(74, 222, 128, 0.06);
}

.diet-meal-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.diet-meal-icon {
  font-size: 1.3rem;
}

.diet-meal-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #f0f0f5;
}

.diet-meal-options {
  list-style: none;
  padding: 0;
  margin: 0;
}

.diet-meal-options li {
  font-size: 0.75rem;
  color: rgba(240, 240, 245, 0.6);
  line-height: 1.5;
  padding: 0.3rem 0;
  padding-left: 1rem;
  position: relative;
}

.diet-meal-options li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: #4ade80;
  font-weight: bold;
}

.diet-hydration {
  padding: 0.7rem 1rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 12px;
  font-size: 0.78rem;
  color: rgba(147, 197, 253, 0.9);
  margin-bottom: 0.6rem;
}

.diet-notes {
  padding: 0.7rem 1rem;
  background: rgba(251, 191, 36, 0.06);
  border: 1px solid rgba(251, 191, 36, 0.12);
  border-radius: 12px;
  font-size: 0.75rem;
  color: rgba(253, 224, 71, 0.8);
  margin-bottom: 0.6rem;
}

.diet-disclaimer {
  text-align: center;
  font-size: 0.68rem;
  color: rgba(240, 240, 245, 0.3);
  margin-top: 0.8rem;
}

/* Plan link in chat */
.plan-link-btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  border: none;
  border-radius: 50px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
}

.plan-link-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

/* Save plan bar */
.save-plan-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  padding: 1rem;
  background: rgba(168, 85, 247, 0.06);
  border: 1px solid rgba(168, 85, 247, 0.15);
  border-radius: 14px;
}

.save-plan-bar.hidden {
  display: none;
}

.save-plan-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.4rem;
  border-radius: 50px;
  border: none;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: white;
  font-family: 'Poppins', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.save-plan-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 18px rgba(168, 85, 247, 0.4);
}

.save-plan-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.save-plan-btn.saved {
  background: linear-gradient(135deg, #22c55e, #16a34a);
}

.save-plan-status {
  font-size: 0.78rem;
  color: rgba(240, 240, 245, 0.6);
}

/* Plan disclaimer */
.plan-disclaimer {
  text-align: center;
  margin-top: 2rem;
  padding: 0.8rem;
  font-size: 0.72rem;
  color: rgba(240, 240, 245, 0.35);
  border: 1px solid rgba(255, 107, 107, 0.1);
  border-radius: 10px;
  background: rgba(255, 107, 107, 0.04);
}

/* Day detail (used inside modal) */
.day-detail {
  display: none;
  margin-top: 1rem;
  position: relative;
}

/* Steps timeline inside expanded card */
.detail-steps {
  position: relative;
  padding-left: 2rem;
}

.detail-steps::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: linear-gradient(to bottom, #a855f7, #6366f1, rgba(99,102,241,0.2));
}

.detail-step {
  position: relative;
  margin-bottom: 1rem;
  animation: fadeInUp 0.3s ease both;
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.detail-step:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(168, 85, 247, 0.2);
}

/* Glowing dot on step timeline */
.detail-step::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 1rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #a855f7;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
  animation: dotGlow 3s ease-in-out infinite;
  animation-delay: calc(var(--step-index, 0) * 0.4s);
}

.step-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
}

.step-icon {
  font-size: 1.1rem;
}

.step-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #f0f0f5;
  flex: 1;
}

.step-duration {
  font-size: 0.62rem;
  color: rgba(240, 240, 245, 0.4);
  background: rgba(255, 255, 255, 0.06);
  padding: 0.1rem 0.45rem;
  border-radius: 50px;
  white-space: nowrap;
}

.step-description {
  font-size: 0.75rem;
  color: rgba(240, 240, 245, 0.55);
  line-height: 1.5;
  padding-left: 1.6rem;
}

/* Motivation bar */
.detail-motivation {
  margin-top: 1rem;
  padding: 0.6rem 1rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.1), rgba(99, 102, 241, 0.08));
  border-radius: 10px;
  border: 1px solid rgba(168, 85, 247, 0.15);
  font-size: 0.78rem;
  color: #d4b5ff;
  text-align: center;
  font-style: italic;
}

.detail-warning {
  margin-top: 0.6rem;
  font-size: 0.68rem;
  color: rgba(255, 180, 107, 0.7);
  text-align: center;
}

/* Loading inside card */
.detail-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 0;
  color: rgba(240, 240, 245, 0.5);
  font-size: 0.8rem;
}

.detail-loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(168, 85, 247, 0.2);
  border-top-color: #a855f7;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* Collapse button */
.detail-close {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.8rem;
  padding: 0.35rem 0.8rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: rgba(240, 240, 245, 0.5);
  font-size: 0.7rem;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
  transition: all 0.3s ease;
}

.detail-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #f0f0f5;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .navbar {
    padding: 0.8rem 1.2rem;
  }

  .auth-name { display: none; }

  .hero {
    padding: 5rem 1.2rem 2rem;
  }

  .gallery-card {
    width: 170px;
    height: 130px;
  }

  .chat-widget {
    bottom: 16px;
    right: 16px;
  }

  .chat-widget.open .chat-bubble-btn {
    display: none;
  }

  /* On mobile: chat becomes a fixed fullscreen panel */
  .chat-widget.open .chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    z-index: 1100;
  }

  /* Ensure promo stays behind chat */
  .auth-promo {
    z-index: 1;
  }

  /* Calendar responsive */
  .calendar-grid {
    gap: 3px;
  }

  .calendar-cell {
    min-height: 70px;
    padding: 0.3rem;
    border-radius: 8px;
  }

  .calendar-cell-icon {
    font-size: 0.9rem;
  }

  .calendar-cell-title {
    font-size: 0.55rem;
    -webkit-line-clamp: 1;
  }

  .calendar-cell-duration {
    display: none;
  }

  .day-modal {
    padding: 1.2rem;
    margin: 0.5rem;
    max-height: 90vh;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }

  .gallery-card {
    width: 140px;
    height: 110px;
  }

  .chat-bubble-btn {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }

  .calendar-cell {
    min-height: 55px;
    padding: 0.2rem;
  }

  .calendar-cell-icon {
    font-size: 0.8rem;
  }

  .calendar-cell-title {
    font-size: 0.5rem;
  }

  .calendar-cell-date {
    font-size: 0.6rem;
  }
}
