:root {
  --bg: #080808;
  --surface: #111111;
  --surface2: #1a1a1a;
  --gold: #c9a04a;
  --gold-hover: #d4b06a;
  --gold-dim: rgba(201,160,74,0.15);
  --gold-border: rgba(201,160,74,0.25);
  --text: #f0f0f0;
  --text-muted: #777;
  --danger: #e05252;
  --success: #52b36e;
  --radius: 12px;
  --radius-sm: 8px;
}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;scroll-behavior:smooth}
body{
  background:var(--bg);
  color:var(--text);
  font-family:'Inter',system-ui,sans-serif;
  font-weight:400;
  line-height:1.6;
  min-height:100vh;
}

/* Typography */
h1,h2,h3{font-family:'Cormorant Garamond',Georgia,serif;font-weight:500;line-height:1.2}
h1{font-size:clamp(2.2rem,5vw,3.5rem)}
h2{font-size:clamp(1.6rem,3vw,2.2rem)}
h3{font-size:1.3rem}
p{line-height:1.7}

/* Header */
.header{
  display:flex;align-items:center;justify-content:space-between;
  padding:1.25rem 1.5rem;
  border-bottom:1px solid var(--gold-border);
  position:sticky;top:0;z-index:100;
  background:rgba(8,8,8,0.95);
  backdrop-filter:blur(12px);
}
.logo{font-family:'Cormorant Garamond',Georgia,serif;font-size:1.3rem;color:var(--gold);font-weight:600;text-decoration:none;letter-spacing:0.03em}
.nav-links{display:flex;gap:1rem;align-items:center}
.nav-link{color:var(--text-muted);text-decoration:none;font-size:.875rem;transition:color .2s}
.nav-link:hover{color:var(--gold)}

/* Buttons */
.btn{
  display:inline-flex;align-items:center;justify-content:center;gap:.5rem;
  padding:.75rem 1.75rem;
  border-radius:var(--radius-sm);
  font-size:.9rem;font-weight:500;
  cursor:pointer;border:none;
  text-decoration:none;
  transition:all .2s;
  font-family:inherit;
}
.btn-primary{background:var(--gold);color:#111}
.btn-primary:hover{background:var(--gold-hover)}
.btn-outline{background:transparent;color:var(--gold);border:1px solid var(--gold-border)}
.btn-outline:hover{background:var(--gold-dim);border-color:var(--gold)}
.btn-ghost{background:transparent;color:var(--text-muted)}
.btn-ghost:hover{color:var(--text)}
.btn-danger{background:var(--danger);color:#fff}
.btn-lg{padding:1rem 2.5rem;font-size:1rem}
.btn-sm{padding:.5rem 1rem;font-size:.8rem}
.btn:disabled{opacity:.4;cursor:not-allowed}
.btn-full{width:100%}

/* Cards */
.card{
  background:var(--surface);
  border:1px solid var(--gold-border);
  border-radius:var(--radius);
  padding:1.75rem;
}
.card-sm{padding:1.25rem}

/* Form */
.form-group{display:flex;flex-direction:column;gap:.4rem;margin-bottom:1.25rem}
label{font-size:.85rem;color:var(--text-muted)}
input,select,textarea{
  background:var(--surface2);
  border:1px solid #2a2a2a;
  border-radius:var(--radius-sm);
  padding:.75rem 1rem;
  color:var(--text);
  font-family:inherit;
  font-size:.95rem;
  outline:none;
  transition:border-color .2s;
  width:100%;
}
input:focus,select:focus,textarea:focus{border-color:var(--gold)}
input::placeholder{color:var(--text-muted)}

/* Layout */
.container{max-width:900px;margin:0 auto;padding:0 1.5rem}
.container-sm{max-width:480px;margin:0 auto;padding:0 1.5rem}
.section{padding:4rem 0}
.section-sm{padding:2.5rem 0}

/* Hero */
.hero{
  text-align:center;
  padding:5rem 1.5rem 4rem;
  background:radial-gradient(ellipse at top,rgba(201,160,74,0.07) 0%,transparent 60%);
}
.hero-eyebrow{
  display:inline-block;
  font-size:.75rem;font-weight:600;letter-spacing:.12em;text-transform:uppercase;
  color:var(--gold);
  background:var(--gold-dim);
  border:1px solid var(--gold-border);
  padding:.35rem .9rem;border-radius:2rem;
  margin-bottom:1.5rem;
}
.hero h1{margin-bottom:1rem;color:var(--text)}
.hero p{color:var(--text-muted);max-width:480px;margin:0 auto 2.5rem;font-size:1.05rem}

/* Steps */
.steps{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:1.5rem;margin-top:3rem}
.step{text-align:center;padding:2rem 1.5rem}
.step-num{
  width:3rem;height:3rem;border-radius:50%;
  background:var(--gold-dim);border:1px solid var(--gold-border);
  display:flex;align-items:center;justify-content:center;
  margin:0 auto 1rem;
  font-family:'Cormorant Garamond',serif;font-size:1.3rem;color:var(--gold);
}
.step h3{margin-bottom:.5rem}
.step p{color:var(--text-muted);font-size:.9rem}

/* Auth pages */
.auth-wrapper{
  min-height:calc(100vh - 65px);
  display:flex;align-items:center;justify-content:center;
  padding:2rem 1.5rem;
}
.auth-card{width:100%;max-width:440px}
.auth-card h2{margin-bottom:.5rem}
.auth-card .subtitle{color:var(--text-muted);font-size:.9rem;margin-bottom:2rem}
.auth-footer{text-align:center;margin-top:1.5rem;font-size:.875rem;color:var(--text-muted)}
.auth-footer a{color:var(--gold);text-decoration:none}

/* Selfie */
.selfie-wrap{position:relative;margin-bottom:1.25rem}
#selfie-video,#selfie-canvas,#selfie-preview{
  width:100%;border-radius:var(--radius-sm);
  aspect-ratio:4/3;object-fit:cover;background:#0a0a0a;
}
#selfie-canvas{display:none}
#selfie-preview{display:none;border:2px solid var(--gold)}
.selfie-controls{display:flex;gap:.75rem;flex-wrap:wrap;margin-top:.75rem}
.selfie-label{font-size:.85rem;color:var(--text-muted);margin-bottom:.5rem;display:block}
.selfie-optional{font-size:.78rem;color:var(--text-muted);font-style:italic;margin-top:.25rem}

/* Gallery grid */
.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(200px,1fr));
  gap:1rem;
}
.photo-card{
  position:relative;border-radius:var(--radius-sm);overflow:hidden;
  aspect-ratio:3/2;background:var(--surface2);
  cursor:pointer;
}
.photo-card img{width:100%;height:100%;object-fit:cover;display:block;transition:transform .3s}
.photo-card:hover img{transform:scale(1.04)}
.photo-card-overlay{
  position:absolute;inset:0;
  background:linear-gradient(to top,rgba(0,0,0,.8) 0%,transparent 50%);
  opacity:0;transition:opacity .25s;
  display:flex;align-items:flex-end;padding:1rem;
}
.photo-card:hover .photo-card-overlay{opacity:1}
.photo-card-overlay .btn{font-size:.75rem;padding:.4rem .9rem}

/* Status / toast */
.toast{
  position:fixed;bottom:1.5rem;right:1.5rem;z-index:999;
  background:var(--surface);border:1px solid var(--gold-border);
  padding:.9rem 1.25rem;border-radius:var(--radius-sm);
  font-size:.875rem;max-width:320px;
  display:none;
  box-shadow:0 8px 32px rgba(0,0,0,.4);
}
.toast.show{display:block;animation:slideIn .3s ease}
.toast.err{border-color:var(--danger);color:var(--danger)}
.toast.ok{border-color:var(--success);color:var(--success)}
@keyframes slideIn{from{transform:translateY(1rem);opacity:0}to{transform:translateY(0);opacity:1}}

/* Admin */
.admin-tabs{display:flex;gap:0;border-bottom:1px solid var(--gold-border);margin-bottom:2rem}
.tab-btn{
  padding:.75rem 1.5rem;border:none;background:none;color:var(--text-muted);
  cursor:pointer;font-family:inherit;font-size:.9rem;
  border-bottom:2px solid transparent;margin-bottom:-1px;transition:all .2s;
}
.tab-btn.active{color:var(--gold);border-bottom-color:var(--gold)}
.tab-panel{display:none}
.tab-panel.active{display:block}

/* Drop zone */
.dropzone{
  border:2px dashed var(--gold-border);border-radius:var(--radius);
  padding:3rem 2rem;text-align:center;cursor:pointer;transition:all .2s;
}
.dropzone:hover,.dropzone.drag-over{border-color:var(--gold);background:var(--gold-dim)}
.dropzone p{color:var(--text-muted);font-size:.9rem;margin-top:.5rem}

/* Progress */
.progress-bar{background:var(--surface2);border-radius:2rem;height:.5rem;overflow:hidden;margin:.5rem 0}
.progress-fill{height:100%;background:var(--gold);border-radius:2rem;transition:width .3s}

/* Table */
table{width:100%;border-collapse:collapse;font-size:.875rem}
th,td{padding:.75rem 1rem;text-align:left;border-bottom:1px solid #1e1e1e}
th{color:var(--text-muted);font-weight:500}

/* Badges */
.badge{display:inline-block;padding:.2rem .6rem;border-radius:2rem;font-size:.75rem;font-weight:500}
.badge-ok{background:rgba(82,179,110,.15);color:var(--success)}
.badge-warn{background:rgba(201,160,74,.15);color:var(--gold)}

/* Loader */
.loader{text-align:center;padding:3rem;color:var(--text-muted)}
.spinner{
  width:2rem;height:2rem;border:2px solid var(--surface2);
  border-top-color:var(--gold);border-radius:50%;
  animation:spin 1s linear infinite;display:inline-block;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* Search result section */
.search-box{
  background:var(--surface);border:1px solid var(--gold-border);
  border-radius:var(--radius);padding:2rem;text-align:center;margin-bottom:2rem;
}
.search-box h3{margin-bottom:.5rem}
.search-box p{color:var(--text-muted);font-size:.9rem;margin-bottom:1.5rem}

/* Divider */
.divider{border:none;border-top:1px solid #1e1e1e;margin:1.5rem 0}
.divider-text{text-align:center;position:relative;margin:1.5rem 0}
.divider-text::before{content:'';position:absolute;top:50%;left:0;right:0;height:1px;background:#1e1e1e}
.divider-text span{position:relative;background:var(--surface);padding:0 .75rem;font-size:.8rem;color:var(--text-muted)}

/* Alert */
.alert{padding:1rem 1.25rem;border-radius:var(--radius-sm);font-size:.875rem;margin-bottom:1rem}
.alert-warn{background:rgba(201,160,74,.1);border:1px solid rgba(201,160,74,.3);color:var(--gold)}
.alert-err{background:rgba(224,82,82,.1);border:1px solid rgba(224,82,82,.3);color:var(--danger)}
.alert-ok{background:rgba(82,179,110,.1);border:1px solid rgba(82,179,110,.3);color:var(--success)}

/* Modal */
.modal-backdrop{
  position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:500;
  display:none;align-items:center;justify-content:center;padding:1.5rem;
}
.modal-backdrop.open{display:flex}
.modal{background:var(--surface);border:1px solid var(--gold-border);border-radius:var(--radius);padding:2rem;width:100%;max-width:500px;max-height:90vh;overflow-y:auto}
.modal h3{margin-bottom:1rem}
.modal-close{float:right;background:none;border:none;color:var(--text-muted);cursor:pointer;font-size:1.25rem;line-height:1}

/* Responsive */
@media(max-width:600px){
  .header{padding:1rem}
  .nav-links .btn-outline{display:none}
  .gallery-grid{grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:.5rem}
  .steps{grid-template-columns:1fr}
  .admin-tabs{overflow-x:auto}
  .tab-btn{white-space:nowrap;padding:.75rem 1rem}
}
