:root {
  /* Vlam Brand Colors */
  --vlam-orange: #FF5A00;
  --vlam-orange-light: #FF7A33;
  --vlam-orange-dark: #cc4800;
  --vlam-gradient: linear-gradient(135deg, #FF5A00 0%, #FF9500 100%);

  /* Dark Mode Palette */
  --bg-darker: #0d0d12;
  --bg-dark: #15151e;
  --bg-panel: rgba(30, 30, 42, 0.6);
  --bg-panel-hover: rgba(45, 45, 60, 0.8);

  --text-primary: #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted: #6B7280;

  /* Utilities */
  --border-radius-lg: 24px;
  --border-radius-md: 16px;
  --border-radius-sm: 8px;

  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);

  /* Swipe Card Physics variables */
  --card-width: 380px;
  --card-height: 580px;

  font-family: 'Outfit', sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.dark-theme {
  background-color: var(--bg-darker);
  color: var(--text-primary);
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

/* Background Ambient Animation */
.background-ambient {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: -1;
  overflow: hidden;
}

.blob-1,
.blob-2 {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.15;
  animation: float 20s infinite alternate ease-in-out;
}

.blob-1 {
  width: 600px;
  height: 600px;
  background: var(--vlam-orange);
  top: -200px;
  right: -100px;
}

.blob-2 {
  width: 500px;
  height: 500px;
  background: #FF9500;
  bottom: -100px;
  left: -200px;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  100% {
    transform: translate(-100px, 100px) scale(1.1);
  }
}

/* Utility Classes */
.hidden {
  display: none !important;
}

.glass-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: var(--glass-border);
  box-shadow: var(--glass-shadow);
}

.view-transition {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.btn-fire {
  background: var(--vlam-gradient);
  color: white;
  border: none;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.btn-fire:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(255, 90, 0, 0.4);
}

/* Landing Page View */
.auth-view {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 50;
}

/* Landing Layout styles.css */
.landing-layout {
  display: flex;
  max-width: 1200px;
  width: 90%;
  margin: 0 auto;
  align-items: center;
  gap: 80px;
  z-index: 2;
}

.landing-left {
  flex: 1;
  display: flex;
  justify-content: center;
  position: relative;
}

.hero-image {
  max-width: 100%;
  height: auto;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.1);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 1) 80%, rgba(0, 0, 0, 0) 100%);
}

.landing-right {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.landing-right .logo-hero {
  font-size: 100px;
  font-weight: 800;
  background: var(--vlam-gradient);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: 4px;
  margin-bottom: 20px;
  text-shadow: 0 10px 30px rgba(255, 90, 0, 0.4);
}

.hero-title {
  font-size: 48px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 40px;
  color: white;
}

.highlight-text {
  color: var(--vlam-orange);
}

.landing-right .auth-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
  min-height: 80px;
}

.app-store-section {
  margin-top: 40px;
}

.app-store-text {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 15px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.store-badge img {
  height: 60px;
  border-radius: 8px;
  transition: transform 0.2s;
}

.store-badge:hover img {
  transform: scale(1.05);
}

@media (max-width: 900px) {
  .landing-layout {
    flex-direction: column;
    text-align: center;
    gap: 40px;
    padding: 20px 0;
  }

  .landing-left {
    order: 2;
    /* Move image below text on mobile */
  }

  .landing-right {
    order: 1;
    align-items: center;
    text-align: center;
  }

  .landing-right .auth-actions {
    align-items: center;
  }

  .hero-title {
    font-size: 36px;
  }

  .landing-right .logo-hero {
    font-size: 72px;
  }
}

/* Fix Google button width styling internally */
#google-signin-btn {
  display: inline-block;
  min-width: 280px;
}

.error-text {
  color: #ff3b30;
  margin-top: 15px;
  font-size: 14px;
  background: rgba(255, 59, 48, 0.1);
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid rgba(255, 59, 48, 0.3);
}


/* App Layout */
.app-view {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 350px;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: var(--glass-border);
  border-radius: 0;
  z-index: 10;
}

.user-header {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.avatar-ring {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  padding: 2px;
  background: var(--vlam-gradient);
}

.avatar-ring img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--bg-darker);
}

.user-details {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-details h3 {
  font-size: 16px;
  font-weight: 600;
}

.icon-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.2s;
}

.icon-btn:hover {
  color: var(--vlam-orange);
}

.side-nav {
  display: flex;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-tab {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  padding: 15px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border-bottom: 2px solid transparent;
  transition: all 0.2s;
}

.nav-tab:hover {
  color: white;
  background: rgba(255, 255, 255, 0.02);
}

.nav-tab.active {
  color: var(--vlam-orange);
  border-bottom-color: var(--vlam-orange);
}

.sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 10px;
}

/* Scrollbar styling */
.sidebar-content::-webkit-scrollbar {
  width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 10px;
}

/* Discovery Main Area */
.main-content {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  /* Allows animated bg to show */
  overflow: hidden;
}

.main-view {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0;
  left: 0;
}


/* SWIPE DECK (Tinder style) */
.swipe-container {
  width: var(--card-width);
  height: var(--card-height);
  position: relative;
  perspective: 1000px;
}

.deck-empty-state {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-align: center;
  gap: 20px;
}

.pulse-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: rgba(255, 90, 0, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 90, 0, 0.3);
  animation: pulse 2s infinite;
}

.pulse-ring span {
  font-size: 40px;
  color: var(--vlam-orange);
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 90, 0, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 20px rgba(255, 90, 0, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(255, 90, 0, 0);
  }
}

/* Individual Swiping Card */
.profile-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-panel);
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  cursor: grab;
  /* Will be controlled by JS logic mostly */
  transform-origin: 50% 100%;
  transition: transform 0.3s ease, opacity 0.3s ease;
  z-index: 10;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-card.dragging {
  transition: none;
  /* remove transition when dragging */
  cursor: grabbing;
}

.card-image-container {
  width: 100%;
  height: 100%;
  position: relative;
  background: #2a2a35;
}

.card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 100%);
  pointer-events: none;
}

.card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 24px;
  color: white;
  pointer-events: none;
}

.card-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.card-name {}

.card-age {
  font-weight: 300;
  font-size: 26px;
}

.card-bio {
  font-size: 15px;
  line-height: 1.4;
  opacity: 0.9;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-distance {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  margin-top: 8px;
  color: var(--vlam-orange-light);
}

.stamp-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.stamp {
  position: absolute;
  top: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  border: 4px solid;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 2px;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.1s, transform 0.1s;
}

.like-stamp {
  color: #34c759;
  border-color: #34c759;
  left: 30px;
  transform: rotate(-15deg);
}

.nope-stamp {
  color: #ff3b30;
  border-color: #ff3b30;
  right: 30px;
  transform: rotate(15deg);
}

.super-stamp {
  color: #ff9500;
  border-color: #ff9500;
  bottom: 80px;
  top: auto;
  left: 50%;
  transform: translateX(-50%) rotate(0deg);
}

/* Bottom Action Buttons */
.swipe-controls {
  margin-top: 30px;
  display: flex;
  gap: 20px;
  padding: 15px 30px;
  border-radius: 40px;
  align-items: center;
}

.control-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s, background 0.2s;
}

.control-btn:hover {
  transform: scale(1.1);
  background: rgba(40, 40, 50, 0.8);
}

.control-btn.super {
  width: 50px;
  height: 50px;
}


/* Matches / Kletskamer Lists */
.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 14px;
}

.matches-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.match-item {
  aspect-ratio: 1;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.2s;
}

.match-item:hover {
  transform: scale(1.05);
}

.match-item.unseen {
  border-color: var(--vlam-orange);
}

.match-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.match-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  padding: 5px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

.room-list {
  list-style: none;
}

.room-item {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 12px;
  border-radius: var(--border-radius-sm);
  cursor: pointer;
  transition: background 0.2s;
  margin-bottom: 5px;
}

.room-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.room-item.active {
  background: rgba(255, 90, 0, 0.1);
  border: 1px solid rgba(255, 90, 0, 0.3);
}

.room-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #2a2a35;
  display: flex;
  align-items: center;
  justify-content: center;
}

.room-icon.orange-svg {
  color: var(--vlam-orange);
}

.room-info h4 {
  font-size: 15px;
  font-weight: 500;
}

.room-info .member-count {
  font-size: 12px;
  color: var(--text-muted);
}


/* Chat View (Matches & Rooms) */
#view-chat {
  width: 90%;
  max-width: 800px;
  height: 90%;
  border-radius: var(--border-radius-lg);
  display: flex;
  flex-direction: column;
}

.chat-header {
  padding: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-title {
  display: flex;
  align-items: center;
  gap: 15px;
}

.chat-title .room-icon {
  width: 40px;
  height: 40px;
}

.chat-title h2 {
  font-size: 18px;
  font-weight: 600;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.chat-empty {
  margin: auto;
  color: var(--text-muted);
  font-size: 15px;
  text-align: center;
}

/* Base message style */
.message {
  max-width: 80%;
  display: flex;
  gap: 10px;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.message-bubble {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  position: relative;
}

.message.mine {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message.theirs {
  align-self: flex-start;
}

/* In a chat room, show the name of the sender */
.message-sender {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
  display: block;
}

.message.mine .message-sender {
  display: none;
}

.message.mine .message-bubble {
  background: var(--vlam-gradient);
  color: white;
  border-bottom-right-radius: 4px;
}

.message.theirs .message-bubble {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-bottom-left-radius: 4px;
}

.message-time {
  font-size: 10px;
  opacity: 0.7;
  margin-top: 5px;
  text-align: right;
}

.chat-input-area {
  padding: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  display: flex;
  gap: 10px;
}

.chat-input-area input {
  flex: 1;
  padding: 14px 20px;
  border-radius: 25px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: white;
  font-family: 'Outfit';
  font-size: 15px;
  outline: none;
}

.chat-input-area input:focus {
  border-color: var(--vlam-orange);
}

.send-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--vlam-gradient);
  border: none;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s;
}

.send-btn:hover {
  transform: scale(1.05);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
}

.match-content {
  width: 90%;
  max-width: 400px;
  padding: 40px;
  text-align: center;
  border-radius: var(--border-radius-lg);
}

.match-title {
  font-size: 36px;
  font-weight: 800;
  color: var(--vlam-orange);
  margin-bottom: 10px;
  font-family: 'Outfit', cursive;
  /* playful */
}

.match-avatars {
  display: flex;
  justify-content: center;
  margin: 30px 0;
}

.avatar-large {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  border: 4px solid var(--vlam-orange);
  object-fit: cover;
}

.offset-left {
  transform: translateX(20px);
  z-index: 2;
}

.offset-right {
  transform: translateX(-20px);
  z-index: 1;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.secondary-btn {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 16px;
  border-radius: var(--border-radius-sm);
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.secondary-btn:hover {
  background: rgba(255, 255, 255, 0.1);
}