/* Import homepage display font for logo text */
@import url('https://fonts.googleapis.com/css2?family=Honk&display=swap');

/* Header Component Styles */
:root {
  --primary: #3b82f6;      /* Mavi */
  --secondary: #8b5cf6;    /* Mor */
  --accent: #06b6d4;       /* Turkuaz */
  --success: #10b981;      /* Yeşil (Play) */
  --warning: #f59e0b;      /* Turuncu (Coming soon) */
  --danger: #ef4444;       /* Kırmızı (Uyarılar) */

  --bg-dark: #111827;      /* Arka plan */
  --bg-card: #1f2937;      /* Kart arka planı */
  --border: #374151;       /* Border */
  --text: #f9fafb;         /* Ana yazı */
  --text-muted: #9ca3af;   /* İkincil yazı */
  
  --white: #ffffff;
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.page-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #1f293700;
  /* border-bottom: 1px solid var(--border); */
  /* box-shadow: var(--shadow-lg); */
  z-index: 1000;
  height: 60px;
}

/* Text logo (same spirit as homepage) */
.logo-text {
  font-family: 'Honk', cursive;
  font-weight: 400;
  font-size: 1.9rem;
  line-height: 1;
  margin: 0;
  color: var(--primary);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  width: 100%;
  padding: 0 10%;
}

.header-logo {
  flex-shrink: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  transition: transform 0.2s ease;
}

.logo-link:hover {
  transform: scale(1.05);
}

.logo-img {
  height: 40px;
  width: auto;
}

.header-center {
  flex: 1;
  /* Empty for now */
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

/* Header Buttons */
.header-safe-btn,
.header-theatre-btn {
  background: var(--primary);
  color: var(--white);
  border: none;
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  box-shadow: var(--shadow);
}

.header-safe-btn:hover,
.header-theatre-btn:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.3);
}

.header-safe-btn.active {
  background: var(--success);
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

/* Header Language Selector */
.header-language-selector select {
  appearance: none;
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 2rem 0.5rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  box-shadow: var(--shadow);
}

.header-language-selector select:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.2);
  background: var(--bg-dark);
}

.header-language-selector select:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* Header Lockscreen */
.header-lockscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(10px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.header-lockscreen.show {
  display: flex;
}

.header-lockscreen .lockscreen-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  box-shadow: var(--shadow-xl);
  max-width: 400px;
  width: 90%;
}

.header-lockscreen h1 {
  color: var(--gray-800);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.header-lockscreen p {
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}

.header-lockscreen .password-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.header-lockscreen input {
  padding: 0.75rem;
  border: 2px solid var(--gray-200);
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s ease;
}

.header-lockscreen input:focus {
  outline: none;
  border-color: var(--primary);
}

.header-lockscreen button {
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease;
}

.header-lockscreen button:hover {
  background: var(--primary-dark);
}

/* Responsive Design */
@media (max-width: 768px) {
  .header-container {
    padding: 0 5%;
  }
  
  .header-controls {
    gap: 0.5rem;
  }
  
  .header-safe-btn,
  .header-theatre-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
  }
  
  .header-language-selector select {
    min-width: 100px;
    font-size: 0.8rem;
    padding: 0.4rem 1.5rem 0.4rem 0.6rem;
  }
  
  .btn-text {
    display: none;
  }
  
  .header-safe-btn::before {
    content: "👶";
    font-size: 1.2rem;
  }
  
  .header-theatre-btn::before {
    content: "🎭";
    font-size: 1.2rem;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 0 3%;
  }
  
  .header-controls {
    gap: 0.25rem;
  }
  
  .header-safe-btn,
  .header-theatre-btn {
    padding: 0.3rem 0.4rem;
    font-size: 0.75rem;
  }
  
  .header-language-selector select {
    min-width: 80px;
    font-size: 0.75rem;
    padding: 0.3rem 1.2rem 0.3rem 0.5rem;
  }
}

/* === Theatre Mode (Minimal chrome for focus) === */
body.theatre-mode .header-language-selector,
body.theatre-mode .header-safe-btn,
body.theatre-mode .btn-text,
body.theatre-mode .header-center { display: none !important; }

body.theatre-mode .page-header {
  height: 54px;
  background: rgba(17,24,39,.92);
  border-bottom-color: rgba(55,65,81,.6);
  backdrop-filter: blur(8px);
}
body.theatre-mode .logo-text {
  font-size: 1.75rem;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
body.theatre-mode .header-theatre-btn {
  background: rgba(255,255,255,.12);
  color: #fff;
  border-radius: 999px;
  padding: .45rem .7rem;
  box-shadow: none;
}
/* Replace theatre icon with close (X) while active */
body.theatre-mode .header-theatre-btn::before { content: "✕"; font-size: 1rem; }

/* Light variant for bright backgrounds */
body.theatre-mode.theatre-light .page-header { background: #ffffff; border-bottom-color: #e5e7eb; }
body.theatre-mode.theatre-light .logo-text { color: var(--primary); text-shadow: none; }
body.theatre-mode.theatre-light .header-theatre-btn { background: #f3f4f6; color: #111827; }

/* Widen content area in theatre mode so games can breathe */
body.theatre-mode .container { width: min(96vw, 1200px); }

/* Grow common game surfaces in theatre mode */
body.theatre-mode #hangmanSvg { max-width: 380px !important; }
body.theatre-mode .board { width: clamp(320px, 92vw, 560px) !important; }
