/* Shared Modal Styles - same as chat.css */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

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

.modal {
  background: rgba(26, 26, 26, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease-out;
}

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

.modal h3 {
  margin: 0 0 12px 0;
  color: #ffffff;
  font-size: 20px;
  font-weight: 600;
}

.modal p {
  margin: 0 0 16px 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 14px;
  line-height: 1.5;
}

.modal-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-button {
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: none;
}

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

body {
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  margin: 0;
  padding: 0;
  background: #0a0a0a;
  color: #ffffff;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(251, 191, 36, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(251, 191, 36, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, #0a0a0a 0%, #111111 100%);
  z-index: -1;
}

/* #root width constraints removed - each page component handles its own width */
/* Profile page specific container will be added to the profile component */

.card {
  background: rgba(17, 17, 17, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  position: relative;
  backdrop-filter: blur(10px);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(251, 191, 36, 0.4), transparent);
  opacity: 0.5;
  border-radius: 12px 12px 0 0;
}

/* Header */
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-header h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.3px;
  color: #ffffff;
}

.profile-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.nav-link {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.875rem;
  padding: 0.4rem 0.875rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fbbf24;
  text-decoration: none;
}

/* Profile Sections */
.profile-section {
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-section:last-of-type {
  border-bottom: none;
  margin-bottom: 0;
}

.section-header {
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
  color: #ffffff;
  letter-spacing: -0.2px;
}

.section-description {
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0;
  line-height: 1.4;
}

/* Profile Picture Section */
.profile-picture-wrapper {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 1.5rem;
}

.profile-picture-container {
  position: relative;
  display: inline-block;
}

.profile-picture-container img,
.profile-picture-container canvas {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fbbf24;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.25);
  transition: all 0.2s;
}

.profile-picture-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
  cursor: pointer;
  color: #ffffff;
}

.profile-picture-overlay.uploading {
  opacity: 1;
  cursor: not-allowed;
  background: rgba(0, 0, 0, 0.8);
}

.profile-picture-overlay:hover:not(.uploading) {
  opacity: 1;
}

.profile-picture-container:hover .profile-picture-overlay:not(.uploading) {
  opacity: 1;
}

.uploading-text {
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 600;
  text-align: center;
}

.profile-picture-container:hover img,
.profile-picture-container:hover canvas {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(251, 191, 36, 0.35);
}


.profile-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.profile-info-item {
  margin-bottom: 1.25rem;
}

.profile-info-item:last-child {
  margin-bottom: 0;
}

.profile-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: 0.375rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.profile-value {
  font-size: 1.125rem;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 0.75rem;
}

/* Interests Section */
.interests-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.875rem;
}

.interest-card {
  background: rgba(10, 10, 10, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 0.875rem 0.75rem;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  user-select: none;
}

.interest-card:hover {
  border-color: rgba(251, 191, 36, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.2);
}

.interest-card.selected {
  background: rgba(251, 191, 36, 0.15);
  border-color: #fbbf24;
  box-shadow: 0 4px 16px rgba(251, 191, 36, 0.3);
}

.interest-checkmark {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 16px;
  height: 16px;
  background: #fbbf24;
  color: #000000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 10px;
  box-shadow: 0 2px 6px rgba(251, 191, 36, 0.35);
}

.interest-name {
  font-size: 0.875rem;
  font-weight: 500;
  color: #ffffff;
}

.interests-summary {
  margin-top: 0.75rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.6);
  text-align: center;
}

/* Buttons */
.btn-primary {
  width: 100%;
  padding: 0.625rem 1.25rem;
  background: #fbbf24;
  color: #000000;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(251, 191, 36, 0.35);
  background: #facc15;
}

.btn-primary:disabled {
  background: rgba(251, 191, 36, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  padding: 0.625rem 1.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
}

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

.profile-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: rgba(10, 10, 10, 0.6);
  border: 1.5px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  color: #ffffff;
  font-size: 0.875rem;
  margin-bottom: 0.875rem;
  transition: all 0.2s;
  position: relative;
  z-index: 1;
}

/* Ensure no autocomplete UI appears inside the input */
.profile-input::-webkit-input-placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.profile-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.profile-input:focus {
  outline: none;
  border-color: #fbbf24;
  box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15);
}

.profile-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.button-group {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.875rem;
}

.button-group .btn-primary,
.button-group .btn-secondary {
  flex: 1;
}

/* Danger Zone */
.danger-zone {
  background: rgba(220, 38, 38, 0.04);
  border: 1px solid rgba(220, 38, 38, 0.15);
  border-radius: 8px;
  padding: 1.25rem;
  padding-bottom: 0.25rem;
  margin-top: 1.5rem;
}

.danger-zone-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.875rem;
  margin-bottom: 1.25rem;
}

.danger-zone-buttons .btn-disable,
.danger-zone-buttons .btn-danger {
  flex: 1;
  margin-bottom: 0;
}

.danger-title {
  color: #ef4444;
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.375rem;
}

.danger-description {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8125rem;
  margin-bottom: 0.875rem;
  line-height: 1.4;
}

.btn-danger {
  width: 100%;
  padding: 0.625rem 1.25rem;
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(220, 38, 38, 0.25);
  margin-top: 0;
  margin-bottom: 0;
}

.btn-disable {
  width: 100%;
  padding: 0.625rem 1.25rem;
  background: #f59e0b;
  color: #000000;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
}

.btn-disable:hover:not(:disabled) {
  background: #d97706;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.btn-disable:disabled {
  background: rgba(245, 158, 11, 0.3);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-danger:hover {
  background: #b91c1c;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.btn-danger:active {
  transform: translateY(0);
}

/* Loading and Error States */
.error {
  color: #ffffff;
  background: rgba(220, 38, 38, 0.9);
  border: 2px solid rgba(220, 38, 38, 1);
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 1rem;
}

.ok {
  color: #000000;
  background: rgba(34, 197, 94, 0.9);
  border: 2px solid rgba(34, 197, 94, 1);
  padding: 0.75rem;
  border-radius: 8px;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
  #root {
    padding: 12px;
  }

  .card {
    padding: 20px 16px;
  }

  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .profile-header h1 {
    font-size: 1.375rem;
  }

  .profile-picture-wrapper {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
  }

  .profile-info {
    width: 100%;
    text-align: center;
  }

  .interests-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.625rem;
  }

  .interest-card {
    padding: 0.75rem 0.625rem;
  }
}

@media (max-width: 480px) {
  .interests-grid {
    grid-template-columns: 1fr;
  }
}

/* Interest Limit Modal - uses shared .modal-overlay and .modal classes */
.interest-limit-modal-ok {
  background: rgba(251, 191, 36, 0.9);
  color: #0a0a0a;
}

.interest-limit-modal-ok:hover {
  background: rgba(251, 191, 36, 1);
  box-shadow: none;
}

/* Delete Account Modal - uses shared .modal-overlay and .modal classes */
.delete-account-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.delete-account-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.delete-account-modal-continue {
  background: rgba(251, 191, 36, 0.9);
  color: #0a0a0a;
}

.delete-account-modal-continue:hover {
  background: rgba(251, 191, 36, 1);
  box-shadow: none;
}

.delete-account-modal-confirm {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

.delete-account-modal-confirm:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: none;
}

.delete-account-modal-confirm:disabled {
  background: rgba(220, 38, 38, 0.5);
  cursor: not-allowed;
}

/* Disable Account Modal - uses shared .modal-overlay and .modal classes */
.disable-account-modal-cancel {
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

.disable-account-modal-cancel:hover {
  background: rgba(255, 255, 255, 0.15);
  box-shadow: none;
}

.disable-account-modal-confirm {
  background: rgba(245, 158, 11, 0.9);
  color: #000000;
}

.disable-account-modal-confirm:hover {
  background: rgba(245, 158, 11, 1);
  box-shadow: none;
}

.disable-account-modal-confirm:disabled {
  background: rgba(245, 158, 11, 0.5);
  cursor: not-allowed;
}

/* Interest Save Modal - uses shared .modal-overlay and .modal classes */
.interest-save-modal-ok {
  /* Base button styling from .modal-button */
}

.interest-save-modal-ok-success {
  background: rgba(34, 197, 94, 0.9);
  color: #ffffff;
}

.interest-save-modal-ok-success:hover {
  background: rgba(34, 197, 94, 1);
  box-shadow: none;
}

.interest-save-modal-ok-error {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

.interest-save-modal-ok-error:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: none;
}

/* Username Update Modal - uses shared .modal-overlay and .modal classes */
.username-update-modal-ok {
  /* Base button styling from .modal-button */
}

.username-update-modal-ok-success {
  background: rgba(34, 197, 94, 0.9);
  color: #ffffff;
}

.username-update-modal-ok-success:hover {
  background: rgba(34, 197, 94, 1);
  box-shadow: none;
}

.username-update-modal-ok-error {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

.username-update-modal-ok-error:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: none;
}

/* Google Places Autocomplete Dropdown Styling */
.pac-container {
  background: rgba(17, 17, 17, 0.98) !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5) !important;
  margin-top: 4px !important;
  z-index: 10000 !important;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif !important;
  padding: 0 !important;
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
}

.pac-item {
  background: transparent !important;
  border-top: 1px solid rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
  padding: 12px 16px !important;
  cursor: pointer !important;
  font-size: 0.95rem !important;
  margin: 0 !important;
  line-height: 1.5 !important;
}

.pac-item:first-child {
  border-top: none !important;
}

.pac-item:hover,
.pac-item-selected {
  background: rgba(251, 191, 36, 0.15) !important;
  color: #ffffff !important;
}

.pac-item-query {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Hide all icons completely - use multiple selectors to catch all variations */
.pac-icon,
.pac-item .pac-icon,
.pac-item-query .pac-icon,
.pac-item-selected .pac-icon,
.pac-item:hover .pac-icon,
[class*="pac-icon"],
[class^="pac-icon"],
[class$="pac-icon"] {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  visibility: hidden !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
  background: none !important;
  background-image: none !important;
  content: none !important;
}

/* Hide any pseudo-elements that might be icons */
.pac-item::before,
.pac-item::after,
.pac-item-query::before,
.pac-item-query::after {
  display: none !important;
  content: none !important;
}

/* Hide any icon containers */
.pac-item-query {
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.pac-matched {
  color: #fbbf24 !important;
  font-weight: 600 !important;
}

/* Ensure no broken image icons show */
.pac-item img,
.pac-icon img,
.pac-item-query img,
.pac-item-selected img {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
  opacity: 0 !important;
  position: absolute !important;
  left: -9999px !important;
}

/* Prevent any content from appearing inside the input field */
.profile-input {
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  background-image: none !important;
  background: rgba(10, 10, 10, 0.6) !important;
}

.profile-input::before,
.profile-input::after {
  display: none !important;
  content: none !important;
  background: none !important;
  background-image: none !important;
}

/* Ensure autocomplete doesn't inject content into input */
input[type="text"].profile-input {
  -webkit-appearance: none !important;
  appearance: none !important;
}

/* Prevent any icons from appearing in the input wrapper */
.profile-info-item > div[style*="position: relative"] {
  position: relative !important;
}

.profile-info-item > div[style*="position: relative"] .pac-icon,
.profile-info-item > div[style*="position: relative"] [class*="pac-icon"] {
  display: none !important;
  visibility: hidden !important;
  width: 0 !important;
  height: 0 !important;
}

/* City Update Modal - uses shared .modal-overlay and .modal classes */
.city-update-modal-ok {
  /* Base button styling from .modal-button */
}

.city-update-modal-ok-success {
  background: rgba(34, 197, 94, 0.9);
  color: #ffffff;
}

.city-update-modal-ok-success:hover {
  background: rgba(34, 197, 94, 1);
  box-shadow: none;
}

.city-update-modal-ok-error {
  background: rgba(220, 38, 38, 0.9);
  color: #ffffff;
}

.city-update-modal-ok-error:hover {
  background: rgba(220, 38, 38, 1);
  box-shadow: none;
}

.delete-confirm-input {
  margin-bottom: 16px;
}

.settings-link-button {
  display: inline-block;
  text-decoration: none;
  text-align: center;
}
