/* Body and Background */
body {
  font-family: 'Courier New', Courier, monospace;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}

.background-image {
  position: fixed;
  top: -5vh;
  left: 0;
  width: 125vw; /* zoomed in by 110% */
  height: 125vh;
  background: url('bg.jpg') no-repeat center center;
  background-size: cover;
  z-index: 0;
  will-change: transform;
}

.background-blur {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(8px);
  background-color: rgba(10, 10, 25, 0.85);
  z-index: 1;
}

#bg-lines {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 2;
pointer-events: none;
}

/* Overlay & Content Layout */
.overlay {
  position: relative;
  top: 5vh;
  left: 0;
  width: 100vw;
  min-height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem;
  z-index: 3;
}

.content-box {
  display: flex;
  flex-direction: column;
  width: 90%;
  max-width: 1100px;
  padding: 2rem;
  background-color: rgba(20, 20, 35, 0.9);
  color: #e0e0e0;
  border-radius: 1rem;
  box-shadow: 0 0 20px #00b8ff;
}

/* Top Row: Clock - Header - Suggestion */
.top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 2rem;
  flex-wrap: wrap;
}

.clock-widget, .suggest-widget {
  flex: 1 1 250px;
  max-width: 250px;
  padding: 1rem;
  text-align: center;
  /*
   * border-radius: 1rem;
   * box-shadow: 0 0 10px #00b8ff;
   */
}

.header {
  flex: 2 1 300px;
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 3px solid #00b8ff;
}

.profile-image {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  border: 3px solid #ff5e9c;
  margin-top: 1rem;
}

/* Analog Clock */
.analog-clock {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 1rem auto;
  border: 3px solid #00b8ff;
  border-radius: 50%;
  background-color: rgba(20, 20, 35, 0.8);
  box-shadow: 0 0 15px #00b8ff;
}

.hand {
  position: absolute;
  bottom: 50%;
  left: 50%;
  transform-origin: bottom center;
  transform: rotate(0deg);
  transition: transform 0.5s ease-in-out;
}

.hour-hand { width: 4px; height: 35px; background: #ff5e9c; }
.minute-hand { width: 3px; height: 50px; background: #ff5e9c; }
.second-hand { width: 2px; height: 60px; background: #00b8ff; }

.center-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  background-color: #00b8ff;
  border-radius: 50%;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

/* Song Suggest Form */
.suggest-widget input {
  width: 100%;
  padding: 8px;
  margin-top: 8px;
  margin-bottom: 10px;
  border-radius: 6px;
  border: none;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.suggest-widget button {
  width: 100%;
  padding: 8px;
  background-color: #00b8ff;
  border: none;
  color: #0a0a0a;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
}

.suggest-widget p {
  margin-top: 0.8rem;
  font-size: 0.9rem;
  color: #ff5e9c;
  word-break: break-word;
}

/* Main Sections */
.main-content {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  gap: 2rem;
  flex-wrap: wrap;
}

.music-section,
.minesweeper-section {
  flex: 1 1 45%;
  max-width: 400px;
  min-width: 280px;
  border-top: 2px dashed #00b8ff;
  padding-top: 1rem;
  text-align: center;
}

/* Last.fm Recent Tracks */
.track-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
  text-align: left;
}

.track-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #e0e0e0;
}

.track-list img {
  width: 48px;
  height: 48px;
  border-radius: 6px;
  object-fit: cover;
  box-shadow: 0 0 5px #00b8ff;
}

.track-list a {
  color: #00b8ff;
  text-decoration: none;
}

.track-list a:hover {
  text-decoration: underline;
}

/* Minesweeper */
.minesweeper-grid {
  display: grid;
  grid-template-columns: repeat(8, 35px);
  grid-template-rows: repeat(8, 35px);
  gap: 4px;
  justify-content: center;
  margin: 0 auto;
}

.cell {
  width: 35px;
  height: 35px;
  background-color: #222a44;
  border: 1px solid #00b8ff;
  color: #00b8ff;
  font-weight: bold;
  font-size: 18px;
  line-height: 35px;
  cursor: pointer;
  user-select: none;
  border-radius: 4px;
}

.cell.revealed {
  background-color: #0a0f1a;
  border-color: #ff5e9c;
  cursor: default;
  color: #ff5e9c;
}

.cell.mine {
  background-color: #ff5e9c;
  color: white;
}

.cell.flagged {
  color: #ff5e9c;
}

.controls {
  margin-top: 10px;
}

button {
  background-color: #00b8ff;
  border: none;
  padding: 10px 20px;
  color: #0a0a0a;
  font-weight: bold;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 0 10px #00b8ff;
  transition: background-color 0.3s ease;
}

button:hover {
  background-color: #008ecc;
}

/* Socials */
.socials-section {
  margin-top: 2rem;
  text-align: center;
}

.socials-section a {
  display: inline-block;
  margin: 0 0.5rem;
  color: #00b8ff;
  text-decoration: none;
}

.socials-section a:hover {
  text-decoration: underline;
}

/* Loading Screen */
#loading-screen {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #0a0a20;
color: #00b8ff;
font-family: 'Courier New', monospace;
font-size: 2rem;
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
transition: opacity 0.5s ease;
}

.loader-text {
  animation: flicker 1.5s infinite alternate;
}

@keyframes flicker {
  0% { opacity: 1; }
  100% { opacity: 0.6; }
}

.dots::after {
  content: '';
  animation: dots 1.2s infinite steps(4, end);
}

@keyframes dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

@media (max-width: 768px) {

  .overlay {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: block;
    padding: 1rem;
    overflow-y: auto;
  }

  .content-box {
    padding: 1rem;
    margin: 0 auto;
  }

  .top-row {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }

  .clock-widget,
  .suggest-widget {
    max-width: 100%;
    width: 100%;
  }

  .header {
    padding-bottom: 1rem;
  }

  .profile-image {
    width: 100px;
    height: 100px;
    margin-top: 0.5rem;
  }

  .analog-clock {
    width: 100px;
    height: 100px;
  }

  .analog-clock .hour-hand {
    height: 25px;
  }

  .analog-clock .minute-hand {
    height: 35px;
  }

  .analog-clock .second-hand {
    height: 45px;
  }

  .main-content {
    flex-direction: column;
    gap: 1.5rem;
  }

  .music-section,
  .minesweeper-section {
    max-width: 100%;
    min-width: 0;
    width: 100%;
  }

  .suggest-widget input,
  .suggest-widget button {
    font-size: 0.85rem;
    padding: 6px;
  }

  .track-list img {
    width: 40px;
    height: 40px;
  }

  .cell {
    width: 30px;
    height: 30px;
    font-size: 16px;
    line-height: 30px;
  }

  button {
    padding: 8px 16px;
  }

  .socials-section a {
    display: inline-block;
    margin: 0.3rem 0.5rem;
  }

  .background-image {
    width: 100vw;
    height: 100vh;
    background-position: center;
  }
}

/* Win message */
.win-message {
  font-size: 1.5rem;
  color: #00ffcc;
  background-color: rgba(10, 10, 25, 0.95);
  padding: 0.5rem 1.5rem;
  border: 2px solid #00b8ff;
  border-radius: 8px;
  box-shadow: 0 0 10px #00b8ff;
  margin-bottom: 1rem;
  text-align: center;
  animation: fadeSlide 0.5s ease, fadeOut 1s 3s forwards;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOut {
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

.cell-win {
  animation: pulse-once 0.6s ease forwards;
}

@keyframes pulse-once {
  0% {
    background-color: #0a0f1a;
    transform: scale(1);
  }
  50% {
    background-color: #00b8ff;
    transform: scale(1.1);
  }
  100% {
    background-color: #0a0f1a;
    transform: scale(1);
  }
}
