@media (min-width: 1201px) {
  body {
    max-width: 1000px;
    margin: 0 auto;
  }
}
body {
  text-align: center;
  background: #222;
  color: #fff;
}
.puzzle-container {
  width: 100vw;
  max-width: 900px;
  aspect-ratio: 3 / 2;
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}
#puzzle-board {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template: repeat(4, 1fr) / repeat(4, 1fr);
  gap: 2px;
}
.piece {
  width: 100%;
  height: 100%;
  background-size: 900px 600px;
  cursor: pointer;
  border: 1px solid #444;
  box-sizing: border-box;
}
#next-btn {
  padding: 10px 30px; 
  font-size: 1.2em; 
  background: #ff9800; 
  color: #fff; 
  border: none; 
  border-radius: 8px; 
  cursor: pointer; 
  display: block; 
}
#copyright {
  clear: both;
  margin-top: 60px;
  color: #aaa;
  text-align: center;
}
.puzzle-header {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  gap: 12px;
  z-index: 10;
}
.header-btn {
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  padding: 0;
  transition: box-shadow 0.2s;
}
.header-btn img {
  width: 32px;
  height: 32px;
}
.header-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
#welcome-screen {
  position: fixed;
  z-index: 1000;
  inset: 0;
  width: 100vw;
  height: 100vh;
  background: #222;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#welcome-bg {
  max-width: 90vw;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 16px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.3);
}
#start-btn {
  margin-top: 32px;
  padding: 16px 48px;
  font-size: 1.5em;
  background: #ff9800;
  color: #fff;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
#timer {
  float: right;
  font-family: monospace;
  font-size: 2.2em;
  color: #ff9800;
  margin: 24px 32px 8px 0;
  text-align: right;
  letter-spacing: 2px;
  font-weight: bold;
}
.puzzle-footer {
  float: left;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 18px;
  margin: 24px 0 8px 32px;
}
.footer-btn {
  background: #fff;
  border: none;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  cursor: pointer;
  padding: 0;
  transition: box-shadow 0.2s;
}
.footer-btn img {
  width: 32px;
  height: 32px;
}
.footer-btn:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
}
.hint-image {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999 !important;
  max-width: 95vw !important;
  max-height: 90vh !important;
  border-radius: 18px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
  background: #fff;
  display: block;
}
.selected-piece {
  outline: 3px solid #ff9800;
  z-index: 2;
} 