/* ============================================================
   WINTER WEDDING – Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400;500&display=swap');

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --green-dark:  #2d5a3d;
  --green-mid:   #3d7a52;
  --green-light: #eaf2ec;
  --green-glow:  rgba(45, 90, 61, 0.25);

  --night:       #0a1520;
  --night-mid:   #0f1e2e;
  --ice:         #c8dff0;
  --ice-dim:     rgba(200, 223, 240, 0.12);

  --white:       #ffffff;
  --off-white:   #f8f9f7;
  --text-dark:   #1c2826;
  --text-muted:  #5a6e65;

  --glass-bg:    rgba(255, 255, 255, 0.07);
  --glass-border:rgba(255, 255, 255, 0.14);
  --glass-shadow:0 8px 48px rgba(0, 0, 0, 0.45),
                 0 1px 0 rgba(255,255,255,0.06) inset;

  --radius-card: 20px;
  --radius-btn:  12px;
  --radius-input:10px;

  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --transition: 220ms cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: var(--font-sans);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */

body.page-login {
  min-height: 100dvh;
  background: var(--night);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

#snow-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── Login Card ──────────────────────────────────────────── */
.login-card {
  position: relative;
  z-index: 1;
  width: min(440px, calc(100vw - 40px));
  padding: 52px 48px 44px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.login-card::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 30px;
  right: 30px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--green-mid), transparent);
  border-radius: 99px;
}

.login-card-head {
  text-align: center;
  margin-bottom: 36px;
}

.login-snowflake {
  font-size: 22px;
  color: var(--ice);
  opacity: 0.7;
  letter-spacing: 12px;
  margin-bottom: 20px;
  display: block;
}

.login-couple {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 6vw, 2.8rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

.login-couple em {
  font-style: italic;
  color: var(--ice);
}

.login-subtitle {
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 400;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--glass-border);
}
.divider span {
  font-size: 14px;
  color: rgba(255,255,255,0.25);
}

/* ── Form ────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 14px 18px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-input);
  color: var(--white);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 300;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-input::placeholder { color: rgba(255,255,255,0.2); }

.form-input:focus {
  border-color: var(--green-mid);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* ── Login Button ────────────────────────────────────────── */
.btn-login {
  width: 100%;
  margin-top: 24px;
  padding: 15px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.btn-login:hover {
  background: var(--green-mid);
  box-shadow: 0 4px 24px rgba(45, 90, 61, 0.5);
  transform: translateY(-1px);
}

.btn-login:active { transform: translateY(0); }

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Error Message ───────────────────────────────────────── */
.error-msg {
  margin-top: 14px;
  padding: 10px 14px;
  background: rgba(220, 60, 60, 0.12);
  border: 1px solid rgba(220, 60, 60, 0.25);
  border-radius: 8px;
  color: #ff8a8a;
  font-size: 0.82rem;
  text-align: center;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity var(--transition), transform var(--transition);
}
.error-msg.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
.shake { animation: shake 0.4s ease; }

.login-footer {
  margin-top: 28px;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.2);
  letter-spacing: 0.06em;
}

/* ============================================================
   UPLOAD PAGE
   ============================================================ */

body.page-upload {
  min-height: 100dvh;
  background: var(--off-white);
  color: var(--text-dark);
  display: flex;
  flex-direction: column;
}

/* ── Header ──────────────────────────────────────────────── */
.upload-header {
  background: var(--white);
  border-bottom: 1px solid rgba(0,0,0,0.07);
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.header-snowflake {
  color: var(--green-dark);
  font-size: 18px;
  opacity: 0.6;
}

.header-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--text-dark);
  letter-spacing: 0.02em;
}

.header-title em {
  font-style: italic;
  color: var(--green-dark);
}

.btn-logout {
  padding: 8px 18px;
  background: transparent;
  border: 1px solid rgba(45, 90, 61, 0.3);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
}
.btn-logout:hover {
  border-color: var(--green-dark);
  color: var(--green-dark);
  background: var(--green-light);
}

/* ── Main ────────────────────────────────────────────────── */
.upload-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 60px 24px 80px;
  max-width: 680px;
  margin: 0 auto;
  width: 100%;
}

.upload-hero {
  text-align: center;
  margin-bottom: 48px;
}

.upload-hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 300;
  color: var(--text-dark);
  line-height: 1.15;
}

.upload-hero-title em { font-style: italic; color: var(--green-dark); }

.upload-hero-sub {
  margin-top: 10px;
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.upload-hero-line {
  width: 48px;
  height: 1px;
  background: var(--green-dark);
  opacity: 0.4;
  margin: 16px auto 0;
}

/* ── Drop Zone ───────────────────────────────────────────── */
.drop-zone {
  width: 100%;
  border: 2px dashed rgba(45, 90, 61, 0.35);
  border-radius: 18px;
  padding: 56px 32px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--white);
}

.drop-zone:hover,
.drop-zone.drag-over {
  border-color: var(--green-dark);
  background: var(--green-light);
  border-style: solid;
}

.drop-zone.drag-over { transform: scale(1.01); }

.drop-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 20px;
  color: var(--green-dark);
  opacity: 0.6;
}

.drop-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 300;
  color: var(--text-dark);
  margin-bottom: 6px;
}

.drop-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}

.btn-select {
  display: inline-block;
  padding: 10px 24px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: 8px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
}
.btn-select:hover {
  background: var(--green-mid);
  box-shadow: 0 4px 16px rgba(45, 90, 61, 0.35);
}

.drop-hint {
  margin-top: 16px;
  font-size: 0.72rem;
  color: rgba(0,0,0,0.25);
  letter-spacing: 0.04em;
}

/* ── File Queue ──────────────────────────────────────────── */
.file-queue {
  width: 100%;
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  animation: slideIn 200ms ease;
}

@keyframes slideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.file-thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--green-light);
}

.file-info {
  flex: 1;
  min-width: 0;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-size {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.file-progress {
  height: 3px;
  background: rgba(0,0,0,0.07);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 6px;
}

.file-progress-bar {
  height: 100%;
  background: var(--green-dark);
  border-radius: 99px;
  transition: width 0.3s ease;
  width: 0%;
}

.file-status {
  font-size: 18px;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

.file-remove {
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(0,0,0,0.25);
  font-size: 18px;
  line-height: 1;
  padding: 2px;
  transition: color var(--transition);
  flex-shrink: 0;
}
.file-remove:hover { color: #e53e3e; }

/* ── Upload Button ───────────────────────────────────────── */
.upload-actions {
  width: 100%;
  margin-top: 28px;
  display: flex;
  justify-content: center;
}

.btn-upload {
  width: 100%;
  max-width: 320px;
  padding: 16px;
  background: var(--green-dark);
  color: var(--white);
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-sans);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  display: none;
}

.btn-upload:hover {
  background: var(--green-mid);
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(45, 90, 61, 0.4);
}

.btn-upload:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* ── Toast ───────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--white);
  box-shadow: 0 4px 24px rgba(0,0,0,0.2);
  animation: toastIn 250ms ease, toastOut 300ms ease 3.2s forwards;
  white-space: nowrap;
}

.toast.success { background: var(--green-dark); }
.toast.error   { background: #c0392b; }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateY(12px); }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 540px) {
  .login-card { padding: 40px 28px 36px; }
  .upload-header { padding: 16px 20px; }
  .upload-main { padding: 40px 16px 60px; }
  .drop-zone { padding: 40px 20px; }
}
