/* ── Shared Animations ── */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

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

/* ── Modals ── */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: fadeIn 0.2s ease-out;
}

.modal {
  background: var(--bg-surface-solid);
  backdrop-filter: var(--blur);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  max-width: 400px;
  width: 90%;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  animation: slideUp 0.2s ease-out;
}

.modal h3 {
  margin: 0 0 12px 0;
  color: var(--text-primary);
  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: var(--transition-fast);
  box-shadow: none;
}

/* ── Forms ── */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-row label {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-row input {
  font-size: 1rem;
  padding: 0.875rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-row input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-row input::placeholder {
  color: var(--text-muted);
}

.form-row input[readonly] {
  background: rgba(10, 10, 10, 0.4);
  color: rgba(255, 255, 255, 0.6);
  cursor: not-allowed;
}

.form-group {
  margin-bottom: 1.5rem;
}

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

.form-group input {
  width: 100%;
  padding: 0.875rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 1rem;
  font-family: inherit;
  transition: var(--transition-fast);
  box-sizing: border-box;
}

.form-group input:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.form-link {
  color: var(--text-primary);
  text-decoration: none;
  text-align: center;
  font-size: 0.9rem;
  transition: opacity 0.2s;
  font-weight: 500;
  opacity: 0.8;
}

.form-link:hover {
  opacity: 1;
  text-decoration: underline;
  color: var(--accent);
}

.form-link-container {
  margin-top: 1rem;
  text-align: center;
}

.form-description {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── Buttons ── */
.btn {
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  text-align: center;
}

.btn-primary {
  padding: 0.625rem 1.25rem;
  background: var(--accent) !important;
  color: #000000 !important;
  border: none;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 2px 8px rgba(251, 191, 36, 0.25);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(251, 191, 36, 0.4);
  background: var(--accent-hover) !important;
  color: #000000 !important;
}

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

.btn-primary:disabled {
  background: rgba(251, 191, 36, 0.3) !important;
  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: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-fast);
}

.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;
}

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

.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);
}

.btn-success {
  background: var(--status-success);
  color: var(--text-primary);
  border-color: var(--status-success);
}

.btn-success:hover {
  background: #2d8049;
}

.btn-submit {
  width: 100%;
  padding: 0.875rem 2rem;
  background: var(--accent);
  color: #000000;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: var(--transition-fast);
  box-shadow: 0 4px 14px rgba(251, 191, 36, 0.3);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(251, 191, 36, 0.4);
  background: var(--accent-hover);
}

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

/* ── Profile Pictures ── */
.profile-pic {
  border-radius: 50%;
  object-fit: cover;
}

.profile-pic-sm {
  width: 24px;
  height: 24px;
}

.profile-pic-md {
  width: 40px;
  height: 40px;
}

.profile-pic-lg {
  width: 64px;
  height: 64px;
}

.profile-pic-xl {
  width: 80px;
  height: 80px;
}

/* ── Utility Classes ── */
.text-small {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.text-muted {
  color: var(--text-muted);
}

.text-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.text-description-subtle {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

.mt-half {
  margin-top: 0.5rem;
}

.w-full {
  width: 100%;
}

.hidden-input {
  display: none;
}

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

/* ── Status Feedback ── */
#status {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 6px;
  text-align: center;
  font-size: 0.9rem;
  font-weight: 500;
}

#status.error {
  color: var(--text-primary);
  background: rgba(220, 38, 38, 0.9);
  border: 2px solid rgba(220, 38, 38, 1);
}

#status.ok {
  color: #000000;
  background: rgba(34, 197, 94, 0.9);
  border: 2px solid rgba(34, 197, 94, 1);
}

#status.success {
  color: #000000;
  background: rgba(34, 197, 94, 0.9);
  border: 2px solid rgba(34, 197, 94, 1);
}

.error {
  color: var(--text-primary);
  background: rgba(220, 38, 38, 0.9);
  border: 2px solid rgba(220, 38, 38, 1);
  padding: 0.75rem;
  border-radius: var(--radius-sm);
  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: var(--radius-sm);
  font-weight: 500;
  margin-bottom: 1rem;
}

/* ── Nav Links (shared between auth and landing headers) ── */
.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: var(--transition-fast);
  font-weight: 500;
  font-size: 0.9rem;
}

.nav-link:hover {
  background: var(--bg-hover);
}

.nav-link-primary {
  background: var(--accent) !important;
  color: #000000 !important;
  font-weight: 600;
}

.nav-link-primary:hover {
  background: var(--accent-hover) !important;
  color: #000000 !important;
  transform: translateY(-1px);
}

/* ── Friends Helper ── */
.friends-helper-text {
  font-size: 12px;
  color: #96989d;
  padding: 8px;
}

.friends-search-wrapper {
  margin-bottom: 8px;
}

.friends-status-text {
  font-size: 12px;
  color: #96989d;
}

.friends-loading-text {
  font-size: 12px;
  color: #96989d;
  padding: 4px 8px;
}

/* ── Friend remove button (small) ── */
.friend-remove-btn {
  font-size: 11px;
  padding: 2px 6px;
}
