/* Settings page layout */
body {
  position: relative;
}

.header {
  padding-top: 2.5rem;
}

.back-link {
  position: fixed;
  left: 1.5rem;
  top: 1.5rem;
  padding: 0.5rem 1rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  color: #8b8a87;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  z-index: 10;
}

.back-link:hover {
  color: #f4c23b;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(244, 194, 59, 0.3);
}

.settings-main {
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  padding-top: 0.5rem;
}

.settings-section {
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
}

.section-title {
  font-size: 1rem;
  font-weight: 600;
  color: #e8e6e3;
  margin-bottom: 0.5rem;
}

.section-desc {
  font-size: 0.9rem;
  color: #8b8a87;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.settings-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.action-btn {
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.export-btn {
  color: #e8e6e3;
  background: rgba(91, 155, 213, 0.2);
  border-color: rgba(91, 155, 213, 0.4);
}

.export-btn:hover {
  background: rgba(91, 155, 213, 0.3);
  border-color: rgba(91, 155, 213, 0.6);
}

.import-btn {
  color: #e8e6e3;
  background: rgba(122, 184, 122, 0.2);
  border-color: rgba(122, 184, 122, 0.4);
}

.import-btn:hover {
  background: rgba(122, 184, 122, 0.3);
  border-color: rgba(122, 184, 122, 0.6);
}

.import-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reset-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reset-trophies-btn {
  color: #e8e6e3;
  background: rgba(196, 123, 123, 0.15);
  border-color: rgba(196, 123, 123, 0.35);
}

.reset-trophies-btn:hover {
  background: rgba(196, 123, 123, 0.25);
  border-color: rgba(196, 123, 123, 0.5);
}

.reset-continent-btn {
  color: #e8e6e3;
  background: rgba(196, 80, 80, 0.2);
  border-color: rgba(196, 80, 80, 0.45);
}

.reset-continent-btn:hover {
  background: rgba(196, 80, 80, 0.3);
  border-color: rgba(196, 80, 80, 0.6);
}

.settings-section.danger-zone {
  border-color: rgba(196, 123, 123, 0.2);
}

/* Account section */
.account-form-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.account-tabs {
  display: flex;
  gap: 0.5rem;
}

.account-tab {
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: #8b8a87;
  cursor: pointer;
  transition: all 0.2s ease;
}

.account-tab:hover {
  color: #e8e6e3;
  border-color: rgba(255, 255, 255, 0.25);
}

.account-tab.active {
  color: #f4c23b;
  border-color: rgba(244, 194, 59, 0.5);
  background: rgba(244, 194, 59, 0.08);
}

.account-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.account-form input {
  font-family: inherit;
  font-size: 1rem;
  padding: 0.75rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: #e8e6e3;
  outline: none;
}

.account-form input::placeholder {
  color: #6b6a67;
}

.account-form input:focus {
  border-color: rgba(244, 194, 59, 0.4);
}

.account-error {
  font-size: 0.9rem;
  color: #e07c7c;
  margin: 0;
}

.account-submit-btn {
  color: #1a1a1a;
  background: #f4c23b;
  border-color: #f4c23b;
}

.account-submit-btn:hover {
  background: #f5cd4d;
  border-color: #f5cd4d;
}

.account-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.account-logged-in {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.account-email-display {
  font-size: 1rem;
  font-weight: 600;
  color: #e8e6e3;
  margin: 0;
}

.logout-btn {
  align-self: flex-start;
  color: #8b8a87;
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.logout-btn:hover {
  color: #e8e6e3;
  background: rgba(255, 255, 255, 0.1);
}

/* Responsive: tablet and below */
@media (max-width: 768px) {
  .settings-main {
    padding: 0.5rem 1rem 2rem;
  }

  .header {
    padding-top: 3rem;
  }

  .back-link {
    left: 0.75rem;
    top: 0.75rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.85rem;
  }
}

/* Responsive: small mobile */
@media (max-width: 480px) {
  .settings-main {
    padding: 0.5rem 0.75rem 1.5rem;
  }

  .settings-section {
    padding: 1.25rem;
  }

  .section-desc {
    font-size: 0.85rem;
  }
}
