/* CineAHO Hidden Object Search CSS Stylesheet */

/* Grid and container styling */
.hidden-container {
  max-width: 1400px;
  margin: 100px auto 40px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Hero Section */
.game-hero-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.5rem;
  gap: 2rem;
}

.hero-game-title {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.text-cyan {
  color: #06b6d4;
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}

.hero-desc {
  color: var(--text-muted);
  max-width: 800px;
  font-size: 0.95rem;
}

/* Progress Widget */
.progress-widget {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  padding: 1.25rem;
  border-radius: 18px;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-width: 320px;
}

.widget-label {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.progress-bar-container {
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  height: 8px;
  width: 100%;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #06b6d4, #3b82f6);
  box-shadow: 0 0 8px rgba(6, 182, 212, 0.5);
  border-radius: 8px;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.progress-text {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Layout */
.game-dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 24px;
}

@media (max-width: 1250px) {
  .game-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

/* Canvas Column styling */
.canvas-column {
  display: flex;
  flex-direction: column;
}

.canvas-wrapper {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  background: var(--panel-bg);
  min-height: 650px;
}

/* LCD Header Bar */
.game-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  padding: 0.75rem 1.5rem;
  gap: 1rem;
}

.lcd-display {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #040810;
  border: 1px solid #1e293b;
  border-radius: 8px;
  padding: 0.4rem 1rem;
  font-family: monospace;
  box-shadow: inset 0 2px 8px rgba(0,0,0,0.8);
  min-width: 100px;
}

.theme-indicator-lcd {
  flex-grow: 1;
}

.lcd-label {
  font-size: 0.65rem;
  font-weight: bold;
  color: #475569;
  letter-spacing: 1px;
}

.lcd-num {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.text-purple {
  color: #c084fc;
  text-shadow: 0 0 10px rgba(192, 132, 252, 0.5);
}

.text-cyan {
  color: #22d3ee;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.5);
}

.text-green {
  color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.5);
}

.text-red {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.5);
}

.text-yellow {
  color: #fbbf24;
}

/* Hearts Display */
.health-hearts-display {
  display: flex;
  gap: 8px;
  font-size: 1.6rem;
}

.heart-icon {
  color: #334155;
  transition: transform 0.2s ease, color 0.3s;
}

.heart-icon.active {
  color: #ef4444;
  text-shadow: 0 0 12px rgba(239, 68, 68, 0.6);
  animation: pulse-heart 1.2s infinite alternate;
}

@keyframes pulse-heart {
  0% { transform: scale(1); }
  100% { transform: scale(1.1); }
}

/* Canvas Arena */
.canvas-arena-outer {
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.03);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: inset 0 4px 20px rgba(0,0,0,0.5);
}

.canvas-holder {
  position: relative;
  width: 500px;
  height: 500px;
  border: 2px solid #1e293b;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.4);
  background: #020617;
  cursor: pointer;
}

canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Overlays container */
.visual-overlays {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 10;
}

/* Markers */
.diff-circle-marker {
  position: absolute;
  border: 3px solid #10b981;
  border-radius: 50%;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.8);
  transform: translate(-50%, -50%);
  animation: pop-in-marker 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes pop-in-marker {
  0% { transform: translate(-50%, -50%) scale(0.2); opacity: 0; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.error-cross-marker {
  position: absolute;
  color: #ef4444;
  font-size: 2rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 10px rgba(239, 68, 68, 0.8);
  animation: flash-fade-cross 0.8s forwards ease-out;
}

@keyframes flash-fade-cross {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1.2); }
  40% { transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) translateY(-15px); }
}

.hint-pulse-ring {
  position: absolute;
  border: 4px solid #eab308;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: pulse-ring-anim 1.5s infinite ease-out;
}

@keyframes pulse-ring-anim {
  0% { width: 0; height: 0; opacity: 1; }
  100% { width: 120px; height: 120px; opacity: 0; }
}

/* Footer Control Row */
.board-footer-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--panel-border);
  padding-top: 1rem;
}

.sound-toggle-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-muted);
  cursor: pointer;
}

.sound-toggle-label input {
  cursor: pointer;
  accent-color: #10b981;
}

.btn-hint {
  background: rgba(234, 179, 8, 0.1);
  border-color: rgba(234, 179, 8, 0.2);
  color: #eab308;
}

.btn-hint:hover {
  background: rgba(234, 179, 8, 0.2);
}

.btn-hint[disabled] {
  background: #334155 !important;
  border-color: transparent !important;
  color: #64748b !important;
  cursor: not-allowed !important;
}

/* Right Control Column Panels */
.control-column {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.control-panel, .target-shelf-panel {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  background: var(--panel-bg);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-badge {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 6px;
  text-transform: uppercase;
}

.status-badge.bg-purple {
  background: rgba(168, 85, 247, 0.15);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.2);
}

.status-badge.bg-cyan {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.panel-desc {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Target Shelf Cards */
.targets-shelf-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.target-item-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.target-item-card.found {
  border-color: rgba(16, 185, 129, 0.3);
  background: rgba(16, 185, 129, 0.05);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.1);
}

.target-item-card.found .target-item-canvas {
  filter: opacity(0.3);
}

.target-item-card.found::after {
  content: '\f00c';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  color: #10b981;
  font-size: 1.25rem;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
}

.target-item-canvas {
  width: 50px;
  height: 50px;
  display: block;
  transition: filter 0.3s;
}

.target-item-name {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.target-item-card.found .target-item-name {
  color: #10b981;
}

/* Stages grid scrollable */
.stages-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding-right: 6px;
}

.stages-grid::-webkit-scrollbar {
  width: 4px;
}

.stages-grid::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: 2px;
}

.btn-stage-select {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--panel-border);
  color: var(--text-main);
  border-radius: 10px;
  padding: 0.75rem 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: var(--transition-smooth);
}

.btn-stage-select:hover:not([disabled]) {
  background: rgba(6, 182, 212, 0.1);
  border-color: #06b6d4;
  color: #22d3ee;
}

.btn-stage-select.active {
  background: var(--panel-bg);
  border-color: #06b6d4;
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.25);
  color: #22d3ee;
}

.btn-stage-select[disabled] {
  background: rgba(0,0,0,0.25);
  color: #475569;
  border-color: rgba(255,255,255,0.02);
  cursor: not-allowed;
}

.btn-stage-select.completed {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.2);
  color: #34d399;
}

.btn-stage-select .stage-tag {
  font-size: 0.6rem;
  font-weight: normal;
  text-transform: uppercase;
  color: var(--text-muted);
}

.btn-stage-select[disabled] .stage-tag {
  color: #475569;
}

.btn-stage-select.completed .stage-tag {
  color: #34d399;
}

/* Terminal Console */
.terminal-logs-panel {
  background: rgba(10, 15, 30, 0.7);
  border: 1px solid var(--panel-border);
  border-radius: 20px;
  padding: 1.25rem;
  font-family: monospace;
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.terminal-dots .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.dot-r { background: #ef4444; }
.dot-y { background: #eab308; }
.dot-g { background: #22c55e; }

.terminal-title {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.terminal-body {
  height: 120px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-right: 4px;
}

.log-line {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-main);
  word-break: break-all;
}

.log-line.log-dim { color: #475569; }
.log-line.log-info { color: #3b82f6; }
.log-line.log-success { color: #10b981; }
.log-line.log-error { color: #ef4444; }
.log-line.log-hint { color: #eab308; }

.terminal-body::-webkit-scrollbar {
  width: 4px;
}

.terminal-body::-webkit-scrollbar-track {
  background: rgba(0,0,0,0.1);
}

.terminal-body::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

/* Victory Overlay Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 9, 19, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  width: 500px;
  max-width: 90%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2.5rem;
  border-radius: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  position: relative;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8), 0 0 40px rgba(6, 182, 212, 0.15);
  transform: translateY(30px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.active .modal-content {
  transform: translateY(0);
}

.modal-ribbon {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  box-shadow: 0 8px 24px rgba(6, 182, 212, 0.4);
  animation: bounce-badge 1.5s infinite;
}

.modal-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-body {
  width: 100%;
}

.results-stats-card {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  padding: 1rem;
  gap: 1.25rem;
  text-align: left;
}

.results-icon-area {
  font-size: 2.5rem;
  width: 64px;
  height: 64px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.results-text-area {
  flex-grow: 1;
}

.results-desc-main {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
}

.results-desc-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.modal-footer {
  width: 100%;
}

.modal-footer button {
  width: 100%;
  background: linear-gradient(135deg, #06b6d4, #3b82f6);
  border: none;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(6, 182, 212, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.modal-footer button:hover {
  box-shadow: 0 4px 20px rgba(6, 182, 212, 0.45);
}

@keyframes bounce-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  animation: confetti-fall 2.5s infinite linear;
}

@keyframes confetti-fall {
  0% {
    top: -20px;
    transform: translateX(0) rotate(0deg);
  }
  100% {
    top: 100%;
    transform: translateX(100px) rotate(360deg);
  }
}
