/* =========================
   Base Styles
   ========================= */
*, *::before, *::after {
  box-sizing: border-box; 
}

body {
  font-family: 'Bitcount Grid Single', monospace;
  font-weight: 500;
  font-size: 1vw; /* smaller base font */
  margin: 0;
  
  display: flex;
  justify-content: center; 
  align-items: center; 
  flex-direction: column; 
  
  color: #080600;
  min-height: 100vh;
  padding: 3vh 0; /* reduced vertical padding */
}

/* Ensure full page height */
html, body {
  height: 100%;
}

/* =========================
   Page-specific backgrounds
   ========================= */
#enter-background {
  background-image: url('https://media3.giphy.com/media/v1.Y2lkPTc5MGI3NjExcHY2bDl3MWM5NnN0YTl4dTdsMmVoMTM1aDU4bzE1Mmxmb2Frc3VsaCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/KHh7jLrG6gIXBTnxsp/giphy.gif');
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}
#hand-background {
  background-image: url('https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExcW53aHRsejB2ZGJ6c3VjOWcyMHNmbHM0NzNhaGhmZTl3aG1jb2x0bSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/MegH2FZa3y9n51AxiL/giphy.gif');
  background-repeat: repeat;
  background-size: auto;
}

/* =========================
   Headings and Text
   ========================= */
h1 {
  font-size: 2.4vw;
}
h3 {
  font-size: 1.6vw;
}
p, ul {
  font-size: 1.5vw;
  line-height: 1.4;
  max-width: 85vw;
}
a {
  color: #872657;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}
body img:not(.controlimg):not(.titlebaricon):not(#imagestyle img) {
  width: 25vw;
  max-width: 350px;
  height: auto;
}

/* =========================
   Content Box (Enter link)
   ========================= */
.content-box {
  max-width: 220px;
  padding: 1.5rem;
  background-color: #faf7d9;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  text-align: center;
  font-size: 0.6rem;
  margin: auto; 
}

/* =========================
   MAIN LAYOUT WRAPPER (CSS GRID)
   ========================= */
.main-layout-wrapper {
  max-width: 1000px; 
  width: 85vw; 
  min-width: 280px;
  
  display: grid;
  gap: 10px; 
  
  grid-template-columns: 3fr 1fr; 
  grid-template-rows: auto auto auto; 
  grid-template-areas: 
    "about ." 
    "about ."
    "player-row right-stack"; 
}

/* =========================
   BOX PLACEMENT (Grid Areas)
   ========================= */
.about-box {
  grid-area: about;
  grid-row: 1 / 3; 
  padding: 1.5rem; 
  background-color: #faf7d9;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  text-align: center;
  min-height: 45vh; 
  overflow-wrap: break-word; 
  white-space: normal;       
}

.right-column-stack {
  grid-area: right-stack;
  display: flex;
  flex-direction: column;
  gap: 10px; 
  justify-content: flex-end; 
}

/* Links Box and What I've Been Up To Box */
.links-box, .up-to-box {
  height: auto; 
  min-height: 90px;
  padding: 0.75rem;
  background-color: #faf7d9;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  text-align: center;
  font-size: 0.9rem;
}

/* What I've Been Up To Box centered */
.up-to-box {
  display: flex;
  justify-content: center;  
  align-items: center;      
  flex-direction: column;   
  text-align: center;       
}

/* =========================
   Music Player Section
   ========================= */
.player-container {
  grid-area: player-row; 
  margin: 0; 
  width: auto; 
  padding: 0 1rem; 
  display: flex;
  gap: 10px; 
  align-items: flex-end; 
}

.host-guest-stack {
  height: 100%; 
  flex-grow: 1; 
  width: auto; 
  display: flex;
  flex-direction: column; 
  gap: 10px;
  justify-content: space-between; 
}

.host-box, .guest-box {
  position: static; 
  flex-grow: 1; 
  width: 100%; 
  padding: 0.4rem;
  font-size: 0.9rem;
  background-color: #faf7d9;
  border-radius: 4px;
  box-shadow: 0 3px 8px rgba(0,0,0,0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}
.host-box p, .guest-box p {
  font-size: inherit;
  margin: 0;
}

.small-text { font-size: 0.75rem; }
.large-text { font-size: 1.5rem; }

/* =========================
   Music Player Styles
   ========================= */
.player {
  flex-grow: 2;
  width: auto; 
  background: #c0c0c0;
  padding: 3px;
  box-shadow: inset -1px -1px #0a0a0a, inset 1px 1px #dfdfdf, inset -2px -2px #808080, inset 2px 2px #ffffff;
  border-radius: 4px;
}
.title-bar {
  padding: 2px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(90deg, purple, orchid, pink);
  border-radius: 3px;
}
.title-bar-text {
  font-weight: bold;
  color: white;
  font-size: 0.85rem;
}
.title-bar-controls button {
  width: 12px;
  height: 8px;
  border: none;
  background: silver;
  margin-left: 2px;
}
.window-body {
  display: flex;
  gap: 8px;
  padding: 4px 0;
  align-items: center;
  overflow: hidden; 
}
#imagestyle img {
  width: 80px !important;
  height: 80px !important;
  object-fit: cover;
  box-shadow: inset -1px -1px #fff, inset 1px 1px grey, inset -2px -2px #dfdfdf, inset 2px 2px #0a0a0a;
  border-radius: 4px;
}
#musicplayer {
  flex: 1;
}
.songtitlewindow {
  background: #fff;
  padding: 2px;
  margin-bottom: 4px;
  overflow: hidden;
}
.songtitle {
  font-family: "Bitcount Grid Single", monospace;
  font-size: 0.8rem;
}
.seeking {
  display: flex;
  justify-content: space-between;
  font-size: 0.7rem;
}
.controls {
  width: 100%;
  border-collapse: collapse;
}
.controls tr {
  display: flex; 
  justify-content: space-around;
  padding: 3px 0;
}
.controls td {
  border: none;
  padding: 0;
}
.controls button {
  width: 50px;
  height: 30px;
  border: 3px outset #fff;
  background: #c0c0c0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  line-height: 1;
}
.controls img, .controlimg {
  width: 12px !important; 
  height: 12px !important;
  display: block !important; 
  opacity: 1 !important; 
  visibility: visible !important;
}

/* =========================
   Responsive Overrides
   ========================= */
@media (max-width: 850px) {
  .main-layout-wrapper {
    grid-template-columns: 1fr; 
    grid-template-areas: 
      "about" 
      "links-stack" 
      "player-row"; 
    justify-content: center;
  }
  
  .about-box, .player-container, .right-column-stack {
    grid-column: 1 / -1;
    grid-row: auto;
    width: 95%; 
    margin: 8px auto;
  }
  
  .right-column-stack {
    grid-area: links-stack; 
    flex-direction: column;
  }
  
  .player-container {
    margin: 0;
    padding: 0; 
    flex-direction: column;
    gap: 8px;
    width: 95%;
  }
  
  .player, .host-guest-stack {
    width: 100%; 
    flex-grow: 0; 
  }

  .host-box, .guest-box, .links-box, .up-to-box {
    width: 100%;
    max-width: 350px;
  }
}