/* DUO Valorant Matchmaking - Fully Synchronized Light & Dark Theme System */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800;900&display=swap');

:root {
  /* DARK THEME (Default) */
  --bg-body: #07090e;
  --bg-shell: #0e1117;
  --bg-header: #0e1117;
  --bg-card: #161b26;
  --bg-input: #1e2636;
  --bg-nav: #0e1117;
  --bg-action-btn: #1a202c;
  
  --text-main: #f8fafc;
  --text-label: #cbd5e1;
  --text-muted: #94a3b8;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-color: rgba(0, 0, 0, 0.5);

  --pill-bg: rgba(255, 255, 255, 0.08);
  --pill-text: #94a3b8;
  --pill-active-bg: #fe3c72;
  --pill-active-text: #ffffff;

  --primary-pink: #fe3c72;
  --primary-purple: #8b5cf6;
}

/* LIGHT THEME OVERRIDE */
body.light-theme {
  --bg-body: #f1f5f9;
  --bg-shell: #ffffff;
  --bg-header: #ffffff;
  --bg-card: #f8fafc;
  --bg-input: #f1f5f9;
  --bg-nav: #ffffff;
  --bg-action-btn: #ffffff;
  
  --text-main: #0f172a;
  --text-label: #334155;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --shadow-color: rgba(0, 0, 0, 0.08);

  --pill-bg: #f1f5f9;
  --pill-text: #64748b;
  --pill-active-bg: #fe3c72;
  --pill-active-text: #ffffff;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Plus Jakarta Sans', 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-body);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  user-select: none;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

img.emoji {
  display: inline-block;
  width: 1.2em;
  height: 1.2em;
  margin: 0 0.08em;
  vertical-align: -0.2em;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* Main Container Shell */
.app-shell, .mobile-container {
  width: 100%;
  max-width: 440px;
  height: 100vh;
  max-height: 920px;
  background-color: var(--bg-shell);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px var(--shadow-color);
  overflow: hidden;
  transition: background-color 0.3s ease;
}

@media (min-width: 768px) {
  .app-shell, .mobile-container {
    height: 90vh;
    border-radius: 32px;
    border: 1px solid var(--border-color);
  }
}

/* Theme Classes */
.theme-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.theme-input {
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  color: var(--text-main);
}

.theme-label {
  color: var(--text-label);
}

/* Header Bar */
.tinder-header {
  padding: 12px 18px 8px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--bg-header);
  z-index: 30;
  transition: background-color 0.3s ease;
}

.tinder-tab-pill {
  background: var(--pill-bg);
  color: var(--pill-text);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: pointer;
}

.tinder-tab-pill.active {
  background: var(--pill-active-bg);
  color: var(--pill-active-text);
  box-shadow: 0 4px 12px rgba(254, 60, 114, 0.3);
}

/* Card Stack Area */
.card-stack-container {
  flex: 1;
  position: relative;
  width: 100%;
  padding: 4px 12px 0 12px;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-shell);
}

.card-stack {
  position: relative;
  width: 100%;
  height: 100%;
}

.tinder-card {
  position: absolute;
  inset: 0;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 16px 36px var(--shadow-color);
  background-size: cover;
  background-position: center;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  will-change: transform;
  cursor: grab;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  touch-action: none;
}

/* Images must never steal card/gallery swipe gestures. */
.tinder-card img,
#detailGallery img {
  -webkit-user-drag: none;
  user-drag: none;
  user-select: none;
  pointer-events: none;
}

#detailGallery {
  touch-action: pan-y;
  cursor: grab;
}

#detailGallery:active {
  cursor: grabbing;
}

.tinder-card:active {
  cursor: grabbing;
}

/* Card Gradient Overlay */
.card-gradient-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.0) 30%,
    rgba(0, 0, 0, 0.75) 65%,
    rgba(8, 11, 17, 0.98) 100%
  );
  z-index: 2;
}

/* Card Inner Content Overlay */
.card-inner {
  position: relative;
  z-index: 10;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 16px 16px 16px;
}

/* Glass Badges */
.glass-badge {
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rank-badge-tinder {
  background: rgba(124, 58, 237, 0.5);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #f3e8ff;
}

/* Action Buttons Container */
.tinder-actions {
  padding: 12px 0 16px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  background-color: var(--bg-shell);
  z-index: 30;
  transition: background-color 0.3s ease;
}

.tinder-btn {
  border-radius: 50%;
  background: var(--bg-action-btn);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px var(--shadow-color);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tinder-btn:hover {
  transform: scale(1.12);
}

.tinder-btn:active {
  transform: scale(0.92);
}

.btn-sm {
  width: 50px;
  height: 50px;
  font-size: 20px;
}

.btn-lg {
  width: 62px;
  height: 62px;
  font-size: 26px;
}

.tinder-btn.rewind { color: #f59e0b; }
.tinder-btn.pass { color: #fe3c72; }
.tinder-btn.star { color: #3b82f6; }
.tinder-btn.like { color: #fe3c72; }
.tinder-btn.boost { color: #a855f7; }

/* Bottom Nav Bar - FULLY SYNCHRONIZED WITH THEME */
.bottom-nav {
  height: 64px;
  background-color: var(--bg-nav);
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 0 10px;
  z-index: 40;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  text-decoration: none;
  transition: color 0.2s;
}

.nav-item.active {
  color: var(--primary-pink);
}

.nav-item i {
  font-size: 18px;
}

/* Match Popup Modal */
.match-modal {
  position: absolute;
  inset: 0;
  background: var(--bg-shell);
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.match-modal.show {
  opacity: 1;
  pointer-events: auto;
}
