/* ==========================================================================
   fal.uzdil.com.tr - Glassmorphism & Live Chat Consultation Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700;900&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --bg-deep: #070712;
  --bg-card: rgba(22, 14, 45, 0.65);
  --glass-border: rgba(243, 198, 79, 0.25);
  
  --primary-gold: #f3c64f;
  --primary-gold-light: #ffe596;
  --gold-gradient: linear-gradient(135deg, #ffe596 0%, #f3c64f 50%, #b8860b 100%);
  --cosmic-purple: #9d4edd;
  --cosmic-violet: #3c096c;
  --text-light: #f4f4f9;
  --text-muted: #a0a0c0;
  
  --font-serif: 'Cinzel', serif;
  --font-sans: 'Plus Jakarta Sans', sans-serif;
  
  --shadow-glow: 0 0 25px rgba(243, 198, 79, 0.2);
  --shadow-card: 0 15px 35px rgba(0, 0, 0, 0.6);
  --radius-lg: 20px;
  --radius-md: 12px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-deep);
  color: var(--text-light);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

#canvas-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  pointer-events: none;
}

.cosmic-radial-glow {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 800px;
  height: 800px;
  background: radial-gradient(circle, rgba(157, 78, 221, 0.15) 0%, rgba(60, 9, 108, 0.05) 50%, transparent 70%);
  z-index: -1;
  pointer-events: none;
  filter: blur(50px);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 2rem;
  background: rgba(10, 8, 24, 0.7);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--glass-border);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.brand-icon {
  font-size: 1.8rem;
  filter: drop-shadow(0 0 10px var(--primary-gold));
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.user-status-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(243, 198, 79, 0.1);
  border: 1px solid var(--glass-border);
  padding: 0.4rem 1rem;
  border-radius: 30px;
  font-size: 0.9rem;
  color: var(--primary-gold-light);
}

.btn-logout {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--text-muted);
  padding: 0.4rem 0.9rem;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-logout:hover {
  background: rgba(255, 77, 77, 0.2);
  color: #ff6b6b;
  border-color: #ff6b6b;
}

.main-container {
  max-width: 900px;
  margin: 2rem auto;
  padding: 0 1.5rem;
}

.glass-panel {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.title-serif {
  font-family: var(--font-serif);
  background: var(--gold-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-align: center;
  margin-bottom: 0.5rem;
}

.subtitle-muted {
  color: var(--text-muted);
  text-align: center;
  font-size: 0.95rem;
  margin-bottom: 1.8rem;
}

.form-group {
  margin-bottom: 1.3rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  color: var(--primary-gold-light);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(10, 7, 24, 0.7);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  color: var(--text-light);
  font-size: 1rem;
  font-family: var(--font-sans);
  transition: all 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-gold);
  box-shadow: 0 0 15px rgba(243, 198, 79, 0.25);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 1rem 1.8rem;
  background: var(--gold-gradient);
  color: #0d091a;
  font-weight: 700;
  font-family: var(--font-sans);
  font-size: 1.05rem;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  box-shadow: var(--shadow-glow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-gold:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px rgba(243, 198, 79, 0.45);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.option-card {
  background: rgba(15, 10, 35, 0.6);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.option-card:hover, .option-card.selected {
  border-color: var(--primary-gold);
  background: rgba(60, 9, 108, 0.5);
  box-shadow: 0 0 20px rgba(243, 198, 79, 0.3);
  transform: translateY(-3px);
}

.option-icon {
  font-size: 2rem;
  margin-bottom: 0.4rem;
}

.option-title {
  font-weight: 600;
  color: var(--primary-gold-light);
  margin-bottom: 0.2rem;
}

.option-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ==========================================================================
   LIVE CHAT & CONSULTATION INTERFACE STYLES
   ========================================================================== */

.chat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 1.5rem;
}

.chat-stream-box {
  min-height: 380px;
  max-height: 520px;
  overflow-y: auto;
  padding: 1rem;
  background: rgba(10, 6, 26, 0.5);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.chat-stream-box::-webkit-scrollbar {
  width: 6px;
}

.chat-stream-box::-webkit-scrollbar-thumb {
  background: var(--primary-gold);
  border-radius: 10px;
}

.chat-bubble {
  max-width: 82%;
  padding: 1rem 1.3rem;
  border-radius: 18px;
  font-size: 0.98rem;
  line-height: 1.6;
  white-space: pre-line;
}

.chat-bubble.bot {
  align-self: flex-start;
  background: rgba(30, 15, 60, 0.85);
  border: 1px solid var(--glass-border);
  border-top-left-radius: 4px;
  color: #f0f0ff;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.chat-bubble.user {
  align-self: flex-end;
  background: var(--gold-gradient);
  color: #0b0717;
  font-weight: 500;
  border-top-right-radius: 4px;
}

.chat-prompt-card {
  background: rgba(243, 198, 79, 0.08);
  border: 1.5px solid var(--primary-gold);
  border-radius: var(--radius-md);
  padding: 1.2rem;
  margin-top: 0.5rem;
  box-shadow: 0 0 20px rgba(243, 198, 79, 0.15);
}

.prompt-title {
  font-family: var(--font-serif);
  color: var(--primary-gold-light);
  font-weight: 700;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.prompt-question {
  font-size: 1.05rem;
  color: #fff;
  font-weight: 600;
  background: rgba(10, 6, 26, 0.6);
  padding: 0.8rem;
  border-radius: 8px;
  border-left: 3px solid var(--primary-gold);
  margin-bottom: 1rem;
}

.prompt-option-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(253, 218, 112, 0.3);
  color: #e2e2ff;
  padding: 0.7rem 1rem;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.prompt-option-btn:hover {
  background: var(--cosmic-violet);
  border-color: var(--primary-gold);
  color: #fff;
  transform: translateX(5px);
}

.chat-input-container {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

/* 3D Card Selection Area */
.cards-spread-area {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1rem;
}

.tarot-card-3d {
  width: 110px;
  height: 180px;
  perspective: 1000px;
  cursor: pointer;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
}

.tarot-card-3d.flipped .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.8rem;
}

.card-back {
  background: linear-gradient(135deg, #180b30 0%, #0a0618 100%);
  border: 2px solid var(--primary-gold);
}

.card-back::after {
  content: '✦';
  font-size: 2rem;
  color: var(--primary-gold);
}

.card-front {
  background: linear-gradient(145deg, #231247 0%, #0e071f 100%);
  transform: rotateY(180deg);
  border-color: var(--primary-gold-light);
}

/* ==========================================================================
   100% RESPONSIVE MEDIA QUERIES (TABLET & MOBILE OPTIMIZATIONS)
   ========================================================================== */

/* Universal Touch & Fluid Typography Fixes */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}

input, button, select, textarea {
  font-size: 16px; /* Prevents auto-zoom on mobile Safari / Chrome */
}

/* Tablet & Medium Screens (max-width: 840px) */
@media (max-width: 840px) {
  .navbar {
    padding: 0.9rem 1.2rem;
    flex-wrap: wrap;
    gap: 0.8rem;
  }

  .user-status-bar {
    width: 100%;
    justify-content: space-between;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 0.4rem;
  }

  .main-container {
    max-width: 100%;
    margin: 1rem auto;
    padding: 0 1rem;
  }

  .glass-panel {
    padding: 1.6rem 1.3rem;
    border-radius: 16px;
  }

  .options-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.75rem;
  }

  .option-card {
    padding: 0.9rem 0.6rem;
  }

  .option-icon {
    font-size: 1.6rem;
  }

  .option-title {
    font-size: 0.88rem;
  }

  .option-desc {
    font-size: 0.75rem;
  }
}

/* Mobile Screens (max-width: 600px) */
@media (max-width: 600px) {
  .navbar {
    padding: 0.75rem 0.85rem;
  }

  .brand-title {
    font-size: 1.15rem;
  }

  .brand-icon {
    font-size: 1.4rem;
  }

  .user-status-bar {
    gap: 0.5rem;
  }

  .user-badge {
    padding: 0.3rem 0.6rem;
    font-size: 0.78rem;
  }

  .btn-logout {
    padding: 0.3rem 0.7rem;
    font-size: 0.8rem;
  }

  .main-container {
    padding: 0 0.6rem;
    margin: 0.6rem auto;
  }

  .glass-panel {
    padding: 1.25rem 0.9rem;
    border-radius: 14px;
  }

  .title-serif {
    font-size: 1.45rem !important;
  }

  .subtitle-muted {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
  }

  /* Options Grid on Mobile: Stacks cleanly */
  .options-grid {
    grid-template-columns: 1fr !important;
    gap: 0.6rem;
  }

  .option-card {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    text-align: left;
    padding: 0.85rem 1rem;
  }

  .option-icon {
    margin-bottom: 0;
    font-size: 1.5rem;
  }

  .grid-3 {
    grid-template-columns: 1fr !important;
    gap: 0.6rem;
  }

  .btn-gold {
    padding: 0.85rem 1.2rem;
    font-size: 0.95rem;
  }

  /* Live Chat Mobile Optimizations */
  .chat-header {
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  .chat-stream-box {
    min-height: 280px;
    max-height: calc(100vh - 280px);
    padding: 0.75rem 0.6rem;
    gap: 0.85rem;
    margin-bottom: 1rem;
  }

  .chat-bubble {
    max-width: 92%;
    padding: 0.8rem 0.95rem;
    font-size: 0.9rem;
    line-height: 1.5;
    border-radius: 14px;
  }

  .chat-input-container {
    gap: 0.4rem;
  }

  .chat-input-container input {
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
  }

  .chat-input-container button {
    padding: 0.75rem 1rem !important;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  /* Tarot 3D Cards Mobile */
  .tarot-card-3d {
    width: 85px;
    height: 140px;
  }

  .cards-spread-area {
    gap: 0.5rem;
  }
}

/* Small Compact Phones (max-width: 360px) */
@media (max-width: 360px) {
  .brand-title {
    font-size: 1rem;
  }

  .glass-panel {
    padding: 1rem 0.75rem;
  }

  .title-serif {
    font-size: 1.3rem !important;
  }

  .chat-bubble {
    max-width: 95%;
    font-size: 0.85rem;
  }
}
