@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

:root {
  --yellow:      #FFCC33;
  --yellow-dark: #e6b800;
  --ink:         #1a1a1a;
  --ink-mid:     #555;
  --white:       #ffffff;
  --radius:      10px;
  --shadow:      0 8px 32px rgba(0, 0, 0, 0.10);
  --shadow-btn:  0 2px 8px rgba(0, 0, 0, 0.10);
}

/* ── Lock scroll on all viewports ── */

html, body {
  height: 100%;
  width: 100%;
  overflow: hidden;
  position: fixed;
}

body {
  background: var(--yellow);
  font-family: 'Inter', sans-serif;
  color: var(--ink);
}

/* ── Welcome overlay ── */

.welcome-overlay {
  position: fixed;
  inset: 0;
  background: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  pointer-events: none;
  animation: overlayOut 400ms ease-in 1600ms forwards;
}

.welcome-word {
  font-size: clamp(48px, 14vw, 88px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  animation: wordIn 600ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both,
             wordOut 400ms ease-in 1100ms forwards;
}

@keyframes wordIn {
  from { opacity: 0; transform: translateY(18px) scale(0.94); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

@keyframes wordOut {
  from { opacity: 1; transform: translateY(0)     scale(1);    }
  to   { opacity: 0; transform: translateY(-14px) scale(0.96); }
}

@keyframes overlayOut {
  from { opacity: 1; }
  to   { opacity: 0; visibility: hidden; }
}

/* ── Page layout ── */

.page {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  gap: 28px;
  opacity: 0;
  animation: pageIn 500ms ease-out 1700ms forwards;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Logo ── */

.logo {
  width: 192px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

/* ── Card ── */

.card {
  background: var(--white);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 32px 28px 28px;
  width: 100%;
  max-width: 360px;
}

/* ── Main buttons ── */

.btn-group {
  display: flex;
  gap: 12px;
}

.btn {
  flex: 1;
  padding: 13px 0;
  border: none;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  outline: none;
  transition: transform 80ms ease, filter 120ms ease;
  user-select: none;
}

.btn:active { transform: scale(0.96); }

.btn-admin {
  background: var(--ink);
  color: var(--white);
}
.btn-admin:hover { filter: brightness(1.18); }

.btn-seller {
  background: var(--yellow);
  color: var(--ink);
  border: 2px solid var(--yellow-dark);
}
.btn-seller:hover { background: var(--yellow-dark); }

/* ── Seller panel ── */

.seller-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 360ms ease, opacity 300ms ease, margin-top 360ms ease;
  margin-top: 0;
}

.seller-panel.open {
  max-height: 280px;
  opacity: 1;
  margin-top: 18px;
}

.seller-panel-inner {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.divider {
  height: 1px;
  background: #ebebeb;
  margin-bottom: 2px;
}

.input-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #999;
}

/* ── Type toggle ── */

.type-toggle {
  display: flex;
  background: #f2f2f2;
  border-radius: var(--radius);
  padding: 3px;
  gap: 3px;
}

.type-btn {
  flex: 1;
  padding: 7px 0;
  border: none;
  border-radius: 7px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-mid);
  background: transparent;
  cursor: pointer;
  outline: none;
  user-select: none;
  transition: background 150ms ease, color 150ms ease, box-shadow 150ms ease;
}

.type-btn.active {
  background: var(--white);
  color: var(--ink);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
}

/* ── Input ── */

.shop-input {
  width: 100%;
  padding: 11px 13px;
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: #fafafa;
  outline: none;
  transition: border-color 150ms ease, background 150ms ease;
}

.shop-input:focus {
  border-color: var(--yellow-dark);
  background: var(--white);
}

.shop-input::placeholder { color: #bbb; }

.error-msg {
  font-size: 12px;
  color: #c0392b;
  display: none;
  margin-top: -3px;
}

/* ── Sign In ── */

.btn-signin {
  width: 100%;
  padding: 12px 0;
  background: var(--yellow);
  border: 2px solid var(--yellow-dark);
  border-radius: var(--radius);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
  letter-spacing: 0.02em;
  outline: none;
  user-select: none;
  box-shadow: var(--shadow-btn);
  transition: background 120ms ease, transform 80ms ease;
}

.btn-signin:hover  { background: var(--yellow-dark); }
.btn-signin:active { transform: scale(0.97); }

/* ── Mobile tweaks ── */

@media (max-width: 400px) {
  .logo  { width: 160px; }
  .card  { padding: 24px 18px 20px; }
  .page  { gap: 20px; }
}

@media (max-height: 600px) {
  .logo  { width: 140px; }
  .page  { gap: 16px; }
  .card  { padding: 22px 20px 18px; }
}
