:root {
  --bg: #0f0f12;
  --surface: #1a1a1f;
  --surface-hover: #242429;
  --accent: #ff6b35;
  --accent-soft: rgba(255, 107, 53, 0.15);
  --text: #e8e8ed;
  --text-muted: #8a8a94;
  --border: #2d2d35;
  --success: #22c55e;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Outfit', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.header {
  text-align: center;
  padding: 2.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.logo-x {
  color: var(--accent);
}

.tagline {
  margin: 0.5rem 0 0;
  color: var(--text-muted);
  font-size: 1rem;
}

.auth-area {
  margin-top: 1.25rem;
}

.btn-google {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: white;
  color: #333;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

.btn-google:hover {
  background: #f5f5f5;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.user-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.user-photo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
}

.user-email {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.btn-logout {
  font-size: 0.9rem;
  color: var(--accent);
  text-decoration: none;
}

.btn-logout:hover {
  text-decoration: underline;
}

.main {
  max-width: 640px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.hero {
  margin-bottom: 2.5rem;
}

.hero-text {
  font-size: 1.15rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.5rem 0 0;
  opacity: 0.9;
}

.catalog h2,
.cart h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 0.5rem;
  margin-bottom: 2.5rem;
}

.emoji-btn {
  width: 64px;
  height: 64px;
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.emoji-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent);
  transform: scale(1.05);
}

.emoji-btn.selected {
  background: var(--accent-soft);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.selected-emojis {
  min-height: 48px;
  padding: 1rem;
  background: var(--surface);
  border-radius: 12px;
  border: 1px solid var(--border);
  margin-bottom: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 1.5rem;
}

.selected-emojis:empty::after {
  content: 'No emojis selected yet';
  color: var(--text-muted);
  font-size: 0.95rem;
}

.order-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-row label {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
  color: var(--text-muted);
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-row input::placeholder,
.form-row textarea::placeholder {
  color: var(--text-muted);
  opacity: 0.7;
}

.form-row textarea {
  resize: vertical;
  min-height: 64px;
}

.btn-submit {
  padding: 0.9rem 1.5rem;
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.btn-submit:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--success);
  border-radius: 10px;
  color: var(--success);
  font-weight: 500;
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.footer {
  text-align: center;
  padding: 2rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}
