/* ============================================
   home.css — Landing / home page styles
   ============================================ */

/* Override main.css — let both html and body grow naturally */
html,
body {
  height: auto;
  overflow-x: hidden;
  overflow-y: auto;
}

html {
  scrollbar-gutter: stable;
}

body {
  display: block;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-overflow-scrolling: touch;
}

.home-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 20px 24px;
}

/* ── Header ── */
.home-header {
  text-align: center;
  margin-bottom: 40px;
}

.home-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: var(--color-accent);
  border-radius: 18px;
  margin-bottom: 16px;
}

.home-logo svg {
  width: 32px;
  height: 32px;
  color: #fff;
}

.home-header h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.home-tagline {
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* ── Cards ── */
.home-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 32px;
}

@media (max-width: 560px) {
  .home-cards {
    grid-template-columns: 1fr;
  }
}

.home-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.home-card h2 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}

.home-card label {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  font-weight: 500;
}

.req {
  color: var(--color-accent);
}

.opt {
  color: var(--color-text-muted);
  font-weight: 400;
}

.home-card input[type="text"],
.home-card input[type="password"],
.home-card select {
  width: 100%;
  padding: 9px 11px;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  color: var(--color-text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

.home-card input[type="text"]:focus,
.home-card input[type="password"]:focus,
.home-card select:focus {
  border-color: var(--color-accent);
}

.home-card input[type="text"]::placeholder,
.home-card input[type="password"]::placeholder {
  color: var(--color-text-muted);
  opacity: 0.7;
}

.home-card select option {
  background: #1d2233;
}

.btn-primary {
  width: 100%;
  padding: 10px;
  background: var(--color-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  margin-top: 4px;
}

.btn-primary:hover {
  opacity: 0.88;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.home-note {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  margin-top: -4px;
}

.home-error {
  font-size: 0.8rem;
  color: #ff6b6b;
  background: rgba(233, 69, 96, 0.12);
  border: 1px solid rgba(233, 69, 96, 0.3);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}

/* ── Recent Rooms ── */
.home-recent {
  margin-top: 8px;
}

.home-recent h3 {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 10px;
}

.recent-room-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  transition: border-color var(--transition), background var(--transition);
}

.recent-room-item:hover {
  border-color: rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.04);
}

.recent-room-item svg {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.recent-room-name {
  font-size: 0.88rem;
  font-weight: 500;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-room-id {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-family: monospace;
}

.recent-room-date {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-text-muted);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 4px 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.btn-text:hover {
  color: var(--color-text);
}

/* ── Stepper ── */
.stepper {
  display: flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.stepper-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.06);
  border: none;
  color: var(--color-text);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition);
}

.stepper-btn:hover {
  background: rgba(255,255,255,0.14);
}

.stepper-btn:active {
  background: var(--color-accent);
}

.stepper input[type="number"] {
  flex: 1;
  min-width: 0;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  border-radius: 0;
  background: rgba(255,255,255,0.03);
  color: var(--color-text);
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 4px;
  /* hide browser spin buttons */
  -moz-appearance: textfield;
}

.stepper input[type="number"]::-webkit-inner-spin-button,
.stepper input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ── Footer ── */
#home-footer {
  text-align: center;
  padding: 24px 20px;
  font-size: 0.68rem;
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
  margin-top: 32px;
}
