/* GridTea Muffle Admin — themed styles */

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

:root {
  --wine: #5a1a2c;
  --wine-dark: #3d0f1c;
  --wine-light: #7a2d42;
  --cream: #f4e8d8;
  --gold: #c9a24f;
  --gold-dark: #a0812f;
  --ink: #1a0a10;
  --off-white: #f9f4ec;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, sans-serif;
  background: var(--wine);
  color: var(--cream);
  line-height: 1.5;
}

.corner-mark {
  position: fixed;
  top: 1rem;
  left: 1rem;
  width: 60px;
  height: 60px;
  opacity: 0.85;
  z-index: 10;
}
.corner-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}


/* ---- Login page ---- */

.page-login {
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 20%, var(--wine-light) 0%, var(--wine) 60%, var(--wine-dark) 100%);
}

.login-shell {
  max-width: 380px;
  width: 90%;
  text-align: center;
  padding: 3rem 2rem;
}

.brand {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 500;
  font-style: italic;
  font-size: 3.5rem;
  color: var(--cream);
  margin: 0;
  letter-spacing: 0.02em;
}

.brand-sub {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0.25rem 0 2.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.login-form input[type="password"] {
  padding: 0.85rem 1rem;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  background: rgba(249, 244, 236, 0.08);
  border: 1px solid rgba(201, 162, 79, 0.3);
  border-radius: 4px;
  color: var(--cream);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.login-form input[type="password"]:focus {
  border-color: var(--gold);
  background: rgba(249, 244, 236, 0.12);
}
.login-form input[type="password"]::placeholder {
  color: rgba(244, 232, 216, 0.4);
  font-style: italic;
}


.login-form button {
  padding: 0.85rem 1rem;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--gold);
  color: var(--wine-dark);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
  margin-top: 0.5rem;
}
.login-form button:hover { background: var(--gold-dark); color: var(--cream); }
.login-form button:active { transform: scale(0.98); }

.error {
  color: #ffb0b0;
  background: rgba(200, 60, 80, 0.15);
  border: 1px solid rgba(200, 60, 80, 0.3);
  padding: 0.6rem 1rem;
  border-radius: 4px;
  font-size: 14px;
  font-style: italic;
}

.footnote {
  margin-top: 2rem;
  font-size: 13px;
  color: rgba(244, 232, 216, 0.5);
  font-style: italic;
}
.back-link {
  color: var(--gold);
  text-decoration: none;
}
.back-link:hover { text-decoration: underline; }


/* ---- Tool page ---- */

.page-tool {
  background: linear-gradient(180deg, var(--wine-dark) 0%, var(--wine) 100%);
  padding-bottom: 4rem;
}

.tool-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid rgba(201, 162, 79, 0.2);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.tool-header .brand {
  font-size: 2rem;
  margin: 0;
}
.tool-header .brand-sub {
  margin: 0;
  color: var(--gold);
}
.tool-header .logout {
  font-size: 13px;
  color: rgba(244, 232, 216, 0.5);
  text-decoration: none;
  font-style: italic;
}
.tool-header .logout:hover { color: var(--gold); }

.tool-shell {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

h2.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: 1.4rem;
  color: var(--gold);
  border-top: 1px solid rgba(201, 162, 79, 0.2);
  padding-top: 1.5rem;
  margin: 1.5rem 0 1rem;
}
h2.section-title:first-of-type { border-top: none; padding-top: 0; }


.yt-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}
.yt-box input[type="url"] {
  flex: 1;
  padding: 0.7rem 1rem;
  font-size: 14px;
  background: rgba(249, 244, 236, 0.08);
  border: 1px solid rgba(201, 162, 79, 0.3);
  border-radius: 4px;
  color: var(--cream);
  outline: none;
  font-family: 'Inter', sans-serif;
}
.yt-box input[type="url"]:focus { border-color: var(--gold); }
.yt-box input::placeholder { color: rgba(244, 232, 216, 0.4); font-style: italic; }

#drop-zone {
  border: 2px dashed rgba(201, 162, 79, 0.4);
  border-radius: 6px;
  padding: 2rem 1rem;
  text-align: center;
  cursor: pointer;
  background: rgba(249, 244, 236, 0.05);
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 1rem;
}
#drop-zone.dragover {
  background: rgba(201, 162, 79, 0.15);
  border-color: var(--gold);
}
#drop-label {
  margin: 0 0 0.5rem;
  font-size: 15px;
  color: var(--cream);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-size: 1.15rem;
}
.hint {
  margin: 0;
  font-size: 13px;
  color: rgba(244, 232, 216, 0.5);
}


.mode-row {
  display: flex;
  gap: 6px;
  margin-top: 1.5rem;
  margin-bottom: 1rem;
}
.mode-btn {
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
  background: rgba(249, 244, 236, 0.06);
  border: 1px solid rgba(201, 162, 79, 0.25);
  border-radius: 4px;
  cursor: pointer;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  letter-spacing: 0.05em;
  transition: all 0.15s;
}
.mode-btn:hover { background: rgba(249, 244, 236, 0.1); }
.mode-btn.active {
  background: var(--gold);
  color: var(--wine-dark);
  border-color: var(--gold);
  font-weight: 500;
}

.control-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 0.5rem;
}
.control-row label {
  font-size: 13px;
  color: var(--cream);
  min-width: 140px;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 15px;
}
.control-row input[type="range"] { flex: 1; accent-color: var(--gold); }
.control-row input[type="text"], .control-row input[type="number"], .control-row select {
  flex: 1;
  padding: 6px 10px;
  font-size: 14px;
  border: 1px solid rgba(201, 162, 79, 0.3);
  border-radius: 4px;
  background: rgba(249, 244, 236, 0.08);
  color: var(--cream);
  font-family: 'Inter', sans-serif;
}
.control-row .readout {
  font-size: 14px;
  font-weight: 500;
  min-width: 70px;
  text-align: right;
  color: var(--gold);
  font-family: 'Cormorant Garamond', Georgia, serif;
}
.control-hint {
  font-size: 12px;
  color: rgba(244, 232, 216, 0.5);
  margin: 0 0 1rem 152px;
  font-style: italic;
}


.checkbox-group {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 0.25rem 0 1rem 0;
  flex: 1;
}
.checkbox-group label {
  font-size: 13px;
  color: var(--cream);
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  min-width: 0;
}
.checkbox-group input { vertical-align: middle; margin-right: 4px; accent-color: var(--gold); }

.button-row {
  display: flex;
  gap: 8px;
  margin-bottom: 1rem;
}
button {
  flex: 1;
  padding: 8px 14px;
  font-size: 14px;
  background: rgba(249, 244, 236, 0.08);
  border: 1px solid rgba(201, 162, 79, 0.3);
  border-radius: 4px;
  cursor: pointer;
  color: var(--cream);
  font-family: 'Inter', sans-serif;
  transition: background 0.15s, transform 0.05s;
}
button:hover { background: rgba(249, 244, 236, 0.15); }
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.4; cursor: not-allowed; }

#yt-btn, #process-btn {
  background: var(--gold);
  color: var(--wine-dark);
  border-color: var(--gold);
  font-weight: 500;
  letter-spacing: 0.05em;
}
#yt-btn:hover, #process-btn:hover { background: var(--gold-dark); color: var(--cream); }
#yt-btn { flex: 0 0 auto; padding: 0.7rem 1.5rem; }
#process-btn { width: 100%; padding: 12px; font-size: 15px; }

#status, #yt-status {
  margin-top: 1rem;
  font-size: 13px;
  color: rgba(244, 232, 216, 0.75);
  text-align: center;
  min-height: 18px;
  font-style: italic;
}

.save-pref {
  margin-top: 0.75rem;
  font-size: 12px;
  color: rgba(244, 232, 216, 0.5);
  text-align: center;
  font-style: italic;
}
.save-pref input { vertical-align: middle; margin-right: 4px; accent-color: var(--gold); }

.hidden { display: none !important; }
