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

:root {
  --bg:       #0e0f11;
  --surface:  #17191d;
  --surface2: #1f2228;
  --border:   rgba(255,255,255,0.08);
  --border2:  rgba(255,255,255,0.14);
  --text:     #e8eaf0;
  --muted:    #7a7f8e;
  --accent:   #ff5a1f;
  --accent2:  #ff8a4c;
  --mono:     'Courier New', monospace;
  --radius:   10px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3rem 1rem 4rem;
}

.container {
  width: 100%;
  max-width: 560px;
}

/* --- Header --- */
header {
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  width: 42px;
  height: 42px;
  background: var(--accent);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  flex-shrink: 0;
}

header h1 {
  font-size: 19px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

header p {
  font-size: 13px;
  color: var(--muted);
  margin-top: 2px;
}

/* --- Labels --- */
.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 8px;
}

/* --- Card --- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

/* --- Select --- */
select {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 14px;
  padding: 10px 14px;
  appearance: none;
  cursor: pointer;
  outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237a7f8e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

select:focus {
  border-color: var(--accent);
}

/* --- Controls row --- */
.controls-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 1rem;
}

/* --- Generate button --- */
.gen-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  letter-spacing: 0.02em;
}

.gen-btn:hover  { background: var(--accent2); }
.gen-btn:active { transform: scale(0.98); }

/* --- Result card --- */
.result-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.field-row {
  display: flex;
  align-items: center;
  padding: 13px 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}

.field-row:last-child {
  border-bottom: none;
}

.field-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  min-width: 90px;
  flex-shrink: 0;
}

.field-value {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--text);
  flex: 1;
  word-break: break-all;
}

.field-value.accent {
  color: var(--accent2);
}

/* --- Button group --- */
.btn-group {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
  align-items: center;
}

.icon-btn {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.1s, border-color 0.1s, background 0.1s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.icon-btn:hover {
  color: var(--text);
  background: #2a2d35;
}

.icon-btn.ok {
  color: #4ade80;
  border-color: rgba(74,222,128,0.3);
}

/* --- Email row with inline domain select --- */
.domain-select-inline {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
  padding: 5px 24px 5px 8px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%237a7f8e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  outline: none;
  flex-shrink: 0;
  width: auto;
}

.domain-select-inline:focus {
  border-color: var(--accent);
}

/* --- Footer --- */
footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* --- Responsive --- */
@media (max-width: 480px) {
  body { padding: 1.5rem 0.75rem 3rem; }
  .controls-row { grid-template-columns: 1fr; }
  .field-row { flex-wrap: wrap; }
  .btn-group { width: 100%; justify-content: flex-end; }
}
