/* ============================================================
   profile.css — username UI
   ------------------------------------------------------------
   Additive. Uses existing theme vars (--accent, --good, --danger)
   so it inherits whichever theme is active.
   ============================================================ */

/* --- Settings tab: Profile section --- */
.profile-section {
  margin-bottom: 14px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
}

.profile-section-title {
  color: var(--accent);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
  font-weight: bold;
}

.profile-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.profile-input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.5px;
  outline: none;
  transition: border-color 0.15s ease;
}
.profile-input:focus {
  border-color: var(--accent);
}
.profile-input.invalid {
  border-color: var(--danger);
}

.profile-save-btn {
  padding: 10px 16px;
  background: var(--accent);
  color: #000;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.profile-save-btn:hover { filter: brightness(1.1); }
.profile-save-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.profile-save-btn.saved {
  background: var(--good);
}

.profile-hint {
  margin-top: 6px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.3px;
}
.profile-hint.error {
  color: var(--danger);
}

.profile-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.45);
}
.profile-meta-label {
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.profile-meta-value {
  color: rgba(255, 255, 255, 0.75);
}

/* --- Main menu: username badge under tagline --- */
.menu-username {
  margin-top: 8px;
  font-size: 13px;
  color: var(--accent);
  letter-spacing: 1px;
  font-weight: 600;
  opacity: 0.85;
}
.menu-username::before {
  content: "◆ ";
  opacity: 0.6;
}

/* --- End-run card: player line above the title --- */
.end-player {
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 6px;
  opacity: 0.8;
}

.cloud-status-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.cloud-status-label {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}

.cloud-status-text,
.cloud-status-meta,
.cloud-config-hint,
.cloud-auth-copy,
.cloud-auth-error {
  color: rgba(255, 255, 255, 0.65);
  font-size: 11px;
  line-height: 1.5;
}

.cloud-status-meta {
  margin-top: 4px;
}

.cloud-status-badge {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.8px;
}

.cloud-status-badge.online {
  color: #031015;
  background: var(--accent);
}

.cloud-status-badge.offline {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.cloud-config-input {
  width: 100%;
  min-height: 180px;
  margin: 8px 0;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: #fff;
  resize: vertical;
  font-family: Consolas, "Courier New", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.cloud-btn-row,
.cloud-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cloud-btn {
  padding: 10px 12px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: rgba(0, 240, 255, 0.12);
  color: var(--accent);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.cloud-btn-muted {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.75);
}

.cloud-btn-danger {
  border-color: var(--danger);
  background: rgba(255, 67, 108, 0.12);
  color: #ff8ca8;
}

.cloud-auth-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(0, 0, 0, 0.78);
}

.cloud-auth-card {
  width: min(360px, 100%);
  padding: 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(16, 24, 38, 0.96), rgba(8, 12, 20, 0.98));
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.4);
}

.cloud-auth-title {
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.cloud-auth-copy {
  margin: 8px 0 12px;
}

.cloud-auth-input {
  width: 100%;
  margin-bottom: 10px;
}

.cloud-auth-error {
  min-height: 16px;
  color: #ff8ca8;
}
