/* ─── FONTS ─────────────────────────────────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Space+Mono:wght@400;700&family=Sora:wght@300;400;600;700&display=swap');

/* ─── VARIABLES ─────────────────────────────────────────────────────────────── */
:root {
  --bg:       #000000;
  --surface:  #0d0d0d;
  --card:     #111111;
  --border:   #1f1f1f;
  --border2:  #2a2a2a;
  --accent:   #ffffff;
  --accent2:  #444444;
  --text:     #e8e8e8;
  --muted:    #555;
  --label:    #888;
  --mono:     'Space Mono', monospace;
  --sans:     'Sora', sans-serif;
}

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 14px;
  min-height: 100vh;
  line-height: 1.6;
}

/* ─── HEADER ─────────────────────────────────────────────────────────────────── */
header {
  border-bottom: 1px solid var(--border);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(12px);
  z-index: 100;
}

.logo {
  font-family: var(--mono);
  font-size: 18px;
  color: var(--accent);
  letter-spacing: -0.5px;
}

.logo span { color: var(--text); }

.tagline {
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* ─── MAIN LAYOUT ───────────────────────────────────────────────────────────── */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* ─── GENERATE BUTTON ───────────────────────────────────────────────────────── */
.generate-bar {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 36px;
}

#btn-generate {
  background: var(--accent);
  color: #000;
  border: none;
  padding: 12px 28px;
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s;
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 0 100%);
}

#btn-generate:hover {
  background: #fff;
  transform: translateY(-1px);
}

#btn-generate:active { transform: translateY(0); }

#btn-copy {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted);
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 1px;
  cursor: pointer;
  text-transform: uppercase;
  transition: all 0.15s;
}

#btn-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.copy-toast {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  opacity: 0;
  transition: opacity 0.3s;
}

.copy-toast.show { opacity: 1; }

/* ─── CONTENT GRID ──────────────────────────────────────────────────────────── */
.identity-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}

/* ─── PHOTO CARD ────────────────────────────────────────────────────────────── */
.photo-card {
  background: var(--card);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 100px;
}

.photo-wrap {
  position: relative;
  width: 200px;
  height: 200px;
}

#face-img {
  width: 200px;
  height: 200px;
  object-fit: cover;
  display: block;
  filter: grayscale(10%);
  transition: opacity 0.4s;
}

#face-img.loading { opacity: 0.2; }

.photo-overlay {
  position: absolute;
  inset: 0;
  border: 1px solid var(--accent);
  pointer-events: none;
  opacity: 0.4;
}

.photo-overlay::before,
.photo-overlay::after {
  content: '';
  position: absolute;
  width: 12px;
  height: 12px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 1;
}

.photo-overlay::before { top: -1px; left: -1px; border-width: 2px 0 0 2px; }
.photo-overlay::after  { bottom: -1px; right: -1px; border-width: 0 2px 2px 0; }

.identity-name {
  text-align: center;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}

.identity-meta {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.5px;
}

/* ─── DATA PANELS ───────────────────────────────────────────────────────────── */
.panels {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel {
  background: var(--card);
  border: 1px solid var(--border);
}

.panel-header {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}

.panel-icon {
  width: 6px;
  height: 6px;
  background: var(--accent);
  flex-shrink: 0;
}

.panel-title {
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--label);
}

.panel-body {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
}

.field {
  padding: 12px 16px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.field:last-child { border-right: none; }

.field-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--muted);
  margin-bottom: 4px;
  font-family: var(--mono);
}

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

.field-value.accent { color: var(--accent); }
.field-value.warn   { color: #f59e0b; }

/* Sensitive fields */
.field-value.sensitive {
  filter: blur(5px);
  cursor: pointer;
  transition: filter 0.2s;
  user-select: none;
}
.field-value.sensitive.revealed { filter: none; user-select: text; }

.reveal-hint {
  font-size: 9px;
  color: var(--muted);
  margin-top: 2px;
  font-family: var(--mono);
}

/* ─── CREDIT CARD VISUAL ────────────────────────────────────────────────────── */
.credit-card-visual {
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #3a3a3a 100%);
  border: 1px solid var(--border2);
  padding: 18px 20px;
  margin: 12px 16px;
  border-radius: 4px;
  font-family: var(--mono);
  position: relative;
  max-width: 300px;
}

.cc-chip {
  width: 28px;
  height: 22px;
  background: linear-gradient(135deg, #d4af37, #ffd700);
  border-radius: 3px;
  margin-bottom: 16px;
}

.cc-number {
  font-size: 14px;
  letter-spacing: 2px;
  color: #e0e0e0;
  margin-bottom: 12px;
}

.cc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.cc-label { font-size: 8px; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.cc-value { font-size: 12px; color: #ccc; }
.cc-type  { font-size: 13px; font-weight: 700; color: var(--accent); }

/* ─── SKELETON LOADING ──────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--border) 25%, var(--border2) 50%, var(--border) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 2px;
  height: 13px;
  width: 80%;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── REFRESH ANIMATION ─────────────────────────────────────────────────────── */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.panel { animation: fadeIn 0.25s ease both; }
.panel:nth-child(2) { animation-delay: 0.04s; }
.panel:nth-child(3) { animation-delay: 0.08s; }
.panel:nth-child(4) { animation-delay: 0.12s; }
.panel:nth-child(5) { animation-delay: 0.16s; }
.panel:nth-child(6) { animation-delay: 0.20s; }

/* ─── DISCLAIMER ────────────────────────────────────────────────────────────── */
.disclaimer {
  margin-top: 40px;
  padding: 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent2);
  font-size: 11px;
  color: var(--muted);
  font-family: var(--mono);
  line-height: 1.7;
}

/* ─── RESPONSIVE ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .identity-grid {
    grid-template-columns: 1fr;
  }
  .photo-card {
    position: static;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
  }
  .photo-wrap { width: 100px; height: 100px; flex-shrink: 0; }
  #face-img   { width: 100px; height: 100px; }
  .panel-body { grid-template-columns: 1fr 1fr; }
  header { flex-direction: column; gap: 4px; text-align: center; }
}
