/* carlitos — Liquid Glass Dark Theme */

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

html, body {
  height: 100%;
  overflow-x: hidden;
  background: #050505;
  font-family: 'DM Sans', sans-serif;
  color: rgba(255,255,255,0.88);
  -webkit-font-smoothing: antialiased;
}

#bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

#top-blur {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 320px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 0%, black 40%, transparent 100%);
  pointer-events: none;
  z-index: 1;
}



#mode-ripple {
  display: none;
}

#app {
  position: relative;
  z-index: 3;
}

::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

select option { background: #0e0e0e; color: rgba(255,255,255,0.88); }
::placeholder { color: rgba(255,255,255,0.22) !important; }

/* ── Picks mode (light / gold) ─────────────────────────────────────── */

body.picks-mode { background: #ffffff; color: rgba(255,255,255,0.92); }

body.picks-mode .wordmark { color: rgba(255,255,255,0.95); text-shadow: 0 2px 30px rgba(0,0,0,0.15); }
body.picks-mode .wordmark-sub { color: rgba(255,255,255,0.45); }
body.picks-mode .sign-out-btn { color: rgba(255,255,255,0.4); border-color: rgba(255,255,255,0.15); }
body.picks-mode .sign-out-btn:hover { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.08); }

/* ── Picks view ────────────────────────────────────────────────────── */

.picks-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  animation: fadeUp 0.6s ease both;
  padding-bottom: 40px;
}

.picks-date {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.picks-img-wrap {
  width: 100%;
  max-width: 560px;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 80px rgba(0,0,0,0.18), 0 4px 20px rgba(0,0,0,0.1);
}

.picks-img-wrap img {
  width: 100%;
  display: block;
}

.picks-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: center;
  max-width: 560px;
}

.picks-item-tag {
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.88);
  border: 1px solid rgba(255,255,255,0.25);
}

.picks-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(0,0,0,0.25);
  font-size: 13px;
}

/* ── Auth screen ───────────────────────────────────────────────────── */

#auth-screen {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.auth-wordmark {
  font-family: 'Cormorant', serif;
  font-size: 72px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 30px rgba(0,0,0,0.6);
  animation: fadeUp 0.9s ease both;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  animation: fadeUp 0.7s 0.15s ease both;
}

.google-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0.02em;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.22s ease;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
  backdrop-filter: blur(20px);
}

.google-btn:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.28);
  transform: translateY(-1px);
}

.google-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

.google-btn svg { flex-shrink: 0; }

.auth-error {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255,100,80,0.8);
}

/* ── Sign out ──────────────────────────────────────────────────────── */

.sign-out-btn {
  display: block;
  margin: 20px auto 0;
  padding: 6px 20px;
  border-radius: 99px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.25);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.sign-out-btn:hover {
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.5);
  border-color: rgba(255,255,255,0.18);
}

body.picks-mode .sign-out-btn {
  border-color: rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.3);
}

body.picks-mode .sign-out-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.3);
}

/* ── Wordmark ──────────────────────────────────────────────────────── */

.app-header {
  text-align: center;
  padding: 64px 24px 44px;
  animation: fadeUp 0.9s ease both;
  position: relative;
  z-index: 1;
}

.wordmark {
  font-family: 'Cormorant', serif;
  font-size: 88px;
  font-weight: 300;
  font-style: italic;
  letter-spacing: -0.04em;
  line-height: 1;
  color: rgba(255,255,255,0.94);
  text-shadow: 0 2px 30px rgba(0,0,0,0.6), 0 0 80px rgba(255,255,255,0.06);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: opacity 0.2s;
  display: block;
  margin: 0 auto;
}

.wordmark:hover { opacity: 0.75; }
.wordmark:active { opacity: 0.5; }

.wordmark-sub {
  margin-top: 10px;
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
  font-weight: 300;
}

/* ── Layout ────────────────────────────────────────────────────────── */

.app-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 20px 100px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ── Glass surface ─────────────────────────────────────────────────── */

.glass-panel {
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(40px) saturate(1.6) brightness(1.1);
  -webkit-backdrop-filter: blur(40px) saturate(1.6) brightness(1.1);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 22px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 12px 56px rgba(0,0,0,0.65);
  overflow: hidden;
  animation: fadeUp 0.7s 0.1s ease both;
}

/* ── Ribs texture ──────────────────────────────────────────────────── */

.ribs-bar {
  height: 22px;
  width: 100%;
  margin-top: 4px;
  background-image: repeating-linear-gradient(
    0deg,
    rgba(255,255,255,0.05) 0px, rgba(255,255,255,0.05) 1px,
    transparent 1px, transparent 5px
  );
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.07);
}

/* ── Add form panel ────────────────────────────────────────────────── */

.form-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 22px;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  color: rgba(255,255,255,0.55);
}

.form-toggle-label {
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.toggle-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: rgba(255,255,255,0.4);
  transition: transform 0.3s ease;
}

.toggle-icon.open { transform: rotate(45deg); }

.panel-divider { height: 1px; background: rgba(255,255,255,0.06); }

.form-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.4,0,0.2,1);
}

.form-body.open { max-height: 800px; }

/* ── Form fields ───────────────────────────────────────────────────── */

.form-fields {
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.field-group label {
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.28);
  font-weight: 300;
}

.field-group input,
.field-group select {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 10px;
  padding: 9px 12px;
  color: rgba(255,255,255,0.9);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  width: 100%;
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.field-group input:focus,
.field-group select:focus {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.field-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='rgba(255,255,255,0.28)' stroke-width='1.3' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-color: rgba(8,8,8,0.92);
  padding-right: 34px;
  cursor: pointer;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-row--qty {
  grid-template-columns: 72px 1fr;
  align-items: end;
}

/* File row */
.file-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
}

.browse-btn {
  padding: 8px 14px;
  border-radius: 10px;
  white-space: nowrap;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s;
}
.browse-btn:hover { background: rgba(255,255,255,0.1); }

.file-name {
  font-size: 11px;
  color: rgba(255,255,255,0.22);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

/* Add / Save button */
.add-btn {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.16);
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34,1.5,0.64,1);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}

.add-btn:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.26);
  transform: translateY(-1px);
}

.add-btn:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

/* ── Filter bar ────────────────────────────────────────────────────── */

.wardrobe-section { animation: fadeUp 0.8s 0.16s ease both; }

.wardrobe-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.wardrobe-label {
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.22);
}

.filter-bar {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.35);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.04em;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.18s;
  backdrop-filter: blur(10px);
}

.filter-btn:hover {
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
}

.filter-btn.active {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.88);
  font-weight: 400;
}

.filter-count { opacity: 0.5; }

/* ── Items grid ────────────────────────────────────────────────────── */

.items-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
}

.items-empty {
  text-align: center;
  padding: 60px 20px;
  border: 1px dashed rgba(255,255,255,0.07);
  border-radius: 18px;
  color: rgba(255,255,255,0.18);
  font-size: 12px;
  letter-spacing: 0.04em;
}

/* ── Wardrobe card ─────────────────────────────────────────────────── */

.wardrobe-card {
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(32px) saturate(1.5) brightness(1.06);
  -webkit-backdrop-filter: blur(32px) saturate(1.5) brightness(1.06);
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07), 0 4px 24px rgba(0,0,0,0.5);
  transition: transform 0.38s cubic-bezier(0.34,1.4,0.64,1),
              box-shadow 0.38s ease,
              border-color 0.2s ease;
  animation: cardIn 0.5s cubic-bezier(0.34,1.2,0.64,1) both;
  cursor: default;
}

.wardrobe-card:hover {
  transform: translateY(-6px) scale(1.022);
  border-color: rgba(255,255,255,0.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.2), 0 28px 70px rgba(0,0,0,0.7);
}

.card-specular {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  z-index: 2;
  pointer-events: none;
}

.qty-badge {
  position: absolute;
  top: 9px; left: 9px;
  z-index: 5;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 99px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: rgba(255,255,255,0.65);
  font-weight: 300;
}

.delete-btn {
  position: absolute;
  top: 9px; right: 9px;
  z-index: 5;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 15px;
  line-height: 1;
  font-family: inherit;
  opacity: 0;
  transition: opacity 0.2s, background 0.2s;
}

.wardrobe-card:hover .delete-btn { opacity: 1; }
.delete-btn:hover { background: rgba(200,60,50,0.7); color: #fff; }

.card-img {
  width: 100%;
  aspect-ratio: 1;
  padding: 10px;
  position: relative;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 10px;
}

.card-info {
  padding: 11px 13px 13px;
  cursor: pointer;
}

.card-name {
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  margin-bottom: 2px;
  letter-spacing: -0.01em;
  transition: color 0.2s;
}

.wardrobe-card:hover .card-name { color: #fff; }

.card-meta {
  font-size: 10px;
  color: rgba(255,255,255,0.3);
  margin-bottom: 7px;
  letter-spacing: 0.02em;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
}

.tag {
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.03em;
  background: rgba(255,255,255,0.07);
  color: rgba(255,255,255,0.45);
  border: 1px solid rgba(255,255,255,0.1);
}

/* ── Skeleton ──────────────────────────────────────────────────────── */

.skeleton-card {
  border-radius: 18px;
  aspect-ratio: 1 / 1.45;
  background: rgba(255,255,255,0.02);
  border: 1px dashed rgba(255,255,255,0.06);
  animation: pulse 2s infinite ease-in-out;
}

/* ── Edit Modal ────────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay[hidden] { display: none; }

.modal-card {
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-title {
  font-family: 'Cormorant', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 28px;
  color: rgba(255,255,255,0.9);
  padding: 22px 22px 0;
  letter-spacing: -0.02em;
}

.modal-actions {
  display: flex;
  gap: 10px;
  padding-top: 4px;
}

.cancel-btn {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.09);
  color: rgba(255,255,255,0.4);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
}

.cancel-btn:hover {
  border-color: rgba(255,255,255,0.2);
  color: rgba(255,255,255,0.65);
}

.modal-save-btn { flex: 1; }

/* ── Animations ────────────────────────────────────────────────────── */

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

@keyframes cardIn {
  from { opacity: 0; transform: scale(0.93); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes pulse {
  0%,100% { opacity: 0.3; }
  50%      { opacity: 0.6; }
}

/* ── Range inputs ──────────────────────────────────────────────────── */

input[type=range] {
  width: 100%;
  height: 2px;
  -webkit-appearance: none;
  background: rgba(255,255,255,0.15);
  border-radius: 99px;
  outline: none;
  cursor: pointer;
}

input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.6);
}
