* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary-color: #4477ce;
  --secondary-color: #1a1a2e;
  --accent-color: #16213e;
  --text-color: #ffffff;
  --text-muted: #b0b0b0;
  --success-color: #28a745;
  --error-color: #dc3545;
  --warning-color: #ffc107;
  --gradient: linear-gradient(135deg, var(--primary-color), #512b81);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body {
  font-family: "Arial", sans-serif;
  background: var(--secondary-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Loading Screen */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--secondary-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease;
}

.loading-spinner {
  width: 50px;
  height: 50px;
  border: 3px solid var(--accent-color);
  border-top: 3px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Navbar */
.navbar {
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(10px);
  padding: 0.5rem 0;
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  transition: all 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 1.3rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
}

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

.nav-link {
  color: var(--text-color);
  text-decoration: none;
  transition: color 0.3s ease;
  position: relative;
}

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

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

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

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

.auth-buttons {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.user-welcome {
  color: var(--text-color);
  font-weight: 500;
}

.btn {
  padding: 0.7rem 1.5rem;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
  transition: all 0.3s ease;
  font-weight: 500;
  min-width: 120px;
  height: 44px;
  box-sizing: border-box;
}

.btn-primary {
  background: var(--gradient);
  color: white;
  box-shadow: var(--shadow);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

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

.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: var(--text-color);
  transition: 0.3s;
}

/* Mobile Sidebar */
.mobile-sidebar {
  position: fixed;
  top: 0;
  left: -100%;
  width: 280px;
  height: 100vh;
  background: var(--accent-color);
  z-index: 2000;
  transition: left 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.mobile-sidebar.active {
  left: 0;
}

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

.close-btn {
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

.user-info:not(:empty) {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--text-muted);
  text-align: center;
}

.mobile-menu {
  list-style: none;
  margin-bottom: 2rem;
}

.mobile-menu li {
  margin-bottom: 1rem;
}

.mobile-menu a {
  color: var(--text-color);
  text-decoration: none;
  display: block;
  padding: 0.5rem 0;
  text-align: center;
}

/* Hero Section */
.hero {
  background: linear-gradient(
      135deg,
      rgba(26, 26, 46, 0.8),
      rgba(22, 33, 62, 0.8)
    ),
    url("/assets/images/games/Stormforged-Boosted.jpg");
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  padding: 120px 0 80px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
  opacity: 0.1;
}

.hero-content {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeInUp 1s ease;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--text-muted);
  animation: fadeInUp 1s ease 0.2s both;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 1s ease 0.4s both;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Features Section */
.features {
  padding: 80px 0;
  background: var(--accent-color);
}

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

.section-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

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

@media (max-width: 768px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
}

.feature-card {
  background: var(--secondary-color);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.feature-card:hover {
  transform: translateY(-10px);
}

.feature-icon {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

/* Games Grid */
.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.game-card {
  background: var(--secondary-color);
  border-radius: 15px;
  overflow: hidden;
  transition: transform 0.3s ease;
  position: relative;
  box-shadow: var(--shadow);
}

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

.game-image {
  width: 100%;
  height: 200px;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: white;
}

.game-info {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: start;
}

.game-locked {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 1rem;
  border-radius: 10px;
  text-align: center;
}

/* Forms */
.form-container {
  margin: 0 auto;
  padding: 2rem;
  background: var(--accent-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
}

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

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.form-control {
  width: 100%;
  padding: 0.8rem;
  border: 2px solid transparent;
  border-radius: 8px;
  background: var(--secondary-color);
  color: var(--text-color);
  transition: border-color 0.3s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-control.error {
  border-color: var(--error-color);
}

.error-message {
  color: var(--error-color);
  font-size: 0.9rem;
  margin-top: 0.5rem;
}

/* Toast Messages */
.toast {
  position: fixed;
  top: 100px;
  right: 20px;
  padding: 1rem 1.5rem;
  border-radius: 8px;
  color: white;
  z-index: 3000;
  transform: translateX(400px);
  transition: transform 0.3s ease;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  background: var(--success-color);
}

.toast.error {
  background: var(--error-color);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--accent-color);
  padding: 2rem;
  border-radius: 15px;
  max-width: 500px;
  width: 90%;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.5rem;
  cursor: pointer;
}

/* FAQ Accordion */
.faq-accordion {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  background: var(--secondary-color);
  border-radius: 10px;
  margin-bottom: 1rem;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.faq-question {
  width: 100%;
  padding: 1.5rem;
  background: none;
  border: none;
  color: var(--text-color);
  font-size: 1.1rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.3s ease;
}

.faq-question.active {
  color: var(--primary-color);
}

.faq-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

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

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer.active {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 1.5rem 1.5rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Contact Page Layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-info-section {
  max-width: 600px;
  margin: 0 auto;
}

.contact-info-grid {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--secondary-color);
  border-radius: 15px;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease;
}

.contact-info-item:hover {
  transform: translateY(-5px);
}

.contact-icon {
  width: 60px;
  height: 60px;
  background: var(--gradient);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: white;
  flex-shrink: 0;
}

.contact-details h3 {
  color: var(--text-color);
  margin-bottom: 0.5rem;
  font-size: 1.2rem;
}

.contact-details p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .contact-info-item {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .contact-icon {
    margin: 0 auto;
  }
}

/* About Page Mission Grid */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 768px) {
  .mission-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mission-grid .feature-card {
    text-align: center;
  }

  .mission-grid .feature-icon {
    margin: 0 auto 1rem;
  }
}

/* Story Layout */
.story-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.story-content {
  text-align: left;
}

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

.visual-item {
  background: var(--accent-color);
  padding: 1.5rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.visual-item:hover {
  transform: translateY(-5px);
}

.story-image {
  width: 60px;
  height: 60px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

.visual-item h4 {
  color: var(--primary-color);
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.visual-item p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

@media (max-width: 1024px) and (min-width: 769px) {
  .story-visuals {
    flex-direction: row;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .story-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }

  .story-content {
    text-align: center;
  }

  .story-visuals {
    flex-direction: column;
    align-items: center;
  }

  .visual-item {
    flex: 1;
    max-width: 200px;
  }
}

/* Testimonial Cards */
.testimonial-card {
  background: var(--secondary-color);
  padding: 2rem;
  border-radius: 15px;
  text-align: center;
  transition: transform 0.3s ease;
  box-shadow: var(--shadow);
}

.testimonial-card:hover {
  transform: translateY(-10px);
}

.testimonial-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  position: relative;
}

.testimonial-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar-fallback {
  width: 100%;
  height: 100%;
  background: var(--gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 2rem;
}

.testimonial-author {
  color: var(--primary-color);
  margin-top: 1rem;
  font-weight: 500;
}

/* Footer */
.footer {
  background: var(--accent-color);
  padding: 3rem 0 1rem;
  /* margin-top: 4rem; */
}

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

.footer-section h3 {
  color: var(--primary-color);
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.footer-section .logo {
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.footer-section p {
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  line-height: 1.6;
}

.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  display: block;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

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

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

@media (max-width: 768px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    text-align: center;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-menu,
  .auth-buttons {
    display: none;
  }

  .hamburger {
    display: flex;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    align-items: center;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .games-grid {
    grid-template-columns: 1fr;
  }

  .container {
    padding: 0 1rem;
  }

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

  .nav-container {
    padding: 0 1rem;
  }

  .hero-content {
    padding: 0 1rem;
  }

  .hero {
    padding: 100px 0 60px;
    text-align: center;
  }

  .features {
    padding: 60px 0;
  }

  .feature-card {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .feature-card p {
    text-align: center;
  }

  .feature-card h2 {
    font-size: 1.2rem;
  }

  .feature-icon {
    display: flex;
    justify-content: center;
    align-items: center;
  }

  .modal-content {
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 2rem;
  }

  .btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }

  .feature-card {
    padding: 1.5rem;
  }

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

/* Age Verification Popup */
.age-verification {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.age-verification-content {
  background: var(--accent-color);
  padding: 3rem;
  border-radius: 15px;
  text-align: center;
  max-width: 500px;
  width: 90%;
}

.age-verification h2 {
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.age-verification p {
  margin-bottom: 2rem;
  color: var(--text-muted);
}

.age-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

@media (max-width: 480px) {
  .age-buttons .btn {
    font-size: 0.7rem;
  }
}

/* Cookies Banner */
.cookies-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--accent-color);
  padding: 1rem;
  z-index: 1500;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.cookies-banner.show {
  transform: translateY(0);
}

.cookies-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.cookies-text {
  flex: 1;
  color: var(--text-muted);
}

.cookies-buttons {
  display: flex;
  gap: 1rem;
}

@media (max-width: 768px) {
  .cookies-content {
    flex-direction: column;
    text-align: center;
  }

  .cookies-buttons {
    width: 100%;
    justify-content: center;
  }
}
