/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #2d3436;
  background: linear-gradient(135deg, #a8e6cf 0%, #dcedc1 100%);
  min-height: 100vh;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 20px;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.5rem;
  font-weight: bold;
  text-decoration: none;
  color: #00b894;
  transition: opacity 0.3s ease;
}

.nav-brand:hover {
  opacity: 0.9;
}

.nav-brand i {
  font-size: 24px;
  margin-right: 10px;
}

.search-container {
  display: flex;
  align-items: center;
  background: #f8f9fa;
  border-radius: 25px;
  padding: 5px;
  max-width: 400px;
  flex: 1;
  margin: 0 2rem;
  border: 2px solid #e8e8e8;
  transition: all 0.3s ease;
}

.search-container:focus-within {
  border-color: #00b894;
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.search-input {
  border: none;
  background: transparent;
  padding: 10px 15px;
  flex: 1;
  outline: none;
  font-size: 1rem;
  color: #2d3436;
}

.search-btn {
  background: #00b894;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.search-btn:hover {
  background: #00a085;
  transform: scale(1.05);
}

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

.nav-link {
  text-decoration: none;
  color: #2d3436;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
  padding: 0.5rem 0;
}

.nav-link:hover {
  color: #00b894;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: #00b894;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.nav-link.active {
  color: #00b894;
  font-weight: bold;
}

.nav-link.active::after {
  width: 100%;
}

.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #2d3436;
  transition: color 0.3s ease;
}

.mobile-menu-toggle:hover {
  color: #00b894;
}

/* Main Content */
.main-content {
  padding: 2rem 0;
}

/* Game Player Section */
.game-player-section {
  margin-bottom: 3rem;
}

.game-cover {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  margin-bottom: 2rem;
}

.game-cover img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  display: block;
}

.game-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.3));
  display: flex;
  align-items: center;
  justify-content: center;
}

.game-info {
  text-align: center;
  color: white;
}

.game-title {
  font-size: 3rem;
  margin-bottom: 0.5rem;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.game-subtitle {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.play-btn {
  background: linear-gradient(45deg, #00b894, #00a085);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 50px;
  font-size: 1.2rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 auto;
}

.play-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 184, 148, 0.3);
}

.play-btn i {
  font-size: 1.3rem;
}

/* Game Iframe Container */
.game-iframe-container {
  background: white;
  border-radius: 15px;
  padding: 1rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  margin-bottom: 2rem;
}

.iframe-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
}

.iframe-title {
  color: #333;
  font-size: 1.5rem;
}

.iframe-buttons {
  display: flex;
  gap: 10px;
}

.control-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  width: 40px;
  height: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.control-btn:hover {
  background: #00b894;
  color: white;
  border-color: #00b894;
}

.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 600px;
  border-radius: 10px;
  overflow: hidden;
}

.iframe-wrapper.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  border-radius: 0;
}

#gameIframe {
  width: 100%;
  height: 100%;
  border: none;
}

.loading-spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #00b894;
}

.loading-spinner i {
  font-size: 3rem;
  margin-bottom: 1rem;
}

/* Related Games Section */
.related-games-section {
  margin-bottom: 3rem;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 2rem;
  color: white;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.game-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  position: relative;
}

.game-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.game-card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.game-card:hover .game-card-image {
  transform: scale(1.05);
}

.game-card-content {
  padding: 1.5rem;
  background: white;
}

.game-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.5rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game-card-description {
  color: #636e72;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.game-card-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  color: white;
  background: rgba(0, 184, 148, 0.9);
  backdrop-filter: blur(5px);
  z-index: 1;
  transition: all 0.3s ease;
}

.game-card:hover .game-card-category {
  transform: translateY(-2px);
  box-shadow: 0 5px 10px rgba(0, 184, 148, 0.2);
}

.game-card-btn {
  width: 100%;
  padding: 10px;
  background: #00b894;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.game-card-btn:hover {
  background: #00a085;
}

.game-card-btn i {
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

.game-card-btn:hover i {
  transform: translateX(3px);
}

/* Game Description Section */
.game-description-section {
  background: white;
  border-radius: 20px;
  padding: 2.5rem;
  margin: 3rem 0;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.game-description-section .section-title {
  color: #2d3436;
  font-size: 2rem;
  margin-bottom: 2rem;
  font-weight: 700;
  position: relative;
  padding-bottom: 1rem;
}

.game-description-section .section-title::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: #00b894;
  border-radius: 3px;
}

.game-details {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.game-description {
  color: #636e72;
  line-height: 1.8;
  font-size: 1.1rem;
}

.game-description h3 {
  color: #2d3436;
  font-size: 1.5rem;
  margin: 2rem 0 1rem;
  font-weight: 600;
}

.game-description p {
  margin-bottom: 1.5rem;
}

.game-features {
  background: #f8f9fa;
  padding: 2rem;
  border-radius: 15px;
  position: sticky;
  top: 2rem;
}

.game-features h4 {
  color: #2d3436;
  font-size: 1.3rem;
  margin-bottom: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.game-features h4::before {
  content: "★";
  color: #00b894;
  font-size: 1.2rem;
}

.game-features ul {
  list-style: none;
  padding: 0;
}

.game-features li {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
  color: #636e72;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #eee;
}

.game-features li:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.game-features li::before {
  content: "✓";
  display: inline-block;
  margin-right: 10px;
  color: #00b894;
  font-weight: bold;
  background: rgba(0, 184, 148, 0.1);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.game-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.5rem;
  background: white;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 2px solid rgba(0, 184, 148, 0.1);
}

.stat-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 184, 148, 0.15);
  border-color: #00b894;
}

.stat-item i {
  font-size: 2rem;
  color: #00b894;
  margin-bottom: 1rem;
}

.stat-label {
  font-size: 0.9rem;
  color: #636e72;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 1.8rem;
  color: #2d3436;
  font-weight: bold;
  line-height: 1;
}

/* Footer Styles */
.footer {
  background: #2d3436;
  color: #fff;
  padding: 4rem 0 2rem;
  margin-top: 4rem;
}

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

.footer-section {
  display: flex;
  flex-direction: column;
}

.footer-section h3 {
  color: #00b894;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-section h4 {
  color: #00b894;
  font-size: 1.2rem;
  margin-bottom: 1.2rem;
}

.footer-section p {
  color: #b2bec3;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.footer-section ul {
  list-style: none;
  padding: 0;
}

.footer-section ul li {
  margin-bottom: 0.8rem;
}

.footer-section ul li a {
  color: #b2bec3;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer-section ul li a:hover {
  color: #00b894;
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
  color: #b2bec3;
  font-size: 0.9rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .footer {
    padding: 3rem 0 1.5rem;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-section {
    text-align: center;
  }
}

/* Page Styles */
.page-header {
  text-align: center;
  padding: 4rem 0;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  margin-bottom: 2rem;
  border-radius: 0 0 30px 30px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.page-header h1 {
  font-size: 2.5rem;
  color: #2d3436;
  margin-bottom: 1rem;
  font-weight: 700;
}

.page-header p {
  color: #636e72;
  max-width: 600px;
  margin: 0 auto;
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Contact Page Styles */
.contact-section {
  margin-bottom: 3rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info h2,
.contact-form-container h2 {
  margin-bottom: 1.5rem;
  color: #333;
}

.contact-methods {
  margin: 2rem 0;
}

.contact-method {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-icon {
  background: #00b894;
  color: white;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-details h3 {
  margin-bottom: 0.5rem;
  color: #333;
}

.contact-details p {
  margin-bottom: 0.3rem;
  color: #333;
  font-weight: 500;
}

.contact-details span {
  color: #666;
  font-size: 0.9rem;
}

.contact-social {
  margin-top: 2rem;
}

.contact-social h3 {
  margin-bottom: 1rem;
  color: #333;
}

/* Contact Form */
.contact-form-container {
  background: white;
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: #333;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: #00b894;
}

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

.checkbox-group {
  display: flex;
  align-items: center;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
}

.submit-btn {
  background: linear-gradient(45deg, #00b894, #00a085);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  justify-content: center;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.4);
}

/* FAQ Section */
.faq-section {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 2rem;
  color: #333;
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.faq-item {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.faq-item:hover {
  transform: translateY(-3px);
}

.faq-item h3 {
  margin-bottom: 1rem;
  color: #333;
  display: flex;
  align-items: center;
  gap: 10px;
}

.faq-item h3 i {
  color: #00b894;
}

.faq-item p {
  color: #666;
  line-height: 1.6;
}

/* Legal Pages Styles (Privacy Policy & Terms of Service) */
.legal-page {
  background: white;
  border-radius: 20px;
  padding: 3rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  margin: 2rem auto;
  max-width: 900px;
}

.legal-page h1 {
  color: #2d3436;
  font-size: 2.5rem;
  margin-bottom: 2rem;
  font-weight: 700;
}

.legal-page h2 {
  color: #2d3436;
  font-size: 1.8rem;
  margin-top: 2.5rem;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #00b894;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.legal-page h2 i {
  color: #00b894;
  font-size: 1.5rem;
}

.legal-page h3 {
  color: #2d3436;
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.legal-page p {
  color: #636e72;
  margin-bottom: 1.2rem;
  line-height: 1.8;
}

.legal-page ul,
.legal-page ol {
  color: #636e72;
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.legal-page li {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.legal-page .highlight-box {
  background: #f8f9fa;
  border-left: 4px solid #00b894;
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 12px;
}

.legal-page .highlight-box h4 {
  color: #2d3436;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  font-weight: 600;
}

.legal-page .highlight-box p {
  margin-bottom: 0;
}

.legal-page .last-updated {
  background: #e3f8f4;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  margin-bottom: 2rem;
  border-left: 4px solid #00b894;
  color: #2d3436;
  font-size: 0.95rem;
}

.legal-page .last-updated strong {
  color: #00b894;
  font-weight: 600;
}

@media (max-width: 768px) {
  .legal-page {
    padding: 2rem;
    margin: 1rem;
  }

  .legal-page h1 {
    font-size: 2rem;
  }

  .legal-page h2 {
    font-size: 1.5rem;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    padding: 1rem;
  }

  .search-container {
    display: none;
  }

  .nav-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: white;
    padding: 1rem;
    flex-direction: column;
    gap: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
  }

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

  .mobile-menu-toggle {
    display: block;
  }

  .nav-link {
    width: 100%;
    text-align: center;
    padding: 0.8rem;
    border-radius: 8px;
    background: #f8f9fa;
  }

  .nav-link:hover {
    background: #e9ecef;
  }

  .nav-link.active {
    background: #00b894;
    color: white;
  }

  .nav-link.active::after {
    display: none;
  }

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

  .game-subtitle {
    font-size: 1rem;
  }

  .play-btn {
    padding: 12px 24px;
    font-size: 1rem;
  }

  .games-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .game-details {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .iframe-wrapper {
    height: 400px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-links {
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .page-header {
    padding: 3rem 1rem;
  }

  .page-header h1 {
    font-size: 2rem;
  }

  .game-details {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .game-cover img {
    height: 250px;
  }

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

  .section-title {
    font-size: 1.5rem;
  }

  .iframe-wrapper {
    height: 300px;
  }

  .game-description-section {
    padding: 1.5rem;
  }
}

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

.game-card,
.game-description-section {
  animation: fadeIn 0.6s ease-out;
}

/* Fullscreen styles */
.fullscreen-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: black;
  z-index: 9998;
  display: none;
}

.fullscreen-overlay.active {
  display: block;
}

/* All Games Page Styles */
.all-games-section {
  padding: 20px 0;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 20px 0;
}

.game-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

.game-card-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.game-card-content {
  padding: 16px;
}

.game-card-title {
  font-size: 1.2em;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.game-card-description {
  font-size: 0.9em;
  color: #666;
  margin-bottom: 16px;
  line-height: 1.4;
}

.game-card-btn {
  width: 100%;
  padding: 10px;
  background: #00b894;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 500;
  transition: background-color 0.2s;
}

.game-card-btn:hover {
  background: #00a085;
}

.no-games {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 1.2em;
}

/* Active nav link */
.nav-link.active {
  color: #00b894;
  font-weight: bold;
}

/* Responsive Styles */
@media (max-width: 1200px) {
  .games-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .games-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .games-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .game-card-image {
    height: 200px;
  }
}

/* Search Results Dropdown */
.search-results {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  display: none;
}

.search-results.active {
  display: block;
}

.search-result-item {
  padding: 12px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background-color 0.2s;
}

.search-result-item:hover {
  background-color: #f5f5f5;
}

.search-result-item img {
  width: 40px;
  height: 40px;
  border-radius: 4px;
  object-fit: cover;
}

.search-result-info {
  flex: 1;
}

.search-result-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.search-result-description {
  font-size: 0.85em;
  color: #666;
}

.no-results {
  padding: 16px;
  text-align: center;
  color: #666;
}

.search-container {
  position: relative;
  flex: 1;
  max-width: 400px;
  margin: 0 20px;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .search-container {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 10px 0;
  }

  .search-results {
    position: fixed;
    top: 60px; /* Adjust based on your header height */
    left: 0;
    right: 0;
    max-height: calc(100vh - 60px);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.98);
  }

  .search-result-item {
    padding: 16px;
  }
}

/* Game Card Category */
.game-card-category {
  display: inline-block;
  padding: 4px 8px;
  background-color: #f0f0f0;
  color: #666;
  border-radius: 12px;
  font-size: 0.8em;
  margin-bottom: 12px;
}

.game-card-category[data-category="Action"] {
  background-color: #ffebee;
  color: #d32f2f;
}

.game-card-category[data-category="Racing"] {
  background-color: #e8f5e9;
  color: #2e7d32;
}

.game-card-category[data-category="Casual"] {
  background-color: #e8f5e9;
  color: #00b894;
}

.game-card-category[data-category="Puzzle"] {
  background-color: #fff3e0;
  color: #f57c00;
}

/* 404 Page Styles */
.error-container {
  max-width: 1200px;
  margin: 4rem auto;
  padding: 2rem;
  text-align: center;
}

.error-container h1 {
  font-size: 3rem;
  color: #2d3436;
  margin-bottom: 1rem;
}

.error-container p {
  font-size: 1.2rem;
  color: #636e72;
  margin-bottom: 1.5rem;
}

.error-container ul {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.error-container ul li {
  margin: 1rem 0;
}

.error-container ul li a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.5rem;
  background-color: #00b894;
  color: white;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.error-container ul li a:hover {
  background-color: #00a085;
  transform: translateY(-2px);
}

.recommended-games {
  margin-top: 4rem;
}

.recommended-games h2 {
  font-size: 2rem;
  color: #2d3436;
  margin-bottom: 2rem;
}

.game-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  padding: 1rem;
}

.game-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.game-card-link {
  text-decoration: none;
  color: inherit;
}

.game-card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.game-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.game-card:hover .game-card-image img {
  transform: scale(1.05);
}

.game-card-content {
  padding: 1.5rem;
}

.game-card-title {
  font-size: 1.2rem;
  color: #2d3436;
  margin-bottom: 0.5rem;
}

.game-card-description {
  font-size: 0.9rem;
  color: #636e72;
  line-height: 1.4;
}

@media (max-width: 768px) {
  .error-container {
    margin: 2rem auto;
    padding: 1rem;
  }

  .error-container h1 {
    font-size: 2rem;
  }

  .game-cards {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
  }

  .game-card-image {
    height: 150px;
  }
}

/* Comments Section Styles */
.comments-section {
  margin: 3rem 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.comments-section .section-title {
  text-align: center;
  margin-bottom: 2rem;
  color: #2d3436;
  font-size: 2rem;
  font-weight: 700;
}

/* Comment Form Styles */
.comment-form-container {
  background: #f8f9fa;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 3rem;
  border: 1px solid #e9ecef;
}

.comment-form-container h3 {
  color: #2d3436;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
  text-align: center;
}

.comment-form {
  max-width: 600px;
  margin: 0 auto;
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: #2d3436;
  font-weight: 600;
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  transition: all 0.3s ease;
  background: white;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #00b894;
  box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.1);
}

.form-group input:invalid,
.form-group textarea:invalid {
  border-color: #e74c3c;
}

.form-group input:invalid:focus,
.form-group textarea:invalid:focus {
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

/* Rating Input Styles */
.rating-input {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  gap: 5px;
  margin-top: 0.5rem;
}

.rating-input input[type="radio"] {
  display: none;
}

.rating-input label {
  cursor: pointer;
  font-size: 2rem;
  color: #ddd;
  transition: color 0.2s ease;
  margin-bottom: 0;
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input[type="radio"]:checked ~ label {
  color: #ffd700;
}

/* Comment Meta */
.comment-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 0.5rem;
}

.character-counter {
  font-size: 0.85rem;
  color: #636e72;
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

/* Checkbox Styles */
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #ddd;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0;
  margin-top: 2px;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
  background: #00b894;
  border-color: #00b894;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
  content: "✓";
  color: white;
  font-weight: bold;
  font-size: 14px;
}

.checkbox-label a {
  color: #00b894;
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

/* Submit Button */
.submit-btn {
  background: linear-gradient(135deg, #00b894, #00a085);
  color: white;
  border: none;
  padding: 15px 30px;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2rem auto 0;
  min-width: 150px;
  justify-content: center;
}

.submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 184, 148, 0.3);
}

.submit-btn:active {
  transform: translateY(0);
}

/* Comments Display */
.comments-display h3 {
  color: #2d3436;
  margin-bottom: 2rem;
  font-size: 1.5rem;
  text-align: center;
}

.comments-list {
  space-y: 1.5rem;
}

.comment-item {
  background: white;
  border-radius: 15px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border: 1px solid #f1f3f4;
  transition: all 0.3s ease;
}

.comment-item:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
  transform: translateY(-2px);
}

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

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.author-info {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: #2d3436;
  font-size: 1rem;
}

.comment-date {
  font-size: 0.85rem;
  color: #636e72;
}

.comment-rating .stars {
  color: #ffd700;
  font-size: 1.2rem;
}

.comment-content {
  margin: 1rem 0;
  line-height: 1.6;
  color: #2d3436;
}

.comment-content p {
  margin: 0;
}

.comment-actions {
  display: flex;
  gap: 15px;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #f1f3f4;
}

.action-btn {
  background: none;
  border: 1px solid #e9ecef;
  color: #636e72;
  padding: 8px 15px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 5px;
}

.action-btn:hover {
  background: #f8f9fa;
  color: #2d3436;
  border-color: #ddd;
}

.helpful-btn:hover {
  background: rgba(0, 184, 148, 0.1);
  color: #00b894;
  border-color: #00b894;
}

.reply-btn:hover {
  background: rgba(52, 152, 219, 0.1);
  color: #3498db;
  border-color: #3498db;
}

/* Load More Button */
.load-more-container {
  text-align: center;
  margin-top: 2rem;
}

.load-more-btn {
  background: white;
  border: 2px solid #00b894;
  color: #00b894;
  padding: 12px 25px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.load-more-btn:hover {
  background: #00b894;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 184, 148, 0.3);
}

/* Screen Reader Only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Responsive Design for Comments */
@media (max-width: 768px) {
  .comments-section {
    margin: 2rem 0;
    padding: 1.5rem;
  }

  .comment-form-container {
    padding: 1.5rem;
  }

  .comment-item {
    padding: 1rem;
  }

  .comment-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .comment-author {
    width: 100%;
  }

  .comment-actions {
    flex-wrap: wrap;
    gap: 10px;
  }

  .action-btn {
    font-size: 0.8rem;
    padding: 6px 12px;
  }

  .rating-input {
    justify-content: center;
  }

  .submit-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .comments-section .section-title {
    font-size: 1.5rem;
  }

  .comment-form-container h3 {
    font-size: 1.2rem;
  }

  .comment-avatar {
    width: 35px;
    height: 35px;
  }

  .author-name {
    font-size: 0.9rem;
  }

  .comment-date {
    font-size: 0.8rem;
  }
}

/* Scroll to Top Button */
.scroll-to-top {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(45deg, #00b894, #00a085);
  color: white;
  border: none;
  border-radius: 50%;
  width: 55px;
  height: 55px;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  box-shadow: 0 4px 15px rgba(0, 184, 148, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
}

.scroll-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: linear-gradient(45deg, #00a085, #008f73);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 184, 148, 0.4);
}

.scroll-to-top:active {
  transform: translateY(-1px) scale(1.02);
}

/* Mobile responsive for scroll to top button */
@media (max-width: 768px) {
  .scroll-to-top {
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    font-size: 18px;
  }
}
