/* Styles per user spec */
: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);
}

/* 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;
  }
}

.container{
  max-width:1200px;
  margin:22px auto;
  padding:0 16px 60px;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:20px;
  align-items:start;
}

.left-side{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.right-side{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.puzzle-header-row{
  margin-bottom:16px;
}

.puzzle-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:0;
}

.reviews-header-row{
  height:35px;
  margin-bottom:16px;
}

.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:18px;
  box-shadow:0 6px 20px rgba(0,0,0,0.5);
}

.puzzle-meta{color:var(--muted);font-size:13px;margin-bottom:10px}

.guess-box{
  background:rgba(255,255,255,0.02);
  padding:14px;
  border-radius:8px;
  margin-bottom:14px;
  position:relative;
}

.score-row-inline{
  margin-bottom:10px;
  line-height:1;
}

.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;
}

.data-collected{
  position:absolute;
  bottom:8px;
  left:14px;
  font-size:11px;
  color:#5a6672;
}

.guess-input{width:100%;padding:10px;border-radius:6px;border:1px solid rgba(255,255,255,0.06);margin-top:10px;background:rgba(255,255,255,0.02);color:inherit;font-size:15px}
.btn{margin-top:10px;padding:8px 12px;border-radius:6px;border:none;background:var(--accent);color:#07202a;cursor:pointer;font-weight:600;transition:0.2s}
.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)}
.btn.alt:hover{background:rgba(255,255,255,0.04)}

.guess-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap}

.feedback{min-height:26px;margin:8px 0 0 0;color:#ffd9a8;font-weight:500}
.feedback.success{color:var(--success)}
.feedback.error{color:var(--error)}

.reviews-section{
  padding:18px;
  margin-top:0;
}

.reviews-title{
  color:var(--accent);
  font-size:14px;
  font-weight:600;
  letter-spacing:0;
  margin:0 0 16px 0;
}

.reviews-grid{display:grid;grid-template-columns:1fr;gap:10px;margin-top:0}

/* individual review card */
.review-card{
  position:relative;
  padding:12px;
  border-radius:8px;
  background:rgba(255,255,255,0.02);
  overflow:hidden;
  min-height:56px;
  cursor:pointer;
  transition:0.2s;
}

.review-card:hover:not(.revealed){
  background:rgba(255,255,255,0.04);
}

.review-card.locked{
  cursor:not-allowed;
  opacity:0.7;
}

/* blurred layer */
.review-text{
  filter:blur(6px);
  opacity:0.12;
  transition:filter .35s ease, opacity .35s ease;
  white-space:pre-wrap;
  line-height:1.4;
  font-size:15px;
  color:#e6eef6;
  user-select:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
}

/* when revealed */
.review-card.revealed .review-text{
  filter:none;
  opacity:1;
  user-select:text;
  -webkit-user-select:text;
  -moz-user-select:text;
  -ms-user-select:text;
}

/* cost badge */
.cost-badge{
  position:absolute;
  right:10px;
  top:10px;
  background:rgba(0,0,0,0.6);
  color:var(--accent);
  padding:4px 8px;
  border-radius:6px;
  font-weight:700;
  font-size:13px;
  border:1px solid rgba(255,255,255,0.03);
  z-index:2;
}

/* small muted meta */
.review-meta{
  font-size:12px;
  color:var(--muted);
  margin-top:8px;
  display:flex;
  gap:10px;
  filter:blur(6px);
  opacity:0.15;
  transition:filter .35s ease, opacity .35s ease;
  user-select:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
}

.review-card.revealed .review-meta{
  filter:none;
  opacity:1;
  user-select:text;
  -webkit-user-select:text;
  -moz-user-select:text;
  -ms-user-select:text;
}

.review-user{font-weight:500}
.review-hours{opacity:0.9}

/* First review shows without blur */
.review-card:first-child .review-text {
    filter: none !important;
    opacity: 1 !important;
}

.review-card:first-child .review-meta {
    filter: none !important;
    opacity: 1 !important;
}

.review-card:first-child .cost-badge {
    display: none;
}

/* Info boxes in a row */
.info-boxes-row{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:12px;
}

.sidebar-info-box{
  padding:18px;
  border-radius:8px;
  background:var(--card-bg);
  position:relative;
  cursor:pointer;
  transition:0.2s;
  border:none;
  box-shadow:0 6px 20px rgba(0,0,0,0.5);
  min-height:90px;
}

.sidebar-info-box:hover:not(.revealed){
  background:rgba(15,26,36,0.8);
}

.sidebar-info-box.revealed{
  cursor:default;
}

.sidebar-info-title{
  color:var(--accent);
  font-size:14px;
  font-weight:600;
  letter-spacing:0;
  margin:0 0 16px 0;
}

.sidebar-info-value{
  font-size:14px;
  color:#e6eef6;
  background:rgba(255,255,255,0.02);
  padding:22px 10px;
  border-radius:6px;
  height:60px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:filter .35s ease, opacity .35s ease, background .35s ease;
}

.sidebar-info-value-text{
  filter:blur(6px);
  opacity:0.18;
  transition:filter .35s ease, opacity .35s ease;
  user-select:none;
  -webkit-user-select:none;
  -moz-user-select:none;
  -ms-user-select:none;
}

.sidebar-info-box.revealed .sidebar-info-value-text{
  filter:none;
  opacity:1;
  user-select:text;
  -webkit-user-select:text;
  -moz-user-select:text;
  -ms-user-select:text;
}

.sidebar-info-box .cost-badge{
  position:absolute;
  right:8px;
  top:8px;
}

/* info sidebar */
.info-card{
  background:var(--card-bg);
  padding:14px;
  border-radius:12px;
  height:max-content;
  box-shadow:0 6px 20px rgba(0,0,0,0.5);
}
.info-card h3{color:var(--accent);margin-top:0}
.info-card p{margin:8px 0;color:var(--muted);font-size:14px}

a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}

/* dots display for 20/20 */
.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)}

/* Autocomplete */
.autocomplete-list{
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:var(--card-bg);
  border:1px solid rgba(255,255,255,0.1);
  border-radius:6px;
  margin-top:4px;
  max-height:200px;
  overflow-y:auto;
  z-index:100;
  display:none;
}

.autocomplete-list.show{display:block}

.autocomplete-item{
  padding:10px;
  cursor:pointer;
  transition:0.15s;
  color:#e6eef6;
}

.autocomplete-item:hover, .autocomplete-item.selected{
  background:rgba(103,192,244,0.15);
}

/* Guess history */
.guess-history{
  margin-top:12px;
  padding-top:12px;
  border-top:1px solid rgba(255,255,255,0.06);
}

.guess-item{
  padding:6px 10px;
  margin:4px 0;
  border-radius:4px;
  background:rgba(255,255,255,0.02);
  color:var(--muted);
  font-size:14px;
}

.guess-item.wrong{
  color:var(--error);
  background:rgba(217,83,79,0.1);
}

/* Game over state */
.game-over .guess-input,
.game-over #submitBtn,
.game-over #giveUpBtn {
  display:none;
}

.win-message{
  background:rgba(92,184,92,0.15);
  border:1px solid rgba(92,184,92,0.3);
  padding:12px;
  border-radius:8px;
  margin-top:10px;
  color:var(--success);
  font-weight:600;
  text-align:center;
}

.win-message img{
  display:center;
  margin:12px auto;
  max-width:100%;
  border-radius:8px;
}

.lose-message{
  background:rgba(217,83,79,0.15);
  border:1px solid rgba(217,83,79,0.3);
  padding:12px;
  border-radius:8px;
  margin-top:10px;
  color:var(--error);
  font-weight:600;
  text-align:center;
}

.lose-message img{
  display:center;
  margin:12px auto;
  max-width:100%;
  border-radius:8px;
}

/* responsive */
@media (max-width:840px){
  .container{
    grid-template-columns:1fr;
    padding-bottom:120px;
  }
  .reviews-section{
    order:2;
  }
  .info-boxes-row{
    grid-template-columns:1fr;
  }
}

/* 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;
}

.result-ad {
  margin: 20px 0;
  min-height: 250px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

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