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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #1a1a2e;
  color: #eee;
  min-height: 100dvh;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100dvh;
}

/* User Selection */
#user-select {
  justify-content: center;
  gap: 24px;
}

#user-select h1 {
  font-size: 2rem;
  color: #e94560;
}

#user-select p {
  font-size: 1.1rem;
  color: #aaa;
}

.user-buttons {
  display: flex;
  gap: 16px;
}

.user-buttons button {
  padding: 16px 40px;
  font-size: 1.2rem;
  border: 2px solid #e94560;
  background: transparent;
  color: #e94560;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.user-buttons button:hover,
.user-buttons button:active {
  background: #e94560;
  color: #fff;
}

/* Header */
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 12px 20px;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
}

header h1 {
  font-size: 1.3rem;
  color: #e94560;
}

#user-label {
  font-size: 0.85rem;
  color: #aaa;
  background: #0f3460;
  padding: 4px 12px;
  border-radius: 20px;
}

/* Tabs */
.tabs {
  display: flex;
  width: 100%;
  background: #16213e;
  border-bottom: 1px solid #0f3460;
}

.tab {
  flex: 1;
  padding: 12px;
  background: none;
  border: none;
  color: #888;
  font-size: 0.85rem;
  cursor: pointer;
  position: relative;
  transition: color 0.2s;
}

.tab.active {
  color: #e94560;
  border-bottom: 2px solid #e94560;
}

.badge {
  position: absolute;
  top: 6px;
  right: 12px;
  background: #e94560;
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 10px;
  min-width: 18px;
}

/* Tab Content */
.tab-content {
  display: none;
  flex-direction: column;
  align-items: center;
  flex: 1;
  width: 100%;
  max-width: 420px;
  padding: 16px;
}

.tab-content.active {
  display: flex;
}

/* Progress */
.progress-bar {
  width: 100%;
  height: 4px;
  background: #0f3460;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.progress-fill {
  height: 100%;
  background: #e94560;
  border-radius: 2px;
  transition: width 0.3s;
  width: 0%;
}

.progress-text {
  font-size: 0.75rem;
  color: #666;
  align-self: flex-end;
  margin-bottom: 12px;
}

/* Card Area */
.card-area {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: relative;
  min-height: 250px;
}

/* Name Card */
.name-card {
  width: 100%;
  max-width: 340px;
  height: 220px;
  background: linear-gradient(135deg, #16213e 0%, #0f3460 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  cursor: grab;
  touch-action: none;
  transition: transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

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

.name-card.swiping {
  transition: none;
}

.name-card.animate-out {
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  opacity: 0;
}

.card-inner {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-name {
  font-size: 2.4rem;
  font-weight: 700;
  color: #fff;
}

.card-origin {
  font-size: 0.9rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.partner-liked-label {
  font-size: 0.8rem;
  color: #e94560;
  margin-top: 8px;
}

/* Swipe Hints */
.swipe-hint {
  position: absolute;
  top: 20px;
  font-size: 1.4rem;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 8px;
  border: 3px solid;
  opacity: 0;
  transition: opacity 0.1s;
  pointer-events: none;
}

.swipe-hint-left {
  left: 16px;
  color: #ff6b6b;
  border-color: #ff6b6b;
  transform: rotate(-15deg);
}

.swipe-hint-right {
  right: 16px;
  color: #51cf66;
  border-color: #51cf66;
  transform: rotate(15deg);
}

/* Card Actions */
.card-actions {
  display: flex;
  gap: 40px;
  padding: 20px 0 30px;
}

.btn-dislike, .btn-like {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2px solid;
  background: transparent;
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-dislike {
  border-color: #ff6b6b;
  color: #ff6b6b;
}

.btn-dislike:hover, .btn-dislike:active {
  background: #ff6b6b;
  color: #fff;
}

.btn-like {
  border-color: #51cf66;
  color: #51cf66;
}

.btn-like:hover, .btn-like:active {
  background: #51cf66;
  color: #fff;
}

/* Empty State */
.empty-state {
  text-align: center;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 40px;
}

/* Matches List */
.matches-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100dvh - 160px);
}

.match-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #16213e;
  border-radius: 12px;
  border-left: 4px solid #e94560;
}

.match-item-name {
  font-size: 1.2rem;
  font-weight: 600;
}

.match-item-origin {
  font-size: 0.8rem;
  color: #888;
}

.match-item.clickable {
  cursor: pointer;
  transition: background 0.2s;
}

.match-item.clickable:hover, .match-item.clickable:active {
  background: #1a2a4e;
}

.list-action {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-left: 12px;
}

.list-action-like {
  color: #51cf66;
}

/* Match Overlay */
.match-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: fadeIn 0.3s;
}

.match-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: popIn 0.4s ease-out;
}

.match-hearts {
  font-size: 3rem;
}

.match-content h2 {
  font-size: 2rem;
  color: #e94560;
}

.match-content p {
  font-size: 1.5rem;
  color: #fff;
}

.match-dismiss {
  font-size: 0.8rem;
  color: #666;
}

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

@keyframes popIn {
  0% { transform: scale(0.5); opacity: 0; }
  70% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}
