/* Drunkulator stylesheet */

:root {
  --color-bg: #E8D4BF;
  --color-surface: #F5EDE4;
  --color-panel: #D4B896;
  --color-accent: #8B6F47;
  --color-primary: #2C1F18;
  --color-muted: #6B5D54;
  --color-dark: #1A0F0A;
  --color-soft: #A68F7B;
  --color-brown: #8B6F47;
  --color-selected: #6B5344;
}

body {
  margin: 0;
  padding: 0;
  font-family: "Cormorant Garamond", "Georgia", serif;
  background: radial-gradient(circle at top left, #F7F1E7 0%, #D2B899 80%);
  color: var(--color-primary);
  background-image: radial-gradient(circle at 20% 10%, rgba(58, 49, 43, 0.08) 0%, transparent 32%), radial-gradient(circle at 80% 80%, rgba(58, 49, 43, 0.05) 0%, transparent 25%), linear-gradient(160deg, #F7F1E7 0%, #E0C9A8 100%);
}

h1.title {
  margin: 0;
  padding: 1.5rem 1rem 0.5rem;
  text-align: center;
  font-size: 2.4rem;
  letter-spacing: 0.08em;
  color: var(--color-dark);
  text-shadow: 0 4px 12px rgba(58, 49, 43, 0.2);
}

body > div,
#historyContainer {
  max-width: 100%;
  margin: 1rem auto;
  padding: 1.1rem;
  background: var(--color-surface);
  border-radius: 24px;
  box-shadow: 0 30px 65px rgba(58, 49, 43, 0.18);
}

.card {
  box-shadow: 0 18px 40px rgba(181, 150, 110, 0.12);
}

.welcome,
.drinkMenu,
.mixerMenu,
.toolbar,
.bevCount,
#caloriesToggle {
  margin-bottom: 1rem;
}

.welcome{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

p {
  margin: 0 0 0.75rem;
}

input[type="number"] {
  width: 100%;
  padding: 0.95rem 1rem;
  margin-bottom: 0.85rem;
  border: 1px solid rgba(58, 49, 43, 0.18);
  border-radius: 14px;
  font-size: 1rem;
  box-sizing: border-box;
  background: #f8f0e6;
  color: var(--color-dark);
}

button {
  min-height: 48px;
  padding: 0.95rem 1rem;
  border: none;
  border-radius: 14px;
  background: var(--color-accent);
  color: #FFFDF9;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 12px 30px rgba(58, 49, 43, 0.18);
}

#leaveTimeButton {
  background: #deccb0;
  color: #786c54;
  border: 1px solid rgba(153, 124, 104, 0.2);
  font-size: smaller;
}

button:hover {
  background: #8e6f53;
  transform: translateY(-1px);
  box-shadow: 0 16px 36px rgba(58, 49, 43, 0.22);
}

.drinkMenu,
.mixerMenu {
  background: var(--color-panel);
  border: 1px solid rgba(58, 49, 43, 0.14);
  border-radius: 20px;
}

.topStatus {
  display: grid;
  gap: 0.9rem;
  margin: 1rem auto;
  max-width: 620px;
}

@media (min-width: 900px) {
  .topStatus {
    grid-template-columns: 1.5fr 0.9fr 0.9fr;
  }
}

.topStatus .card {
  padding: 1.15rem;
  border-radius: 26px;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid rgba(58, 49, 43, 0.12);
  box-shadow: 0 20px 50px rgba(58, 49, 43, 0.14);
}

.topStatus .bevCount {
  min-height: 200px;
  padding: 1rem 1.3rem;
  display: grid;
  gap: 0.35rem;
  place-items: center;
  text-align: center;
  background: linear-gradient(180deg, rgba(251, 238, 217, 0.95), rgba(231, 198, 149, 0.96));
  border: 2px solid rgba(139, 111, 71, 0.9);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25), 0 22px 50px rgba(92, 58, 24, 0.24);
  border-radius: 32px;
  transition: all 0.3s ease;
}

.topStatus .bevCount.limit-reached {
  background: linear-gradient(180deg, rgba(220, 100, 100, 0.9), rgba(180, 60, 60, 0.9));
  border: 2px solid rgba(139, 40, 40, 0.95);
  box-shadow: inset 0 0 0 1px rgba(255, 150, 150, 0.3), 0 22px 50px rgba(139, 40, 40, 0.35);
}

.pubBadge {
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  background: rgba(181, 150, 110, 0.18);
  color: var(--color-dark);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}

.topStatus .bevCount p:first-child,
.topStatus .detailStatus p:first-child,
.limitStatus p:first-child {
  margin-bottom: 0.25rem;
  color: var(--color-muted);
}

.topStatus .bevCount p:last-child,
.limitStatus p:last-child {
  font-size: 3.8rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  margin: 0;
  color: #2A170F;
  text-shadow: 0 2px 8px rgba(102, 64, 34, 0.25);
}

.limitStatus {
  display: grid;
  place-items: center;
}

.trackPrompt {
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  padding: 1rem;
  border: 1px solid rgba(58, 49, 43, 0.15);
  border-radius: 24px;
  background: rgba(255, 253, 249, 0.96);
  box-shadow: 0 18px 40px rgba(58, 49, 43, 0.08);
}

.trackPrompt button {
  width: 100%;
  padding: 0.95rem 1.1rem;
  border-radius: 20px;
  border: 1px solid rgba(58, 49, 43, 0.18);
  background: var(--color-accent);
  color: #FFFDF9;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  justify-content: center;
  box-shadow: 0 18px 38px rgba(58, 49, 43, 0.2);
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.trackPrompt button:hover {
  background: #7d5f3c;
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 22px 48px rgba(58, 49, 43, 0.28);
}

.trackPrompt .trackingIcon {
  font-size: 1.3rem;
}

/* Friend input styling placeholders */
#friendInputsContainer {
  /* Container around all friend input fields */
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

#friendInputsContainer input,
.friendInput {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 20px;
  border: 1px solid rgba(58, 49, 43, 0.18);
  background: rgba(255, 253, 249, 0.95);
  font-size: 0.9rem;
  font-weight: 50;
  color: var(--color-dark);
  box-shadow: 0 10px 24px rgba(58, 49, 43, 0.08);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#friendInputsContainer input:focus,
.friendInput:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(139, 111, 71, 0.12);
  transform: translateY(-1px);
}

#friendInputsContainer input::placeholder,
.friendInput::placeholder {
  color: #8c7a67;
  font-size: 0.9rem;
  font-style: italic;
}

/* Use .friendInputLabel if you want a label for each friend input */
.friendInputLabel {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  color: var(--color-muted);
}

/* Example round selector styling */
#roundSelector {
  width: 100%;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(58, 49, 43, 0.18);
  background: #fff;
  font-size: 1rem;
  color: var(--color-dark);
}

#nextRoundText {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--color-accent);
}

.trackPrompt .trackingLabel {
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.trackPrompt .toggleSymbol {
  font-size: 1rem;
  color: var(--color-muted);
}

.checkboxLabel {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1.05rem;
  border-radius: 20px;
  border: 1px solid rgba(58, 49, 43, 0.16);
  background: #f9f0e4;
  color: var(--color-primary);
  box-shadow: 0 16px 36px rgba(58, 49, 43, 0.08);
  font-weight: 600;
}

.checkboxLabel input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--color-accent);
  border-radius: 6px;
  border: 1px solid rgba(58, 49, 43, 0.2);
  background: #fff;
}

.warning {
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(58, 49, 43, 0.16);
  background: #F7EDE1;
  border-radius: 18px;
  color: var(--color-dark);
  box-shadow: inset 0 0 0 1px rgba(125, 116, 108, 0.08);
}

button[disabled],
button.disabled {
  background: #BFA98B;
  opacity: 0.7;
  cursor: not-allowed;
  box-shadow: none;
  color: rgba(255, 253, 249, 0.9);
}

#caloriesToggle {
  display: none;
  background: #f7efe4;
  border-radius: 18px;
}

.menuGrid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
  gap: 0.65rem;
}

.menuGrid li {
  margin: 0;
}

.menuGrid button {
  width: 100%;
  display: grid;
  place-items: center;
  gap: 0.35rem;
  padding: 0.6rem;
  background: #F9F0E2;
  border: 1px solid rgba(58, 49, 43, 0.14);
  border-radius: 16px;
  color: var(--color-primary);
  font-weight: 600;
  text-align: center;
  box-shadow: 0 10px 24px rgba(58, 49, 43, 0.1);
}

.menuGrid button:hover {
  background: #F3E7D8;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 28px rgba(58, 49, 43, 0.15);
}

.currentSelection {
  display: none;
  text-align: center;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(139, 111, 71, 0.08) 0%, rgba(107, 83, 68, 0.06) 100%);
  border: 2px solid var(--color-brown);
  border-radius: 16px;
  margin-bottom: 0.85rem;
  font-weight: 600;
  color: var(--color-dark);
}

.currentSelection.active {
  display: block;
}

.currentSelection .drinkName {
  font-size: 1.15rem;
  color: var(--color-selected);
  font-weight: 700;
}

.currentSelection .mixerName {
  font-size: 0.9rem;
  color: var(--color-brown);
  margin-top: 0.3rem;
}

.currentSelection .selected-label {
  font-size: 0.75rem;
  color: var(--color-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.menuGrid button img {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 14px;
  background: #f4e7d9;
  padding: 0.25rem;
}

.menuGrid button span {
  font-size: 0.78rem;
  color: var(--color-primary);
}

.toolbar {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 0.5rem;
  justify-content: center;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
}

.toolbar button {
  flex: 1 1 auto;
  min-width: 0;
  max-width: none;
  padding: 0.65rem 0.45rem;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  display: block;
}

.toolbar button:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 20px rgba(58, 49, 43, 0.2);
}

.toolbar #limitMessage {
  display: none;
}

#limitMessage {
  margin: 0;
  color: var(--color-muted);
}

.bevCount,
#caloriesToggle,
#historyContainer {
  padding-top: 0.75rem;
}

#caloriesToggle {
  background: #f8f2e7;
  border-radius: 18px;
}

#caloriesToggle p,
#historyContainer h3 {
  margin-bottom: 0.5rem;
}

#historyContainer {
  background: #f7efe4;
  border: 1px solid rgba(58, 49, 43, 0.1);
}

#historyList {
  display: grid;
  gap: 0.7rem;
}

.historyEntry {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  background: #fff7ee;
  border-radius: 14px;
  border: 1px solid rgba(189, 163, 163, 0.2);
}

.historyEntry p {
  margin: 0;
  color: var(--color-primary);
}

.topStatus > p {
  color: var(--color-primary);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
}

.topStatus > p span {
  color: var(--color-brown);
  font-weight: 700;
}

.menuGrid button.selected {
  background: var(--color-selected);
  color: #FFFEF5;
  border: 2px solid var(--color-accent);
  font-weight: 700;
  box-shadow: 0 12px 32px rgba(107, 83, 68, 0.25);
  transform: scale(1.08);
}

.menuGrid button.selected:hover {
  background: #5a3d2e;
  transform: scale(1.12) translateY(-3px);
  box-shadow: 0 14px 36px rgba(107, 83, 68, 0.35);
}

.menuGrid button.selected span {
  color: #FFFEF5;
}

@media (max-width: 640px) {
  body > div,
  #historyContainer {
    margin: 0.6rem auto;
    padding: 0.8rem;
    border-radius: 18px;
  }

  h1.title {
    font-size: 1.9rem;
    padding-top: 1rem;
  }

  .topStatus {
    gap: 0.7rem;
  }

  .topStatus .bevCount {
    min-height: 180px;
    padding: 1rem;
  }

  .trackPrompt {
    gap: 0.65rem;
    padding: 0.8rem;
  }

  .trackPrompt button,
  .checkboxLabel,
  .toolbar button {
    font-size: 0.95rem;
    padding: 0.75rem 0.9rem;
  }

  .menuGrid {
    grid-template-columns: repeat(auto-fit, minmax(66px, 1fr));
    gap: 0.55rem;
  }

  .menuGrid button {
    padding: 0.45rem;
  }

  .menuGrid button img {
    width: 44px;
    height: 44px;
  }

  .toolbar {
    gap: 0.45rem;
    flex-wrap: nowrap;
    width: 100%;
  }

  .toolbar button {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0.55rem 0.3rem;
    font-size: 0.7rem;
  }
}

@media (min-width: 640px) {
  .toolbar {
    gap: 0.65rem;
    width: 100%;
  }

  .toolbar button {
    flex: 1 1 auto;
    min-width: 0;
    max-width: none;
    padding: 0.75rem 0.5rem;
    font-size: 0.88rem;
  }

  button {
    width: auto;
  }
}
