/* 
   SafeGamer - CSS Design System
   Style: Modern Minimalism, Light Theme
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* Colors */
  --bg-primary: #f8f9fb;
  --bg-card: #ffffff;
  --text-primary: #0f172a; /* Slate 900 */
  --text-secondary: #475569; /* Slate 600 */
  --text-muted: #64748b; /* Slate 500 */
  --brand-primary: #4f46e5; /* Indigo 600 */
  --brand-hover: #4338ca; /* Indigo 700 */
  --brand-light: #e0e7ff; /* Indigo 100 */
  --border-color: #e2e8f0; /* Slate 200 */
  --border-light: #f1f5f9; /* Slate 100 */
  --success: #059669; /* Emerald 600 */
  --success-light: #d1fae5; /* Emerald 100 */
  
  /* Layout & Sizing */
  --max-width: 1200px;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  
  /* Shadows (Extremely subtle) */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.03);
  --shadow-md: 0 4px 20px -2px rgba(15, 23, 42, 0.05), 0 2px 8px -1px rgba(15, 23, 42, 0.03);
  --shadow-lg: 0 12px 30px -4px rgba(15, 23, 42, 0.06), 0 4px 12px -2px rgba(15, 23, 42, 0.04);
  
  /* Animations */
  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Resets */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  line-height: 1.6;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

/* Containers */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Header & Navigation */
header {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  transition: all var(--transition-normal);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.logo svg {
  color: var(--brand-primary);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  font-size: 0.925rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.nav-link:hover, .nav-link.active {
  color: var(--brand-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

/* Hamburger Menu button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  cursor: pointer;
  padding: 0.5rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  gap: 0.5rem;
}

.btn-primary {
  background-color: var(--brand-primary);
  color: #ffffff;
}

.btn-primary:hover {
  background-color: var(--brand-hover);
}

.btn-secondary {
  background-color: var(--bg-card);
  border-color: var(--border-color);
  color: var(--text-secondary);
}

.btn-secondary:hover {
  border-color: var(--text-muted);
  color: var(--text-primary);
}

.btn-lg {
  padding: 0.875rem 1.75rem;
  border-radius: var(--radius-md);
  font-size: 1rem;
}

/* Hero Section */
.hero {
  padding: 5rem 0;
  text-align: center;
  background-color: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  background-color: var(--brand-light);
  color: var(--brand-primary);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: var(--text-primary);
  max-width: 800px;
  margin: 0 auto 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2rem;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 3.5rem;
}

.section-header h2 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 0.75rem;
}

.section-header p {
  font-size: 1rem;
  color: var(--text-secondary);
}

/* Grid Layouts */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards (Professional, Light, Subtle Shadow) */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  padding: 2rem;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: rgba(79, 70, 229, 0.2);
}

/* Game Card Variant */
.game-card {
  align-items: center;
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.game-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background-color: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.75rem;
  color: var(--brand-primary);
  border: 1px solid var(--border-light);
  overflow: hidden;
}

.game-icon img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
  display: block;
}

.game-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.game-card p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.game-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.tag {
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-light);
}

/* Guide & Article Cards */
.article-card {
  padding: 0;
}

.article-image {
  aspect-ratio: 16/9;
  background-color: var(--border-light);
  width: 100%;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color);
}

.article-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.article-card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}

.article-card h3 a:hover {
  color: var(--brand-primary);
}

.article-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.article-footer {
  margin-top: auto;
  border-top: 1px solid var(--border-light);
  padding-top: 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.read-more {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.read-more:hover {
  color: var(--brand-hover);
}

/* Review / Score Card */
.review-card {
  padding: 1.5rem;
}

.review-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.review-logo {
  font-size: 1.15rem;
  font-weight: 700;
}

.review-rating {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  background-color: var(--success-light);
  color: var(--success);
  font-weight: 700;
  font-size: 0.875rem;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
}

.review-features {
  list-style: none;
  margin-bottom: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.review-features li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.review-features li svg {
  color: var(--success);
  flex-shrink: 0;
}

/* Safety Tips Section */
.safety-bg {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.safety-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.safety-item {
  display: flex;
  gap: 1.25rem;
}

.safety-num {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--brand-light);
  color: var(--brand-primary);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.safety-info h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.safety-info p {
  font-size: 0.925rem;
  color: var(--text-secondary);
}

/* FAQ / Accordion */
.faq-list {
  max-width: 750px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.faq-item:hover {
  border-color: var(--text-muted);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: left;
  color: var(--text-primary);
  cursor: pointer;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-normal) ease-out;
  padding: 0 1.5rem;
}

.faq-answer-content {
  padding-bottom: 1.5rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.faq-icon {
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-item.active .faq-answer {
  max-height: 500px; /* arbitrary height to slide down */
}

/* Page Layouts (Individual Game Pages, Blog, etc.) */
.page-header {
  background-color: var(--bg-card);
  padding: 4rem 0;
  border-bottom: 1px solid var(--border-color);
}

.page-header h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.75rem;
}

.page-header p {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
}

.page-content {
  padding: 4rem 0;
}

/* Sidebar layout for game/blog post pages */
.sidebar-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

.main-column {
  min-width: 0; /* prevents flex/grid blowout */
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.sidebar-widget {
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-widget h4 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0.5rem;
}

/* Rich Text & Articles */
.rich-text {
  color: var(--text-secondary);
}

.rich-text h2 {
  font-size: 1.6rem;
  color: var(--text-primary);
  margin: 2.25rem 0 1rem;
  font-weight: 700;
}

.rich-text h3 {
  font-size: 1.25rem;
  color: var(--text-primary);
  margin: 1.75rem 0 0.75rem;
  font-weight: 600;
}

.rich-text p {
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.7;
}

.rich-text ul, .rich-text ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.rich-text li {
  margin-bottom: 0.5rem;
}

.rich-text blockquote {
  border-left: 4px solid var(--brand-primary);
  background-color: var(--bg-primary);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
}

/* Forms */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: inherit;
  font-size: 0.925rem;
  color: var(--text-primary);
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

textarea.form-control {
  min-height: 120px;
  resize: vertical;
}

/* Filter controls */
.filters-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2.5rem;
  background-color: var(--bg-card);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.search-box {
  position: relative;
  max-width: 360px;
  width: 100%;
}

.search-box input {
  padding-left: 2.5rem;
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.filter-buttons {
  display: flex;
  gap: 0.5rem;
}

.filter-btn {
  background: none;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.filter-btn:hover, .filter-btn.active {
  background-color: var(--brand-primary);
  border-color: var(--brand-primary);
  color: #ffffff;
}

/* Footer (Clean, elegant) */
footer {
  background-color: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 4rem 0 2rem;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer-brand h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-brand h3 svg {
  color: var(--brand-primary);
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  max-width: 320px;
}

.footer-disclosure {
  font-size: 0.775rem;
  color: var(--text-muted);
  line-height: 1.5;
  border-left: 2px solid var(--border-color);
  padding-left: 0.75rem;
}

.footer-links-col h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  border-top: 1px solid var(--border-light);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom p {
  font-size: 0.8rem;
  color: var(--text-muted);
}

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

.fade-in {
  animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Responsive Breakpoints (Mobile First) */
@media (max-width: 1024px) {
  .sidebar-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .sidebar {
    grid-row: 1; /* move sidebar to top or bottom depending on preference */
  }
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2.25rem;
  }
  
  .hero {
    padding: 3.5rem 0;
  }
  
  .section {
    padding: 3.5rem 0;
  }
  
  .grid-4, .grid-3, .grid-2 {
    grid-template-columns: 1fr;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .menu-toggle {
    display: block;
  }
  
  .nav-menu {
    display: none;
    position: absolute;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    box-shadow: var(--shadow-md);
  }
  
  .nav-menu.open {
    display: flex;
  }
  
  .nav-actions {
    display: none;
  }
  
  .nav-actions.open {
    display: flex;
  }
}

/* Custom Language Selector Dropdown */
.lang-selector {
  position: relative;
  display: inline-block;
  vertical-align: middle;
}

.lang-btn {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  height: 38px;
}

.lang-btn:hover {
  border-color: var(--brand-primary);
  background-color: var(--bg-primary);
}

.lang-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 15px -3px rgba(15, 23, 42, 0.05);
  z-index: 1000;
  min-width: 140px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  padding: 0.25rem 0;
  animation: fadeIn 0.15s ease forwards;
}

.lang-dropdown.show {
  display: flex;
}

.lang-dropdown a {
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
  text-align: left;
}

.lang-dropdown a:hover {
  background: var(--bg-primary);
  color: var(--brand-primary);
}

/* Hide default Google Translate widgets & banner */
#google_translate_element, .skiptranslate, iframe[id*="translate"] {
  display: none !important;
}

body {
  top: 0px !important;
}

