/* Styles matching the Reviews game */
:root{
  --bg: #1b2838;
  --header-bg: #171a21;
  --title-color: #67c0f4;
  --subtitle-color: #a4b0ba;
  --card-bg: #0f1a24;
  --accent: #67c0f4;
  --muted: #a4b0ba;
  --success: #5cb85c;
  --error: #d9534f;
}

*{box-sizing:border-box;font-family:Inter, system-ui, Arial, sans-serif}

body{
  margin:0;
  background:var(--bg);
  color:#67c0f4;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.site-header{
  background:var(--header-bg);
  padding:18px 20px;
  border-bottom:1px solid rgba(255,255,255,0.03);
}

.header-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Changed from center */
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-btn {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: 0.2s;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-btn-active {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}

.result-ad {
  margin: 20px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 16px;
  }
  
  .header-nav {
    width: 100%;
    justify-content: center;
  }
  
  .title {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
}

.header-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.nav-btn {
  color: var(--muted);
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
  transition: 0.2s;
  white-space: nowrap;
  padding-bottom: 4px;
  border-bottom: 2px solid transparent;
}

.nav-btn:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-btn-active {
  color: var(--accent);
  font-weight: 700;
  border-bottom: 2px solid var(--accent);
}

.container{
  max-width:800px;
  margin:22px auto;
  padding:0 16px 60px;
}

.puzzle-header-row{
  margin-bottom:16px;
}

.puzzle-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:0;
}

.puzzle-number{
  font-weight:700;
  color:var(--muted);
  font-size:18px;
  letter-spacing:0.5px;
  line-height:1.2;
}

.header-actions{
  display:flex;
  gap:4px;
  align-items:center;
}

.header-link{
  color:var(--accent);
  text-decoration:none;
  font-size:14px;
  font-weight:600;
  background:transparent;
  border:none;
  cursor:pointer;
  padding:6px 12px;
  border-radius:6px;
  transition:0.2s;
}

.header-link:hover{
  background:rgba(255,255,255,0.06);
}

.puzzle-card{
  background:var(--card-bg);
  border-radius:12px;
  padding:24px;
  box-shadow:0 6px 20px rgba(0,0,0,0.5);
}

.guess-box{
  background:rgba(255,255,255,0.02);
  padding:20px;
  border-radius:8px;
}

.score-row-inline{
  margin-bottom:20px;
  line-height:1;
  text-align:center;
}

.score-label{
  font-size:13px;
  color:var(--muted);
  font-weight:600;
  margin-right:8px;
}

.score-dots{
  margin:0 8px 0 0;
}

.score-text{
  font-weight:700;
  color:var(--accent);
  font-size:14px;
  margin-left:8px;
}

.dot{
  width:8px;
  height:8px;
  border-radius:50%;
  background:rgba(255,255,255,0.08);
  display:inline-block;
  margin:0 2px;
}

.dot.filled{
  background:var(--accent);
}

.posters-grid{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:16px;
  margin-bottom:20px;
}

.poster-item{
  position:relative;
  aspect-ratio:2/3;
  border-radius:8px;
  overflow:hidden;
  transition:0.2s;
  background:rgba(255,255,255,0.02);
  border:1px solid rgba(255,255,255,0.06);
}

/* Removed hover effect on posters */

.poster-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  opacity:0;
  transition:opacity 0.35s ease;
  user-select:none;
  -webkit-user-select:none;
  pointer-events:none;  /* ADD THIS LINE */
}

.poster-item.revealed img{
  opacity:1;
  user-select:auto;
  -webkit-user-select:auto;
  pointer-events:auto;  /* ADD THIS LINE */
}

.poster-title{
  position:absolute;
  bottom:0;
  left:0;
  right:0;
  padding:8px;
  background:linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  font-size:12px;
  font-weight:600;
  text-align:center;
  color:#fff;
  opacity:0;
  transition:opacity 0.35s ease;
  user-select:none;
  -webkit-user-select:none;
}

.poster-item.revealed .poster-title{
  opacity:1;
  user-select:auto;
  -webkit-user-select:auto;
}

/* First poster always revealed */
.poster-item:first-child img{
  opacity:1 !important;
}

.poster-item:first-child .poster-title{
  opacity:1 !important;
}

/* Placeholder for hidden posters */
.poster-item:not(.revealed)::before{
  content:'?';
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);
  font-size:64px;
  font-weight:700;
  color:rgba(103,192,244,0.3);
  z-index:1;
}

/* Cost badge removed - no longer needed */

.guess-input{
  width:100%;
  padding:12px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,0.06);
  background:rgba(255,255,255,0.02);
  color:inherit;
  font-size:15px;
  text-align:center;
  margin-bottom:12px;
}

.guess-input::placeholder{
  text-align:center;
}

.btn{
  padding:10px 20px;
  border-radius:6px;
  border:none;
  background:var(--accent);
  color:#07202a;
  cursor:pointer;
  font-weight:600;
  transition:0.2s;
  font-size:15px;
  width:100%;
}

.btn:hover{
  opacity:0.9;
}

.btn:disabled{
  opacity:0.5;
  cursor:not-allowed;
}

.btn.alt{
  background:transparent;
  border:1px solid rgba(255,255,255,0.06);
  color:var(--muted);
  margin-top:8px;
}

.btn.alt:hover{
  background:rgba(255,255,255,0.04);
}

.btn.reveal-btn{
  margin-top:12px;
  margin-bottom:20px;
}

.btn.reveal-btn:disabled{
  opacity:0.3;
  cursor:not-allowed;
}

.guess-controls{
  display:flex;
  gap:8px;
  margin-top:12px;
}

.guess-controls .btn{
  flex:1;
  margin:0;
}

.btn.alt:hover{
  background:rgba(255,255,255,0.04);
}

.feedback{
  min-height:24px;
  margin:12px 0 0 0;
  color:#ffd9a8;
  font-weight:500;
  text-align:center;
  font-size:14px;
}

.feedback.success{
  color:var(--success);
}

.feedback.error{
  color:var(--error);
}

.feedback.close{
  color:#ffa500;
}

.guess-history{
  margin-top:16px;
  padding-top:16px;
  border-top:1px solid rgba(255,255,255,0.06);
}

.guess-item{
  padding:8px 12px;
  margin:6px 0;
  border-radius:4px;
  background:rgba(255,255,255,0.02);
  color:var(--muted);
  font-size:14px;
  text-align:center;
}

.guess-item.wrong{
  color:var(--error);
  background:rgba(217,83,79,0.1);
}

.guess-item.close{
  color:#ffa500;
  background:rgba(255,165,0,0.1);
}

.win-message, .lose-message{
  background:rgba(92,184,92,0.15);
  border:1px solid rgba(92,184,92,0.3);
  padding:16px;
  border-radius:8px;
  margin-top:16px;
  color:var(--success);
  font-weight:600;
  text-align:center;
  font-size:15px;
}

.lose-message{
  background:rgba(217,83,79,0.15);
  border:1px solid rgba(217,83,79,0.3);
  color:var(--error);
}

.game-over .guess-input,
.game-over #submitBtn,
.game-over #giveUpBtn{
  display:none;
}

/* Modal */
.modal{
  display:none;
  position:fixed;
  z-index:1000;
  left:0;
  top:0;
  width:100%;
  height:100%;
  background-color:rgba(0,0,0,0.7);
  animation:fadeIn 0.2s;
}

.modal.show{
  display:flex;
  align-items:center;
  justify-content:center;
}

.modal-content{
  background:var(--card-bg);
  padding:30px;
  border-radius:12px;
  max-width:500px;
  width:90%;
  position:relative;
  box-shadow:0 10px 40px rgba(0,0,0,0.8);
  animation:slideIn 0.3s;
}

.modal-close{
  position:absolute;
  right:15px;
  top:10px;
  font-size:32px;
  font-weight:bold;
  color:var(--muted);
  cursor:pointer;
  transition:0.2s;
}

.modal-close:hover{
  color:var(--accent);
}

.modal-content h2{
  margin-top:0;
  color:var(--accent);
}

.modal-content p{
  color:var(--muted);
  margin:10px 0;
  font-size:15px;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

@keyframes slideIn{
  from{transform:translateY(-50px);opacity:0}
  to{transform:translateY(0);opacity:1}
}

@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 16px;
  }
  
  .header-nav {
    width: 100%;
    justify-content: center;
  }
  
  .title {
    font-size: 24px;
  }
  
  .subtitle {
    font-size: 14px;
  }
  
  .posters-grid{
    grid-template-columns:repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .posters-grid{
    grid-template-columns:1fr;
  }
}