* {
  box-sizing: border-box;
}

:root {
  --bg: #0a120e;
  --surface: rgba(255, 255, 255, 0.06);
  --surface-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(255, 255, 255, 0.1);
  --text: #ecfdf5;
  --muted: #86a89a;
  --accent: #6ee7b7;
  --accent-strong: #22c55e;
  --accent-glow: rgba(34, 197, 94, 0.35);
  --success: #34d399;
  --error-bg: rgba(239, 68, 68, 0.12);
  --error-text: #fca5a5;
  --radius: 16px;
  --shadow: 0 24px 48px rgba(0, 0, 0, 0.35);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.bg-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(34, 197, 94, 0.2), transparent),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(16, 185, 129, 0.14), transparent);
  z-index: 0;
}

.topbar {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  background: rgba(10, 18, 14, 0.75);
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
}

.topbar-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.15s;
}

.topbar-nav a:hover {
  color: var(--text);
}

.nav-user {
  color: var(--text);
  font-weight: 500;
  font-size: 0.85rem;
}

.btn-nav {
  padding: 0.45rem 0.9rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-strong), #10b981);
  color: #fff !important;
  font-weight: 600;
}

.btn-nav:hover {
  color: #fff !important;
  opacity: 0.9;
}

.btn-nav-logout {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  color: var(--text) !important;
}

.btn-nav-logout:hover {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #fca5a5 !important;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.brand-icon {
  color: var(--accent);
  font-size: 1.1rem;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 520px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.card-wide {
  max-width: 640px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 0.5rem;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

h2 {
  margin: 0 0 0.75rem;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s;
}

a:hover {
  color: #a7f3d0;
}

.meta {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 1.5rem;
}

label {
  display: block;
  margin-bottom: 1.1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

input {
  width: 100%;
  margin-top: 0.4rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}

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

input::placeholder {
  color: #64748b;
}

button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 1.35rem;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-strong), #10b981);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 4px 20px var(--accent-glow);
}

button:hover,
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 28px var(--accent-glow);
  color: #fff;
}

button:active,
.btn:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--surface-hover);
  border: 1px solid var(--border);
  box-shadow: none;
  color: var(--text);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: none;
  color: var(--text);
}

.btn-block {
  width: 100%;
  margin-top: 0.5rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.75rem;
}

.error {
  background: var(--error-bg);
  color: var(--error-text);
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid rgba(239, 68, 68, 0.2);
}

.success {
  background: rgba(52, 211, 153, 0.1);
  color: #6ee7b7;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
  border: 1px solid rgba(52, 211, 153, 0.25);
}

input:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.badge {
  display: inline-flex;
  align-items: center;
  background: rgba(34, 197, 94, 0.18);
  color: #bbf7d0;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid rgba(110, 231, 183, 0.3);
}

/* Home */
.hero {
  text-align: center;
  padding: 1rem 0 0.5rem;
}

.hero-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--accent-strong), #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  box-shadow: 0 12px 32px var(--accent-glow);
}

.features {
  display: grid;
  gap: 0.75rem;
  margin: 2rem 0 0;
  text-align: left;
}

.feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--muted);
}

.feature span {
  color: var(--accent);
  font-size: 1.1rem;
  line-height: 1;
}

/* Profile */
.profile-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.avatar {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--accent-strong), #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.avatar-img {
  object-fit: cover;
  padding: 0;
  background: none;
}

.avatar-lg {
  width: 88px;
  height: 88px;
  border-radius: 24px;
  font-size: 2rem;
}

.profile-header-public {
  align-items: flex-start;
}

.profile-header-public h1 {
  margin-bottom: 0.15rem;
}

.info-grid {
  display: grid;
  gap: 0.75rem;
}

.metadata-section h2 {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.info-item a {
  color: var(--accent);
  word-break: break-all;
}

.info-item a:hover {
  color: #a7f3d0;
}

.info-item {
  padding: 0.9rem 1rem;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 12px;
  border: 1px solid var(--border);
}

.info-item label {
  margin: 0 0 0.2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-item p {
  margin: 0;
  font-weight: 500;
  color: var(--text);
}

.site-link {
  display: block;
  margin-top: 1.25rem;
  padding: 0.9rem 1rem;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.2);
  border-radius: 12px;
  font-size: 0.9rem;
  word-break: break-all;
}

.site-link a {
  color: var(--success);
}

.dns-help {
  margin-top: 1.25rem;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.dns-help > label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text);
}

.dns-help > p {
  margin: 0 0 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.dns-help .info-item {
  margin-bottom: 0.5rem;
}

.domain-status-panel {
  margin-top: 0.75rem;
  padding: 0.85rem 1rem;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.domain-status-panel.hidden {
  display: none;
}

.domain-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.domain-status-name {
  font-size: 0.95rem;
  font-weight: 500;
  word-break: break-all;
}

.domain-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
  font-size: 0.8rem;
  font-weight: 500;
  white-space: nowrap;
}

.domain-status-badge.is-valid {
  color: var(--success);
}

.domain-status-badge.is-pending {
  color: #fbbf24;
}

.domain-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.18);
  color: var(--success);
  font-size: 0.72rem;
  font-weight: 700;
}

.domain-check.inline {
  margin-right: 0.35rem;
  vertical-align: middle;
}

.domain-pending-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.15);
}

.domain-status-hint {
  margin: 0.55rem 0 0;
}

.site-link-domain {
  display: inline-flex;
  align-items: center;
}

/* Public site */
.site-hero {
  text-align: center;
  padding: 2rem 0 1rem;
}

.site-avatar {
  width: 88px;
  height: 88px;
  margin: 0 auto 1.25rem;
  border-radius: 24px;
  background: linear-gradient(135deg, #22c55e, #10b981, #059669);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 16px 40px rgba(34, 197, 94, 0.4);
}

.site-hero h1 {
  font-size: 2.25rem;
  margin-bottom: 0.35rem;
}

.site-hero .tagline {
  color: var(--muted);
  font-size: 1.05rem;
  margin: 0.5rem 0 0;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 1.75rem 0;
}

.footer-note {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-note a {
  color: var(--muted);
}

.footer-note a:hover {
  color: var(--accent);
}

@media (max-width: 480px) {
  .container {
    padding: 1.5rem 1rem 3rem;
  }

  .card {
    padding: 1.5rem;
  }

  h1 {
    font-size: 1.5rem;
  }
}
