/* variables globales tomadas del sitio principal */
:root {
  --bg-primary: #0d0d12;
  --bg-secondary: #13131a;
  --bg-card: #18181f;
  --bg-input: #23232f;
  --text-primary: #f0f0f8;
  --text-secondary: #8888a8;
  --text-muted: #555568;
  --accent-blue: #5b9cf6;
  --accent-red: #e84040;
  --border: rgba(255,255,255,0.07);
  --border-focus: rgba(91,156,246,0.4);
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
}

[data-theme="light"] {
  --bg-primary: #f0f2f8;
  --bg-secondary: #e6e8f0;
  --bg-card: #ffffff;
  --bg-input: #eef1f6;
  --text-primary: #0d0d20;
  --text-secondary: #44446a;
  --text-muted: #888899;
  --border: rgba(0,0,0,0.08);
  --border-focus: rgba(91,156,246,0.6);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
}

.pixel-page-wrapper {
  position: relative;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 100vh;
}

.pixel-container {
  display: flex;
  flex-direction: column;
  max-width: 600px;
  margin: 0 auto;
  min-height: 100vh;
  width: 100%;
  padding-bottom: 40px;
}

.ad-game-side {
  position: absolute;
  top: 120px;
  right: 40px;
  width: 300px;
  height: 600px;
  display: flex !important;
  z-index: 10;
}

@media (max-width: 1300px) {
  .ad-game-side {
    right: 10px;
  }
}

@media (max-width: 1250px) {
  .pixel-page-wrapper {
    display: flex;
    flex-direction: column;
  }
  .ad-game-side {
    position: static;
    display: flex !important;
    width: 100%;
    max-width: 320px;
    height: 90px;
    margin: 20px auto 40px;
    order: 2;
  }
  .pixel-container {
    min-height: auto;
    order: 1;
  }
}

/* TOP BAR */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
}
.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s ease;
}
.back-btn:hover {
  color: var(--text-primary);
  border-color: var(--accent-blue);
  transform: translateX(-2px);
}
.theme-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--accent-blue); }

/* MAIN CONTAINER */
.pixel-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

/* SCREENS */
.screen {
  width: 100%;
  max-width: 600px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  text-align: center;
  display: none;
  animation: fadeIn 0.4s ease forwards;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.screen.active {
  display: block;
}

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

/* SCREEN 1: MENU */
.pixel-title {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 5px;
  background: linear-gradient(120deg, #4fc3f7 0%, var(--accent-red) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pixel-subtitle {
  color: var(--text-secondary);
  margin-bottom: 30px;
  font-size: 0.95rem;
}
.menu-hero {
  display: flex;
  justify-content: center;
  margin-bottom: 30px;
}
.pixel-hero-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--border);
}
.pixel-hero-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* SCREEN 2: GAME */
.game-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.lives-container {
  display: flex;
  gap: 5px;
  font-size: 1.5rem;
}
.heart {
  transition: transform 0.3s, opacity 0.3s;
}
.heart.lost {
  opacity: 0.2;
  filter: grayscale(1);
}
.hint-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-blue);
  background: rgba(91,156,246,0.1);
  padding: 4px 10px;
  border-radius: 999px;
}

.image-box {
  width: 100%;
  max-width: 300px;
  aspect-ratio: 1/1;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  border: 2px solid var(--border);
  background: #000;
}
#player-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter 1s ease;
  /* El JS controlará el blur: filter: blur(25px); */
}

.hint-box {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 15px;
  margin-bottom: 24px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#current-hint {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-primary);
}

.input-area {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.autocomplete-wrapper {
  position: relative;
  width: 100%;
}
#player-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-input);
  color: var(--text-primary);
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.2s;
}
#player-input:focus {
  border-color: var(--border-focus);
}
.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: -5px;
  padding-top: 5px;
  max-height: 200px;
  overflow-y: auto;
  z-index: 10;
  list-style: none;
  text-align: left;
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
.suggestions-list.hidden { display: none; }
.suggestions-list li {
  padding: 10px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.suggestions-list li:last-child { border-bottom: none; }
.suggestions-list li:hover {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.action-btn {
  background: var(--brand-gradient, var(--accent-blue));
  color: #fff;
  padding: 16px 24px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 15px rgba(91,156,246,0.2);  font-weight: 600;
  font-size: 1rem;
  width: 100%;
  transition: opacity 0.2s, transform 0.2s;
}
.action-btn:hover {
  opacity: 0.9;
  transform: translateY(-2px);
}
.action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* SCREEN 3: RESULT */
.result-title {
  font-size: 2.2rem;
  margin-bottom: 20px;
}
.result-player-img {
  width: 200px;
  height: 200px;
  margin: 0 auto 15px;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid var(--accent-blue);
  box-shadow: 0 0 20px rgba(91,156,246,0.3);
}
.result-player-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.result-player-name {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--accent-blue);
  margin-bottom: 10px;
}
.result-message {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
}

/* -- BOTONES DE COMPARTIR -- */
.share-actions {
  display: flex;
  gap: 10px;
  margin-top: 15px;
  width: 100%;
  max-width: 320px;
  justify-content: center;
}
.share-btn {
  flex: 1;
  min-height: 44px;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background-color: var(--bg-card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.share-btn:hover {
  background-color: var(--bg-hover);
}
.share-btn i {
  font-size: 1.1rem;
}


.share-actions {
  margin-bottom: 25px !important;
}

