/* Dogg House Casino - Optimized CSS */
/* Font Face with font-display: swap */
@font-face {
  font-family: 'Graphik';
  font-weight: 400;
  font-display: swap;
  src: local('Graphik Regular'), local('Graphik-Regular');
}

@font-face {
  font-family: 'Graphik';
  font-weight: 600;
  font-display: swap;
  src: local('Graphik Semibold'), local('Graphik-Semibold');
}

/* CSS Variables */
:root {
  --color-bg: #02071c;
  --color-bg-secondary: #0a1128;
  --color-primary: #ffdf0d;
  --color-primary-hover: #e6c900;
  --color-text: #ffffff;
  --color-text-muted: #9ca3af;
  --color-border: #1f2937;
  --font-family: 'Graphik', system-ui, -apple-system, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --transition: 0.2s ease;
}

/* Reset */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

a:hover {
  opacity: 0.85;
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Header */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.header-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1400px;
  margin: 0 auto;
  padding: 12px 20px;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
  flex-shrink: 0;
}

.logo img {
  width: 24px;
  height: 24px;
}

.nav-menu {
  display: flex;
  gap: 8px;
}

.nav-menu li a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  transition: background var(--transition);
}

.nav-menu li a:hover {
  background: var(--color-bg-secondary);
  opacity: 1;
}

.nav-menu li a img {
  width: 24px;
  height: 24px;
}

.header-actions {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all var(--transition);
}

.btn-login {
  background: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-text);
}

.btn-login:hover {
  background: var(--color-bg-secondary);
  opacity: 1;
}

.btn-signup,
.btn-primary {
  background: var(--color-primary);
  color: #000;
}

.btn-signup:hover,
.btn-primary:hover {
  background: var(--color-primary-hover);
  opacity: 1;
}

/* Burger Menu */
.burger-menu {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 10px;
  z-index: 101;
}

.burger-line {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  transition: all var(--transition);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(2) {
  opacity: 0;
}

.burger-menu[aria-expanded="true"] .burger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero Section */
.hero-section {
  padding: 60px 20px 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-secondary) 0%, var(--color-bg) 100%);
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-content h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700;
  margin: 0 0 16px;
  line-height: 1.2;
}

.hero-content p {
  font-size: 18px;
  color: var(--color-text-muted);
  margin: 0 0 32px;
}

/* Games Section */
.games-section {
  padding: 40px 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.section-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.slider-arrows {
  display: flex;
  gap: 8px;
}

.arrow-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-bg-secondary);
  color: var(--color-primary);
  transition: all var(--transition);
}

.arrow-btn:hover {
  background: var(--color-primary);
  color: #000;
}

/* Games Slider */
.games-slider {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 8px;
}

.games-slider::-webkit-scrollbar {
  display: none;
}

/* Game Card */
.game-card {
  flex: 0 0 auto;
  width: 280px;
  position: relative;
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform var(--transition);
}

.game-card:hover {
  transform: translateY(-4px);
}

.game-card a {
  display: block;
}

.game-card img {
  width: 280px;
  height: 200px;
  object-fit: cover;
  border-radius: var(--radius-md);
  aspect-ratio: 280 / 200;
}

.game-title {
  display: block;
  padding: 12px 0 0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card.ranked {
  position: relative;
}

.game-card .rank {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #000;
  font-weight: 700;
  font-size: 14px;
  border-radius: 50%;
  z-index: 2;
}

/* SEO Content */
.seo-content {
  max-width: 900px;
  margin: 0 auto;
  padding: 60px 20px 80px;
  color: var(--color-text-muted);
}

.seo-content h1 {
  font-size: 32px;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px;
}

.seo-content h2 {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  margin: 48px 0 16px;
}

.seo-content h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--color-text);
  margin: 32px 0 12px;
}

.seo-content p {
  margin: 0 0 16px;
  line-height: 1.7;
}

.seo-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.seo-content a:hover {
  opacity: 0.85;
}

.seo-content ol,
.seo-content ul {
  margin: 0 0 24px;
  padding-left: 24px;
}

.seo-content li {
  margin-bottom: 8px;
  list-style: decimal;
}

.seo-content figure {
  margin: 24px 0;
  overflow-x: auto;
}

.seo-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.seo-content table td {
  padding: 12px 16px;
  border: 1px solid var(--color-border);
}

.seo-content table tr:first-child td {
  background: var(--color-bg-secondary);
  font-weight: 600;
  color: var(--color-text);
}

/* Breadcrumbs */
.breadcrumbs {
  padding: 16px 20px;
  max-width: 1400px;
  margin: 0 auto;
  font-size: 14px;
  color: var(--color-text-muted);
}

.breadcrumbs a {
  color: var(--color-primary);
}

.breadcrumbs span {
  margin: 0 8px;
}

/* Footer */
footer {
  background: var(--color-bg-secondary);
  border-top: 1px solid var(--color-border);
  padding: 48px 20px 24px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto 40px;
}

.footer-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 16px;
  color: var(--color-text);
}

.footer-section p {
  color: var(--color-text-muted);
  font-size: 14px;
  margin: 0;
}

.footer-section ul {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-section ul li a {
  font-size: 14px;
  color: var(--color-text-muted);
}

.footer-section ul li a:hover {
  color: var(--color-primary);
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 12px;
}

.footer-logo img {
  width: 24px;
  height: 24px;
}

.footer-bottom {
  text-align: center;
  padding-top: 24px;
  border-top: 1px solid var(--color-border);
  max-width: 1400px;
  margin: 0 auto;
}

.footer-bottom p {
  font-size: 14px;
  color: var(--color-text-muted);
  margin: 0;
}

/* Mobile Navigation Overlay */
.mobile-nav {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--color-bg);
  z-index: 99;
  padding: 80px 20px 20px;
  flex-direction: column;
  gap: 16px;
}

.mobile-nav.active {
  display: flex;
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--color-bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 16px;
}

/* Responsive */
@media (max-width: 1024px) {
  .nav-menu {
    display: none;
  }
  
  .burger-menu {
    display: flex;
  }
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }
  
  .hero-content p {
    font-size: 16px;
  }
  
  .games-section {
    padding: 32px 16px;
  }
  
  .game-card {
    width: 220px;
  }
  
  .game-card img {
    width: 220px;
    height: 157px;
  }
  
  .section-header h2 {
    font-size: 20px;
  }
  
  .seo-content {
    padding: 40px 16px 60px;
  }
  
  .seo-content h1 {
    font-size: 26px;
  }
  
  .seo-content h2 {
    font-size: 20px;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .game-card {
    width: 180px;
  }
  
  .game-card img {
    width: 180px;
    height: 128px;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Prevent CLS - Image dimensions */
.game-card img {
  aspect-ratio: 280 / 200;
  background: var(--color-bg-secondary);
}

/* Print styles */
@media print {
  header,
  footer,
  .slider-arrows,
  .burger-menu {
    display: none;
  }
  
  body {
    background: #fff;
    color: #000;
  }
  
  .seo-content {
    max-width: 100%;
  }
}
