/* BIG BUNGO'S SPLUNGO TOWN - 90s COWBOY STYLING */

body {
  background:
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" viewBox="0 0 60 60"><defs><pattern id="texture" x="0" y="0" width="30" height="30" patternUnits="userSpaceOnUse"><rect width="30" height="30" fill="%23D2B48C"/><circle cx="8" cy="8" r="2" fill="%23C19A6B" opacity="0.7"/><circle cx="22" cy="22" r="1.5" fill="%23A0522D" opacity="0.5"/><circle cx="15" cy="5" r="1" fill="%23CD853F" opacity="0.6"/><circle cx="5" cy="20" r="1.2" fill="%23B8860B" opacity="0.4"/><circle cx="25" cy="10" r="0.8" fill="%23A0522D" opacity="0.8"/><ellipse cx="12" cy="25" rx="3" ry="1" fill="%23C19A6B" opacity="0.3"/><ellipse cx="20" cy="15" rx="2" ry="1.5" fill="%23A0522D" opacity="0.2"/></pattern></defs><rect width="60" height="60" fill="url(%23texture)"/></svg>'),
    linear-gradient(45deg, rgba(210,180,140,0.9), rgba(193,154,107,0.7), rgba(160,82,45,0.5));
  background-size: 60px 60px, 400% 400%;
  animation: desert-shift 30s ease-in-out infinite;
  color: #2F1B14;
  font-family: 'Courier New', monospace;
  margin: 0;
  padding: 2rem 0 0 0;
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

@-webkit-keyframes ticker {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }

  100% {
    -webkit-transform: translate3d(-100%, 0, 0);
    transform: translate3d(-100%, 0, 0);
  }
}

@keyframes ticker {
  0% {
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    visibility: visible;
  }

  100% {
    -webkit-transform: translate3d(-100%, 0, 0);
    transform: translate3d(-100%, 0, 0);
  }
}

.top-ticker {
    position: fixed;
    z-index: 1000;
    top: 0;
    width: 100%;
    height: 2rem;
    padding-left: 100%;
    background-color: #fff8dc;
    overflow: hidden;
    box-sizing: content-box;
}

.ticker {
    display: inline-block;
    height: 2rem;
    line-height: 2rem;
    white-space: nowrap;
    padding-right: 100%;
    box-sizing: content-box;
    animation-iteration-count: infinite;
    animation-timing-function: linear;
    animation-name: ticker;
    animation-duration: 240s;
    will-change: transform;
    backface-visibility: hidden;
}

.ticker-item {
    display: inline-block;
    padding: 0 1rem;
    font-size: 1rem;
    color: #8B4513;
}

@keyframes desert-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at 20% 20%, rgba(139, 69, 19, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(160, 82, 45, 0.1) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.cowboy-container {
  display: flex;
  min-height: 100vh;
  position: relative;
}

.hat-column {
  width: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 10px;
  position: fixed;
  top: 0;
  height: 100vh;
  overflow: hidden;
}

.left-hats {
  left: 0;
  animation: hat-bounce-left 3s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

.right-hats {
  right: 0;
  animation: hat-bounce-right 3.5s ease-in-out infinite;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes hat-bounce-left {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(5px); }
}

@keyframes hat-bounce-right {
  0%, 100% { transform: translateX(0px); }
  50% { transform: translateX(-5px); }
}

.hat-icon {
  width: 50px;
  height: 50px;
  margin: 15px 0;
  /*filter: sepia(100%) saturate(150%) hue-rotate(20deg);*/
  animation: hat-wiggle 2s ease-in-out infinite;
  animation-delay: calc(var(--i, 0) * 0.2s);
  will-change: transform;
  backface-visibility: hidden;
}

.hat-icon:nth-child(odd) {
  animation-delay: 0.5s;
}

.hat-icon:nth-child(even) {
  animation-delay: 1s;
}

@keyframes hat-wiggle {
  0%, 100% { transform: rotate(0deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}

.main-content {
  flex: 1;
  margin: 0 100px;
  padding: 20px;
  position: relative;
}

.cowboy-header {
  text-align: center;
  background: linear-gradient(135deg, #8B4513, #A0522D);
  border: 5px solid #654321;
  border-radius: 15px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow:
    0 8px 16px rgba(0,0,0,0.3),
    inset 0 2px 4px rgba(255,255,255,0.2);
  position: relative;
  overflow: hidden;
}

.cowboy-header::before {
  content: '||||||||||||||||||||||||||||||||||||||||||||||||';
  position: absolute;
  top: -5px;
  left: 0;
  right: 0;
  font-size: 12px;
  color: #654321;
  letter-spacing: 1px;
  animation: fence-sway 4s ease-in-out infinite;
}

@keyframes fence-sway {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(3px); }
}

.site-title {
  color: #FFD700;
  font-size: 2.5em;
  text-shadow:
    3px 3px 0px #8B0000,
    6px 6px 20px rgba(255,215,0,0.8);
  margin: 0 0 20px 0;
  font-family: 'Courier New', monospace;
  font-weight: bold;
}

.cowboy-nav {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  gap: 20px;
}

.nav-link {
  background: linear-gradient(45deg, #D2691E, #CD853F);
  color: white;
  text-decoration: none;
  padding: 8px 16px;
  border: 3px solid #8B4513;
  border-radius: 25px;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
  box-shadow: 0 4px 8px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, #FFD700, #FFA500);
  border-radius: 27px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nav-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 12px rgba(0,0,0,0.4);
}

.nav-link:hover::before {
  opacity: 1;
}

.cowboy-main {
  background: rgba(255,248,220,0.9);
  border: 4px solid #8B4513;
  border-radius: 10px;
  padding: 30px;
  box-shadow: inset 0 0 20px rgba(139,69,19,0.3);
  position: relative;
}

.cowboy-main::before {
  content: '*';
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 40px;
  color: #8B4513;
  animation: star-spin 8s linear infinite;
}

.anim-spin {
  animation: star-spin 8s linear infinite;
  will-change: transform;
  backface-visibility: hidden;
}

@keyframes star-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.howdy-text {
  font-size: 1.4em;
  color: #8B0000;
  font-weight: bold;
  text-align: center;
  margin: 0 0 20px 0;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.welcome-text {
  font-size: 1.1em;
  color: #654321;
  font-style: italic;
  text-align: center;
  margin: 20px 0;
}

.external-link {
  color: #8B0000;
  font-weight: bold;
  text-decoration: underline;
  transition: color 0.3s ease;
}

.external-link:hover {
  color: #DC143C;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

.saloon-box {
  background: linear-gradient(135deg, #DEB887, #D2B48C);
  border: 3px dashed #8B4513;
  border-radius: 15px;
  padding: 25px;
  margin-top: 30px;
  text-align: center;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  position: relative;
}

.saloon-box::before {
  content: '~ ~ ~ SALOON ~ ~ ~';
  position: absolute;
  top: -15px;
  left: 50%;
  transform: translateX(-50%);
  background: #DEB887;
  padding: 0 15px;
  font-size: 14px;
  color: #8B4513;
  font-weight: bold;
  letter-spacing: 2px;
}

.saloon-title {
  color: #8B0000;
  font-size: 1.8em;
  margin: 0 0 15px 0;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.drinks-menu {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 20px;
}

.drink-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(45deg, #654321, #8B4513);
  color: white;
  text-decoration: none;
  padding: 15px;
  border: 2px solid #4A2C17;
  border-radius: 10px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0,0,0,0.8);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.1), 0 2px 6px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  min-width: 100px;
}

.drink-item:hover {
  transform: translateY(-2px);
  box-shadow: inset 0 2px 4px rgba(255,255,255,0.2), 0 4px 8px rgba(0,0,0,0.4);
  background: linear-gradient(45deg, #8B4513, #A0522D);
}

.drink-icon {
  width: 35px;
  height: 35px;
  margin-bottom: 8px;
  filter: brightness(1.2);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 2px solid #8B4513;
}

th {
  background: linear-gradient(135deg, #8B4513, #A0522D);
  color: #FFD700;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

tr:hover {
  background: rgba(210,180,140,0.3);
}

.clickable-row {
  position: relative;
  cursor: pointer;
  transition: all 0.2s ease;
}

.row-link {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
}

.row-link:hover {
  transform: none;
  box-shadow: none;
  background: none;
}

.clickable-row:hover {
  background: rgba(210,180,140,0.5) !important;
  transform: scale(1.01);
  box-shadow: 0 2px 8px rgba(139,69,19,0.3);
}

.clickable-row td a:not(.row-link) {
  color: #8B0000;
  font-weight: bold;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 5px;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
  z-index: 1;
}

.clickable-row td a:not(.row-link):hover {
  background: linear-gradient(135deg, #FFD700, #FFA500);
  color: #2F1B14;
  text-shadow: none;
  transform: scale(1.1);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.bought-item {
  opacity: 0.5;
  position: relative;
}

.bought-item td {
  text-decoration: line-through;
  color: #8B4513;
}

.bought-item::after {
  content: attr(data-purchase-note);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, #FFF8DC, #FFEFD5);
  color: #8B4513;
  padding: 12px 20px;
  border: 3px solid #D2691E;
  border-radius: 10px;
  font-weight: bold;
  font-size: 1.1em;
  text-shadow: none;
  box-shadow: 0 6px 12px rgba(0,0,0,0.5);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1000;
  text-decoration: none;
}

.bought-item:hover::after {
  opacity: 1;
}

@media (max-width: 1024px) {
  .main-content {
    margin: 0 90px;
  }

  .hat-column {
    width: 70px;
  }

  .hat-icon {
    width: 45px;
    height: 45px;
    margin: 12px 0;
  }
}

@media (max-width: 768px) {
  .recipe-page .hat-column,
  .library-page .hat-column {
    display: none;
  }

  .recipe-page .main-content,
  .library-page .main-content {
    margin: 0;
  }

  .main-content {
    margin: 0 70px;
  }

  .hat-column {
    width: 60px;
    padding: 20px 5px;
  }

  .hat-icon {
    width: 40px;
    height: 40px;
    margin: 10px 0;
  }

  .site-title {
    font-size: 1.8em;
  }

  .cowboy-nav {
    justify-content: center;
    gap: 15px;
  }

  .nav-link {
    padding: 10px 15px;
    font-size: 1em;
  }
}

@media (max-width: 600px) {
  .main-content {
    margin: 0 55px;
  }

  .hat-column {
    width: 45px;
    padding: 15px 5px;
  }

  .hat-icon {
    width: 30px;
    height: 30px;
    margin: 8px 0;
  }

  .site-title {
    font-size: 1.5em;
  }

  .cowboy-nav {
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .main-content {
    margin: 0 40px;
  }

  .hat-column {
    width: 35px;
    padding: 10px 2px;
  }

  .hat-icon {
    width: 25px;
    height: 25px;
    margin: 6px 0;
  }

  .site-title {
    font-size: 1.2em;
  }

  .cowboy-nav {
    gap: 10px;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.9em;
  }

  .cowboy-main {
    padding: 15px;
    overflow-x: auto;
  }

  table {
    font-size: 0.85em;
  }

  th, td {
    padding: 8px 6px;
  }
}

@media (max-width: 380px) {
  .main-content {
    margin: 0 33px;
  }

  .hat-column {
    width: 28px;
    padding: 10px 2px;
  }

  .hat-icon {
    width: 20px;
    height: 20px;
    margin: 5px 0;
  }

  .site-title {
    font-size: 1em;
  }

  .nav-link {
    padding: 6px 10px;
    font-size: 0.8em;
  }

  .cowboy-main {
    padding: 10px;
  }

  table {
    font-size: 0.75em;
  }

  th, td {
    padding: 6px 4px;
  }
}
