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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: linear-gradient(135deg, #1a0a0a 0%, #2d1810 50%, #1a0a0a 100%);
  min-height: 100vh;
  color: #e0d5c7;
}

.app-container {
  max-width: 1200px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  background: linear-gradient(135deg, #8B4513, #D4952C);
  padding: 12px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.header-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo {
  width: 40px;
  height: 40px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
}

.brand-text h1 {
  font-size: 20px;
  color: white;
  font-weight: 700;
}

.tagline {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  font-style: italic;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.admin-link {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 13px;
  padding: 6px 14px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 20px;
  transition: all 0.2s;
}

.admin-link:hover {
  background: rgba(255,255,255,0.15);
  color: white;
}

.user-badge {
  background: rgba(255,255,255,0.15);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 13px;
  color: white;
}

.main-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.chat-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: rgba(30, 15, 10, 0.9);
  border-right: 1px solid rgba(255,255,255,0.05);
}

.chat-header {
  padding: 12px 20px;
  background: rgba(40, 20, 15, 0.95);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.chat-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #D4952C, #8B4513);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  color: white;
}

.status {
  font-size: 11px;
  display: block;
  margin-top: 2px;
}

.status.online { color: #4CAF50; }

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

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

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.15);
  border-radius: 3px;
}

.message {
  display: flex;
  flex-direction: column;
  max-width: 85%;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.message.tete { align-self: flex-start; }

.message.user { align-self: flex-end; }

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.tete .message-content {
  background: rgba(60, 30, 20, 0.95);
  border-bottom-left-radius: 4px;
  color: #e0d5c7;
  border: 1px solid rgba(255,255,255,0.05);
}

.message.user .message-content {
  background: linear-gradient(135deg, #D4952C, #b8860b);
  border-bottom-right-radius: 4px;
  color: white;
}

.message-time {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  margin-top: 4px;
  padding: 0 8px;
}

.chat-input-area {
  padding: 12px 16px;
  background: rgba(40, 20, 15, 0.95);
  display: flex;
  gap: 10px;
  align-items: flex-end;
  border-top: 1px solid rgba(255,255,255,0.05);
}

.chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  padding: 12px 18px;
  color: #e0d5c7;
  font-size: 14px;
  resize: none;
  outline: none;
  max-height: 120px;
  font-family: inherit;
}

.chat-input:focus {
  border-color: #D4952C;
}

.chat-input::placeholder {
  color: rgba(255,255,255,0.3);
}

.send-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #D4952C, #b8860b);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 10px rgba(212, 149, 44, 0.4);
}

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

.interests-section {
  padding: 16px 20px;
  background: rgba(40, 20, 15, 0.95);
  border-top: 1px solid rgba(255,255,255,0.05);
}

.interests-header h3 {
  font-size: 16px;
  margin-bottom: 4px;
  color: #D4952C;
}

.interests-header p {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
}

.interests-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.interest-tag {
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.15);
  background: transparent;
  color: #e0d5c7;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.interest-tag:hover {
  border-color: #D4952C;
  background: rgba(212, 149, 44, 0.1);
}

.interest-tag.selected {
  background: #D4952C;
  border-color: #D4952C;
  color: white;
}

.save-interests-btn {
  padding: 10px 24px;
  background: linear-gradient(135deg, #D4952C, #b8860b);
  color: white;
  border: none;
  border-radius: 24px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
  width: 100%;
}

.save-interests-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(212, 149, 44, 0.3);
}

.sidebar {
  width: 320px;
  background: rgba(30, 15, 10, 0.95);
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sidebar h3 {
  font-size: 16px;
  color: #D4952C;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.profile-card, .matches-card, .payment-card {
  background: rgba(40, 20, 15, 0.8);
  border-radius: 12px;
  padding: 16px;
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-info p, .payment-info p {
  padding: 4px 0;
  font-size: 13px;
  line-height: 1.6;
}

.profile-info strong, .payment-info strong {
  color: #D4952C;
}

.matches-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.match-item {
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.05);
}

.match-item .match-name {
  font-weight: 600;
  font-size: 14px;
}

.match-item .match-score {
  color: #4CAF50;
  font-size: 12px;
}

.match-item .match-interests {
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.no-matches {
  color: rgba(255,255,255,0.4);
  font-size: 13px;
  text-align: center;
  padding: 20px 0;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(0,0,0,0.9);
  color: white;
  padding: 12px 24px;
  border-radius: 8px;
  font-size: 14px;
  opacity: 0;
  transition: all 0.3s;
  z-index: 1000;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.typing-indicator {
  align-self: flex-start;
  padding: 12px 16px;
  background: rgba(60, 30, 20, 0.95);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  display: flex;
  gap: 4px;
  animation: fadeIn 0.3s ease;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  background: #D4952C;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
.typing-indicator span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.3; }
  30% { transform: translateY(-6px); opacity: 1; }
}

.logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  overflow: hidden;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.couple-logo {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.apk-banner {
  background: linear-gradient(135deg, #2d1810, #4a2a1a);
  border-bottom: 1px solid rgba(212, 149, 44, 0.3);
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.apk-banner-icon {
  font-size: 20px;
}

.apk-banner-text {
  flex: 1;
  color: #e0d5c7;
}

.apk-download-btn {
  background: linear-gradient(135deg, #D4952C, #b8860b);
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.2s;
}

.apk-download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgba(212, 149, 44, 0.4);
}

.apk-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.4);
  cursor: pointer;
  font-size: 16px;
  padding: 2px 6px;
}

.download-card {
  background: linear-gradient(135deg, rgba(212, 149, 44, 0.1), rgba(139, 69, 19, 0.1));
  border: 1px solid rgba(212, 149, 44, 0.3);
  border-radius: 12px;
  padding: 16px;
  margin-top: 8px;
}

.download-card h3 {
  font-size: 15px;
  color: #D4952C;
  margin-bottom: 6px;
  border: none;
  padding: 0;
}

.download-text {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
  margin-bottom: 12px;
  line-height: 1.5;
}

.download-apk-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #D4952C, #b8860b);
  color: white;
  padding: 10px 16px;
  border-radius: 24px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}

.download-apk-btn:hover {
  transform: scale(1.02);
  box-shadow: 0 2px 10px rgba(212, 149, 44, 0.3);
}

.download-icon {
  font-size: 18px;
}

.download-note {
  font-size: 11px;
  color: rgba(255,255,255,0.3);
  text-align: center;
  margin-top: 8px;
}

.download-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
}

.download-page .app-icon {
  width: 96px;
  height: 96px;
  border-radius: 24px;
  margin-bottom: 20px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.4);
}

.download-page h1 {
  color: #D4952C;
  font-size: 28px;
  margin-bottom: 8px;
}

.download-page .subtitle {
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  margin-bottom: 32px;
}

.download-page .info-box {
  background: rgba(40, 20, 15, 0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  max-width: 400px;
  width: 100%;
  margin-bottom: 16px;
  text-align: left;
}

.download-page .info-box h3 {
  color: #D4952C;
  font-size: 15px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.download-page .info-box ul {
  list-style: none;
  padding: 0;
}

.download-page .info-box li {
  padding: 6px 0;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}

.download-page .info-box li::before {
  content: "✓";
  color: #4CAF50;
  font-weight: bold;
}

.main-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #D4952C, #b8860b);
  color: white;
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  font-size: 18px;
  font-weight: 700;
  margin: 20px 0;
  transition: all 0.3s;
  box-shadow: 0 4px 15px rgba(212, 149, 44, 0.3);
}

.main-download-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 25px rgba(212, 149, 44, 0.4);
}

.main-download-btn .btn-icon {
  font-size: 28px;
}

.download-page .pwa-note {
  background: rgba(40, 20, 15, 0.6);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 16px 20px;
  max-width: 400px;
  width: 100%;
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  line-height: 1.6;
}

.download-page .pwa-note strong {
  color: #D4952C;
}

.download-page .back-link {
  margin-top: 24px;
  color: rgba(255,255,255,0.4);
  text-decoration: none;
  font-size: 14px;
}

.download-page .back-link:hover {
  color: #D4952C;
}

.admin-page .admin-dashboard {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: rgba(40, 20, 15, 0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #D4952C;
}

.stat-label {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  margin-top: 4px;
}

.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.tab-btn {
  padding: 10px 20px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.tab-btn:hover {
  background: rgba(255,255,255,0.1);
}

.tab-btn.active {
  background: #D4952C;
  border-color: #D4952C;
  color: white;
}

.tab-content {
  display: none;
}

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

.table-container {
  background: rgba(40, 20, 15, 0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  overflow-x: auto;
  padding: 16px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  padding: 10px 12px;
  color: #D4952C;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
}

.admin-table td {
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  color: rgba(255,255,255,0.8);
}

.admin-table tr:hover td {
  background: rgba(255,255,255,0.02);
}

.verify-btn {
  padding: 4px 12px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 12px;
}

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

.status-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.status-badge.pending { background: rgba(255,152,0,0.2); color: #FF9800; }
.status-badge.paid { background: rgba(76,175,80,0.2); color: #4CAF50; }
.status-badge.verified { background: rgba(0,200,83,0.2); color: #00C853; }

.match-form {
  background: rgba(40, 20, 15, 0.8);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 20px;
}

.match-form h3 {
  margin-bottom: 16px;
}

.form-group {
  margin-bottom: 12px;
}

.form-group label {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
  color: rgba(255,255,255,0.6);
}

.form-group select {
  width: 100%;
  padding: 10px 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: #e0d5c7;
  font-size: 14px;
}

.match-result {
  margin-top: 12px;
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
}

.match-result.success { background: rgba(76,175,80,0.15); color: #4CAF50; }
.match-result.error { background: rgba(244,67,54,0.15); color: #f44336; }

@media (max-width: 768px) {
  .sidebar {
    display: none;
  }
  
  .sidebar.open {
    display: flex;
    position: fixed;
    top: 60px;
    right: 0;
    width: 300px;
    height: calc(100vh - 60px);
    z-index: 100;
  }

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