/* Main Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--body-font, 'Inter'), -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--background-color, #1a1a2e);
  color: var(--text-color, #ffffff);
  line-height: 1.6;
  min-height: 100vh;
  padding-top: 0;
}

/* Homepage Hero Section */
.homepage-hero {
  background: transparent;
  padding: 4rem 2rem;
  text-align: center;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  margin-bottom: 2rem;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary, rgba(255, 255, 255, 0.8));
  font-weight: 400;
  line-height: 1.6;
}

@media (max-width: 768px) {
  .homepage-hero {
    padding: 2rem 1rem;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }
}

/* Breadcrumbs */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 0;
  font-size: 0.875rem;
  color: var(--text-secondary);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--primary-color);
}

.breadcrumbs .separator {
  margin: 0 0.25rem;
  opacity: 0.5;
}

.breadcrumbs .current {
  color: var(--text-color)fff;
  font-weight: 500;
}

.homepage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  max-width: 1600px;
  margin: 0 auto;
  padding: 1rem;
  gap: 1.5rem;
}

.layout-fullwidth .homepage-layout {
  max-width: 100%;
  padding: 1rem 3rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.layout-fullwidth .container {
  max-width: 100%;
  padding: 0 3rem;
}

.main-content {
  min-width: 0;
}

.game-area {
  width: 100%;
}

.game-section {
  width: 100%;
}

/* Sidebar */
.sidebar {
  width: 320px;
}

/* Browse Container */
.browse-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

.browse-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.browse-title {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-color);
  margin-bottom: 0.75rem;
}

.browse-subtitle {
  font-size: 1.125rem;
  color: var(--text-secondary);
}

/* Browse Filters */
.browse-filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  align-items: center;
  background: var(--card-background-40);
  padding: 1.5rem;
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.filter-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.filter-select {
  padding: 0.75rem 1rem;
  background: var(--card-background-60);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9375rem;
  cursor: pointer;
  transition: all 0.2s ease;
  min-width: 200px;
}

.filter-select:hover,
.filter-select:focus {
  background: var(--card-background-80);
  border-color: rgba(255, 107, 53, 0.5);
  outline: none;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 250px;
}

.search-box .search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  background: var(--card-background-60);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  font-size: 0.9375rem;
  transition: all 0.2s ease;
}

.search-box .search-input::placeholder {
  color: var(--text-60);
}

.search-box .search-input:focus {
  background: var(--card-background-80);
  border-color: rgba(255, 107, 53, 0.5);
  outline: none;
}

.search-box .search-icon {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-60);
  pointer-events: none;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 3rem;
  padding: 1.5rem 0;
}

.pagination a,
.pagination span {
  padding: 0.75rem 1rem;
  background: var(--card-background-60);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background: rgba(255, 107, 53, 0.2);
  border-color: rgba(255, 107, 53, 0.5);
  transform: translateY(-2px);
}

.pagination .current {
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  border-color: transparent;
}

/* No Results */
.no-results {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--card-background-40);
  border-radius: 12px;
  border: 1px solid var(--border-color);
}

.no-results h2 {
  font-size: 2rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.no-results p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* Buttons */
.btn {
  padding: 0.5rem 1rem;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-block;
}

.btn-primary {
  background: linear-gradient(45deg, var(--accent-color), var(--secondary-color));
  color: var(--text-color);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 107, 53, 0.4);
}

/* Loading States */
.loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--border-color);
  border-top-color: #ff6b35;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-color);
  font-size: 1.125rem;
  margin-top: 1rem;
}

/* Responsive */
@media (max-width: 1024px) {
  .homepage-layout {
    grid-template-columns: 1fr;
  }

  .main-content {
    width: 100%;
    padding-right: 0;
  }

  .sidebar {
    width: 100%;
  }

  .browse-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group,
  .search-box {
    width: 100%;
  }

  .filter-select {
    width: 100%;
    min-width: 100%;
  }
}

@media (max-width: 768px) {
  body {
    padding-top: 10px;
  }

  .container {
    padding: 0 1rem;
  }

  .main-content {
    padding: 1rem;
  }

  .browse-container {
    padding: 1rem;
  }

  .browse-title {
    font-size: 1.75rem;
  }

  .browse-subtitle {
    font-size: 1rem;
  }

  .browse-filters {
    padding: 1rem;
  }
}

/* Utility Classes */
.text-center {
  text-align: center;
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* Floating Action Buttons */
.floating-action-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  z-index: 999;
}

.fab-button {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary-color);
  border: none;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

.fab-button.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.fab-button:hover {
  background: var(--secondary-color);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.fab-button:active {
  transform: translateY(-2px);
}

.fab-button svg {
  transition: transform 0.3s ease;
}

.fab-button:hover svg {
  transform: scale(1.1);
}

.scroll-to-top-btn {
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .floating-action-buttons {
    bottom: 1rem;
    right: 1rem;
    gap: 0.75rem;
  }
  
  .fab-button {
    width: 48px;
    height: 48px;
  }
  
  .fab-button svg {
    width: 20px;
    height: 20px;
  }
}

/* 404 Page Styles */
.error-404-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

.layout-fullwidth .error-404-container {
  max-width: 100%;
  padding: 2rem 3rem;
}

.games-grid-404 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .games-grid-404 {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }
}
