/* Dating App - Modern Responsive Styles */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* CSS Custom Properties for Theme */
:root {
  --primary-color: #FF2D55;
  --secondary-color: #111827;
  --primary-hover: #e02649;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-light: #9ca3af;
  --bg-primary: #ffffff;
  --bg-secondary: #f9fafb;
  --bg-tertiary: #f3f4f6;
  --border-color: #e5e7eb;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --danger-color: #ef4444;
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-2xl: 1.5rem;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.container {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1;
  padding: 1rem 0;
}

/* Navigation */
nav {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  padding: 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.nav-container {
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  flex-wrap: wrap;
  align-items: center;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--primary-color);
  background: rgba(255, 45, 85, 0.1);
}

.nav-links a.active {
  color: var(--primary-color);
  font-weight: 600;
}

/* Footer */
footer {
  background: var(--secondary-color);
  color: #9ca3af;
  padding: 2rem 1rem;
  margin-top: auto;
}

.footer-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.footer-content h3 {
  color: #ffffff;
  margin-bottom: 0.5rem;
  font-size: 1.125rem;
}

.footer-content p {
  font-size: 0.875rem;
  margin: 0.25rem 0;
  line-height: 1.6;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  text-align: center;
  font-family: inherit;
  line-height: 1;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #1f2937;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

.btn-block {
  width: 100%;
  display: block;
}

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

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-label,
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-input,
.form-select,
.form-textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="number"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus,
input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(255, 45, 85, 0.1);
}

.form-textarea,
textarea {
  resize: vertical;
  min-height: 100px;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary-color);
}

.checkbox-group,
.radio-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.checkbox-group label,
.radio-group label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.form-error {
  color: var(--danger-color);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-hint,
.form-help {
  color: var(--text-light);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Cards */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  margin-bottom: 1rem;
}

.card-header {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.card-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Profile Card for Discovery */
.card-stack {
  position: relative;
  width: 100%;
  max-width: 400px;
  height: 500px;
  margin: 2rem auto;
}

.profile-card,
.swipe-card {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-2xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--bg-primary);
  user-select: none;
  cursor: grab;
}

.profile-card:active,
.swipe-card:active {
  cursor: grabbing;
}

.profile-card-image,
.swipe-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.profile-card-info,
.swipe-card-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: white;
  padding: 2rem 1.5rem 1.5rem;
}

.profile-card-name,
.swipe-card-name {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.profile-card-details,
.swipe-card-details {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-bottom: 0.25rem;
}

.profile-card-bio {
  font-size: 0.875rem;
  opacity: 0.9;
  margin-top: 0.5rem;
}

/* Swipe Actions */
.swipe-actions {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1.5rem;
  padding: 0 1rem;
}

.swipe-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  background: var(--bg-primary);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  transition: all 0.2s;
}

.swipe-btn:hover {
  transform: scale(1.1);
}

.swipe-btn-dislike {
  color: var(--danger-color);
}

.swipe-btn-like {
  color: var(--success-color);
}

/* Match List */
.match-list,
.match-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.match-item {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  color: inherit;
  position: relative;
  aspect-ratio: 1;
}

.match-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.match-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--bg-tertiary);
}

.match-item-info {
  padding: 0.75rem;
}

.match-item-name {
  font-weight: 600;
  margin-bottom: 0.25rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 0.875rem;
  text-align: center;
}

/* Chat */
.chat-container {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 250px);
  max-height: 600px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.chat-header {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-primary);
}

.chat-header h3 {
  margin: 0;
  font-size: 1.125rem;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--bg-secondary);
}

.message {
  display: flex;
  gap: 0.5rem;
  max-width: 70%;
}

.message.sent {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.message-content {
  flex: 1;
}

.message-bubble {
  padding: 0.75rem 1rem;
  border-radius: var(--radius-lg);
  word-wrap: break-word;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
}

.message.sent .message-bubble {
  background: var(--primary-color);
  color: white;
  border: none;
}

.message-time {
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 0.25rem;
  color: var(--text-light);
}

.message.sent .message-time {
  color: white;
  text-align: right;
}

.chat-input-container {
  padding: 1rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
  background: var(--bg-primary);
}

.chat-input {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  resize: none;
  max-height: 100px;
  font-family: inherit;
}

.chat-send-btn {
  padding: 0.75rem 1.25rem;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  font-weight: 600;
}

/* Photo Upload */
.photo-upload-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}

.photo-upload-slot {
  aspect-ratio: 1;
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
  transition: border-color 0.2s;
}

.photo-upload-slot:hover {
  border-color: var(--primary-color);
}

.photo-upload-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-upload-slot input[type="file"] {
  display: none;
}

.photo-upload-icon {
  font-size: 2rem;
  color: var(--text-light);
}

.photo-remove-btn,
.photo-remove {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: none;
}

.photo-upload-slot:hover .photo-remove-btn,
.photo-upload-slot:hover .photo-remove {
  display: block;
}

/* Interests/Tags */
.interest-tags,
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.interest-tag,
.tag {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s;
  background: var(--bg-primary);
  color: var(--text-primary);
}

.interest-tag:hover,
.tag:hover {
  border-color: var(--primary-color);
}

.interest-tag.selected,
.tag.tag-primary {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Range Slider */
.range-slider {
  width: 100%;
  margin: 1rem 0;
}

.range-slider input[type="range"] {
  width: 100%;
  height: 6px;
  border-radius: 5px;
  background: var(--bg-tertiary);
  outline: none;
  -webkit-appearance: none;
}

.range-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.range-slider input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

.range-value {
  font-weight: 600;
  color: var(--primary-color);
  text-align: center;
  margin-top: 0.5rem;
}

/* Profile View */
.profile-photos {
  position: relative;
  height: 400px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  margin-bottom: 1.5rem;
  background: var(--bg-tertiary);
}

.profile-photos img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-section {
  margin-bottom: 2rem;
}

.profile-section h3 {
  font-size: 1.125rem;
  margin-bottom: 0.75rem;
}

.profile-info-item {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  font-size: 0.9375rem;
}

.profile-info-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 100px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-xl);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-primary {
  background: rgba(255, 45, 85, 0.1);
  color: var(--primary-color);
}

.badge-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.badge-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.status-badge {
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
}

.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

.status-suspended {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
}

.status-banned {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
}

.status-open {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
}

.status-resolved {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
}

.empty-state-icon {
  font-size: 4rem;
  opacity: 0.3;
  margin-bottom: 1rem;
}

.empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.empty-state-text,
.empty-state-message {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

/* Loading Spinner */
.spinner {
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--primary-color);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 0.8s linear infinite;
  margin: 2rem auto;
}

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

/* Alerts */
.alert {
  padding: 1rem;
  border-radius: var(--radius-lg);
  margin-bottom: 1rem;
  font-size: 0.875rem;
}

.alert-success {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success-color);
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-error {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger-color);
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-warning {
  background: rgba(245, 158, 11, 0.1);
  color: var(--warning-color);
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.alert-info {
  background: rgba(59, 130, 246, 0.1);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Admin Dashboard */
.admin-stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.admin-stat-card,
.stat-card {
  background: var(--bg-primary);
  padding: 1.5rem;
  border-radius: var(--radius-lg);
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.admin-stat-value,
.stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 0.25rem;
}

.admin-stat-label,
.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.admin-table,
.table-container {
  width: 100%;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin: 1rem 0;
}

.table-container {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th,
.admin-table td,
th,
td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.875rem;
}

.admin-table th,
th,
thead {
  background: var(--bg-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.admin-table tr:last-child td,
tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background: var(--bg-secondary);
}

/* Lists */
.list {
  list-style: none;
}

.list-item {
  padding: 1rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 1rem;
  cursor: pointer;
  transition: background 0.2s;
}

.list-item:hover {
  background: var(--bg-secondary);
}

.list-item:last-child {
  border-bottom: none;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.text-muted { color: var(--text-secondary); }
.text-small { font-size: 0.875rem; }
.text-error { color: var(--danger-color); }
.text-success { color: var(--success-color); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-none { display: none !important; }
.d-flex { display: flex; }
.flex-column { flex-direction: column; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }

/* Responsive */
@media (max-width: 768px) {
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }

  .nav-links {
    font-size: 0.75rem;
    gap: 0.25rem;
  }

  .nav-links a {
    padding: 0.375rem 0.5rem;
  }

  .swipe-btn {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }

  .match-list,
  .match-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .admin-stats,
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .photo-upload-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0.5rem;
  }

  .card {
    padding: 1rem;
  }

  th, td {
    padding: 0.5rem;
    font-size: 0.75rem;
  }
}
