/* guess-my-number.css - Synced with warm color system */

:root {
  --gm-accent: var(--color-accent-primary);
  --gm-accent-hover: var(--color-accent-hover);
  --gm-text: var(--color-text-primary);
  --gm-text-muted: var(--color-text-muted);
  --gm-surface: var(--color-surface-primary);
  --gm-border: var(--color-border-primary);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--bg-color);
  color: var(--gm-text);
  margin: 0;
  padding: 0;
}

:focus-visible {
  outline: 2px solid var(--gm-accent);
  outline-offset: 2px;
}

/* ========== Game Container ========== */
.game-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  min-height: 100vh;
  align-content: center;
}

/* ========== Game Header Section ========== */
.game-header {
  grid-column: 1 / -1;
  text-align: center;
  margin-bottom: 1rem;
}

.game-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 0;
  background: linear-gradient(135deg, var(--gm-text), var(--gm-accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.game-subtitle {
  font-size: 1.1rem;
  color: var(--gm-text-muted);
  margin: 0.5rem 0 0 0;
}

/* Again Button */
.btn-again {
  background: linear-gradient(135deg, var(--gm-accent), var(--color-accent-secondary));
  color: #fff;
  border: none;
  padding: 1rem 2rem;
  font-size: 1rem;
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  box-shadow: 0 8px 16px rgba(201, 184, 163, 0.2);
}

.btn-again:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 24px rgba(201, 184, 163, 0.3);
}

.btn-again svg {
  width: 1.2rem;
  height: 1.2rem;
  transition: transform 0.3s ease;
}

.btn-again:hover svg {
  transform: rotate(180deg);
}

/* Number Display (The Big Pill) */
.number-display {
  grid-column: 1 / -1;
  background: var(--gm-surface);
  border: 2px solid var(--gm-border);
  border-radius: 2rem;
  padding: 3rem 2rem;
  text-align: center;
  font-size: 6rem;
  font-weight: 900;
  color: var(--gm-accent);
  margin: 2rem 0;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .number-display:hover {
    transform: scale(1.02);
    box-shadow: 0 25px 50px rgba(201, 184, 163, 0.15);
  }
}

/* Win State */
.number-display.win {
  background: rgba(107, 159, 127, 0.08);
  border-color: rgba(107, 159, 127, 0.3);
  color: var(--color-success);
  box-shadow: 0 0 30px rgba(107, 159, 127, 0.2);
}

/* Lose State */
.number-display.lose {
  background: rgba(181, 114, 111, 0.08);
  border-color: rgba(181, 114, 111, 0.3);
  color: var(--color-error);
  box-shadow: 0 0 30px rgba(181, 114, 111, 0.2);
}

/* ========== Game Content (Two Panels) ========== */
.game-content {
  display: contents;
}

/* Panel Base Styles */
.panel {
  background: var(--gm-surface);
  border: 1px solid var(--gm-border);
  border-radius: 1.5rem;
  padding: 2.5rem 2rem;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: all 0.3s ease;
}

@media (hover: hover) and (pointer: fine) {
  .panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 45px rgba(201, 184, 163, 0.1);
  }
}

/* Left Panel - Input & Check */
.panel-left {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.input-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--gm-text);
}

.guess-input {
  padding: 1.2rem;
  background: var(--color-surface-secondary);
  border: 1px solid var(--gm-border);
  border-radius: 0.8rem;
  color: var(--gm-text);
  font-size: 1.1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
}

.guess-input::placeholder {
  color: var(--gm-text-muted);
}

.guess-input::-webkit-outer-spin-button,
.guess-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.guess-input:focus {
  border-color: var(--gm-accent);
  background: rgba(201, 184, 163, 0.03);
  box-shadow: 0 0 0 4px rgba(201, 184, 163, 0.1);
}

.check-btn {
  padding: 1.2rem;
  background: linear-gradient(135deg, var(--gm-accent), var(--color-accent-secondary));
  color: #fff;
  border: none;
  border-radius: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.check-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(201, 184, 163, 0.25);
}

.check-btn:active {
  transform: translateY(-1px);
}

/* Right Panel - Stats */
.panel-right {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.stat-line {
  display: flex;
  justify-content: space-between;
  padding: 1rem;
  background: var(--color-surface-secondary);
  border-radius: 0.8rem;
  border: 1px solid var(--color-border-soft);
}

.stat-label {
  font-size: 0.95rem;
  color: var(--gm-text-muted);
}

.stat-value {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--gm-accent);
}

.highscore {
  background: rgba(201, 184, 163, 0.06);
  border-color: rgba(201, 184, 163, 0.15);
}

.feedback {
  padding: 1.5rem;
  text-align: center;
  border-radius: 0.8rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gm-text-muted);
  background: var(--color-surface-secondary);
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.feedback.active {
  background: rgba(201, 184, 163, 0.1);
  color: var(--gm-accent);
  border: 1px solid rgba(201, 184, 163, 0.2);
}

@media (max-width: 768px) {
  .game-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    padding: 1rem;
  }

  .game-title {
    font-size: 2rem;
  }

  .number-display {
    font-size: 4rem;
    padding: 2rem;
  }

  .panel {
    padding: 1.5rem;
  }
}
