:root {
  --primary-color: #1a1a1a;
  --accent-color: #ffb347;
  --text-color: #ffffff;
  --background-dark: #0a0a0a;
  --background-light: #1f1f1f;
  --font-primary: 'Roboto', sans-serif;
  --font-display: 'Montserrat', sans-serif;
}

/* Animations */
@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(255, 179, 71, 0.3);
  }

  50% {
    box-shadow: 0 0 40px rgba(255, 179, 71, 0.6);
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }
}

@keyframes clickExpand {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(2);
  }
}

@keyframes heroFloat {
  0%,
  100% {
    transform: translateZ(0) translateY(0);
  }

  50% {
    transform: translateZ(50px) translateY(-20px);
  }
}

@keyframes buttonGlow {
  0%,
  100% {
    opacity: 0;
    transform: translateX(-100%) translateZ(-1px);
  }

  50% {
    opacity: 1;
    transform: translateX(100%) translateZ(-1px);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-20px);
  }
}

@keyframes logoReveal {
  0% {
    opacity: 0;
    transform: translateY(-50px) rotateX(-90deg);
  }

  100% {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

@keyframes containerReveal {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

@keyframes loadingProgress {
  0% {
    transform: scaleX(0);
    filter: hue-rotate(0deg);
  }

  50% {
    filter: hue-rotate(180deg);
  }

  100% {
    transform: scaleX(1);
    filter: hue-rotate(360deg);
  }
}

@keyframes textFade {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* General Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: var(--font-primary);
  background-color: var(--background-dark);
  color: var(--text-color);
  line-height: 1.6;
  overflow: hidden;
}

/* Header & Navigation */
header {
  background-color: rgba(10, 10, 10, 0.95);
  padding: 0.5rem 0;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  border-bottom: 2px solid var(--accent-color);
}

nav {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 2rem;
}

.logo {
  width: 180px;
  display: flex;
  align-items: center;
}

.logo-text {
  color: var(--accent-color);
  font-weight: 800;
  font-family: var(--font-display);
  letter-spacing: 1px;
  font-size: 1.5rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 600;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 1px;
  padding: 0.5rem 1rem;
  border-radius: 3px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-links a:hover {
  color: var(--accent-color);
  background-color: rgba(255, 179, 71, 0.1);
}

.nav-links a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-color);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s ease;
}

.nav-links a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
}

/* Hero Section */
.hero {
  height: 100vh;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
    url('https://images.unsplash.com/photo-1534423861386-85a16f5d13fd');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 60px;
  position: relative;
  overflow: hidden;
  perspective: 1000px;
  opacity: 0;
  transform: translateY(50px);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero.loaded {
  opacity: 1;
  transform: translateY(0);
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0h100v100H0z' fill='none'/%3E%3Cpath d='M0 0l50 50-50 50M100 0L50 50l50 50' stroke='rgba(255,179,71,0.1)' stroke-width='0.5'/%3E%3C/svg%3E");
  opacity: 0.1;
}

.hero-content {
  max-width: 800px;
  padding: 2rem;
  position: relative;
  z-index: 1;
  transform-style: preserve-3d;
  animation: heroFloat 6s ease-in-out infinite;
}

.hero h1 {
  font-size: 4.5rem;
  margin-bottom: 1rem;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.3);
}

.hero p {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  font-family: var(--font-display);
  letter-spacing: 1px;
}

.player-count {
  font-size: 1.2rem;
  margin-bottom: 2rem;
  color: var(--accent-color);
}

.play-now {
  background-color: var(--accent-color);
  color: var(--background-dark);
  padding: 1rem 3rem;
  border: none;
  border-radius: 3px;
  font-size: 1.2rem;
  font-weight: bold;
  font-family: var(--font-display);
  text-transform: uppercase;
  letter-spacing: 2px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  transform-style: preserve-3d;
}

.play-now::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
  transform: translateZ(-1px);
  animation: buttonGlow 2s ease-in-out infinite;
}

.play-now:hover,
.buy-btn:hover,
.store-category-btn:hover,
.create-post-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 20px rgba(255, 179, 71, 0.3);
}

/* Features Section */
.feature-card,
.news-card,
.store-item {
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.feature-card:hover,
.news-card:hover,
.store-item:hover {
  transform: translateY(-10px) scale(1.05);
  box-shadow: 0 20px 30px rgba(255, 179, 71, 0.2);
}

.features {
  padding: 6rem 2rem;
  background-color: var(--background-light);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
}

.feature-card {
  text-align: center;
  padding: 2.5rem;
  background-color: var(--primary-color);
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
}

.feature-card i {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  transform: translateZ(30px);
}

.feature-card h3 {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  letter-spacing: 1px;
  color: var(--accent-color);
}

/* News Section */
.news {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
  background-color: var(--background-dark);
}

.news h2 {
  text-align: center;
  margin-bottom: 3rem;
  font-family: var(--font-display);
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 2px;
}

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2.5rem;
}

.news-card {
  background-color: var(--background-light);
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(255, 179, 71, 0.1);
  transform-style: preserve-3d;
  perspective: 1000px;
}

.news-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.3s ease;
  transform-origin: center center;
}

.news-card:hover img {
  transform: scale(1.05) translateZ(20px);
}

.news-card-content {
  padding: 2rem;
}

.news-card h3 {
  margin-bottom: 1rem;
  font-family: var(--font-display);
  color: var(--accent-color);
}

.news-card p {
  color: #aaa;
  margin-bottom: 1rem;
}

/* Generic Section Styles */
.hidden {
  display: none;
}

.wiki-section,
.forums-section,
.store-section {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
  min-height: 500px;
  background-color: var(--background-light);
  position: relative;
  z-index: 1;
}

.section-active {
  display: block;
}

/* Wiki Section Styles */
.wiki-search {
  margin-bottom: 2rem;
  display: flex;
  gap: 1rem;
}

.wiki-search input {
  flex: 1;
  padding: 0.8rem;
  border: 1px solid var(--accent-color);
  background: var(--background-dark);
  color: var(--text-color);
  border-radius: 3px;
}

.wiki-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.wiki-category {
  background: var(--background-dark);
  padding: 1.5rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
}

.wiki-category h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.wiki-category ul {
  list-style: none;
}

.wiki-category li {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

/* Forums Section Styles */
.forum-categories {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.forum-category {
  background: var(--background-dark);
  padding: 1.5rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
}

.forum-category h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
}

.forum-post {
  padding: 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
}

.forum-post:hover {
  background: rgba(255, 179, 71, 0.05);
}

.create-post-btn {
  padding: 0.8rem 1.5rem;
  background: var(--accent-color);
  border: none;
  border-radius: 3px;
  color: var(--background-dark);
  cursor: pointer;
  margin-top: 2rem;
}

/* Store Section Styles */
.gallery-controls {
  margin-bottom: 2rem;
}

.store-categories {
  display: flex;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.store-category-btn {
  padding: 0.8rem 1.5rem;
  background: var(--background-dark);
  border: 1px solid var(--accent-color);
  color: var(--text-color);
  border-radius: 3px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.store-category-btn.active,
.store-category-btn:hover {
  background: var(--accent-color);
  color: var(--background-dark);
}

.store-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 2rem;
}

.store-item {
  background: var(--background-dark);
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
  overflow: hidden;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.store-item a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.store-item-image {
  width: 100%;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.store-item-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.store-item-content {
  padding: 1.5rem;
}

.store-item-price {
  color: var(--accent-color);
  font-weight: bold;
  margin-top: 1rem;
}

.buy-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--accent-color);
  border: none;
  border-radius: 3px;
  color: var(--background-dark);
  cursor: pointer;
  margin-top: 1rem;
}

.store-item-image i {
  transform: translateZ(20px);
  transition: all 0.3s ease;
}

.store-item:hover .store-item-image i {
  transform: translateZ(40px) scale(1.1);
}

/* Order Section Styles */
.order-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.order-form-container {
  background: var(--background-dark);
  padding: 2rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
  margin-bottom: 2rem;
  width: 80%;
  max-width: 700px;
}

.order-form-container h3 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
  text-align: center;
}

.order-form {
  display: flex;
  flex-direction: column;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-color);
}

.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="email"],
.form-group textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--accent-color);
  background: var(--primary-color);
  color: var(--text-color);
  border-radius: 3px;
  font-family: var(--font-primary);
  font-size: 1rem;
}

.form-group textarea {
  resize: vertical;
}

.contact-info-container {
  display: flex;
  justify-content: space-around;
  width: 80%;
  max-width: 700px;
  flex-wrap: wrap;
  gap: 2rem;
}

.contact-details,
.free-quote {
  background: var(--background-dark);
  padding: 2rem;
  border-radius: 5px;
  border: 1px solid rgba(255, 179, 71, 0.1);
  flex: 1;
  min-width: 250px;
}

.contact-details h3,
.free-quote h3 {
  color: var(--accent-color);
  margin-bottom: 1rem;
  text-align: center;
}

.contact-details p,
.free-quote p {
  color: var(--text-color);
  margin-bottom: 0.8rem;
  text-align: center;
}

.free-quote p:last-child {
  font-weight: bold;
}

/* Footer */
footer {
  background-color: var(--primary-color);
  padding: 4rem 2rem 2rem;
  border-top: 2px solid var(--accent-color);
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
}

.footer-section h4 {
  margin-bottom: 1rem;
  color: var(--accent-color);
}

.footer-section a {
  display: block;
  color: var(--text-color);
  text-decoration: none;
  margin-bottom: 0.5rem;
  transition: color 0.3s ease;
}

.footer-section a:hover {
  color: var(--accent-color);
}

.footer-bottom {
  max-width: 1400px;
  margin: 2rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid #444;
  text-align: center;
  color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero p {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .store-categories {
    flex-direction: column;
  }

  .store-category-btn {
    width: 100%;
  }
}

/* CSS for the popup */
.item-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  overflow: auto;
}

.item-popup-content {
  background-color: var(--background-light);
  border: 1px solid rgba(255, 179, 71, 0.1);
  border-radius: 5px;
  text-align: left;
  width: 70%;
  max-width: 900px;
  margin: 20px;
  padding: 20px;
  box-sizing: border-box;
}

.item-popup-header {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 179, 71, 0.1);
  padding-bottom: 20px;
}

.item-image-container {
  width: 40%;
  padding-right: 20px;
  box-sizing: border-box;
}

.item-popup-image {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
  border-radius: 5px;
  margin-bottom: 10px;
}

.image-gallery {
  display: flex;
  overflow-x: auto;
  margin-top: 10px;
}

.gallery-thumbnail {
  width: 70px;
  height: 70px;
  object-fit: cover;
  border: 1px solid #ddd;
  border-radius: 3px;
  margin-right: 5px;
  cursor: pointer;
}

.item-info {
  width: 60%;
  padding-left: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.item-info h3 {
  color: var(--accent-color);
  margin-bottom: 5px;
}

.item-rating {
  color: #ffc107;
  margin-bottom: 10px;
}

.item-price {
  font-size: 1.5em;
  color: var(--accent-color);
  margin-bottom: 15px;
}

.add-to-cart,
.buy-with {
  background-color: var(--accent-color);
  color: var(--background-dark);
  padding: 10px 15px;
  border: none;
  border-radius: 3px;
  font-size: 1em;
  cursor: pointer;
  margin-bottom: 10px;
  width: 100%;
  transition: background-color 0.3s;
}

.add-to-cart:hover,
.buy-with:hover {
  background-color: #e0a030;
}

.item-description {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 179, 71, 0.1);
  padding-bottom: 20px;
}

.item-description h4 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.item-description p {
  color: var(--text-color);
  line-height: 1.6;
}

.frequently-bought-together,
.this-item {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 179, 71, 0.1);
  padding-bottom: 20px;
}

.frequently-bought-together h4,
.this-item h4 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.bought-items p,
.this-item p {
  color: var(--text-color);
  margin-bottom: 5px;
}

.total-price {
  font-weight: bold;
  margin-top: 10px;
}

.item-reviews {
  margin-bottom: 20px;
  border-bottom: 1px solid rgba(255, 179, 71, 0.1);
  padding-bottom: 20px;
}

.item-reviews h4 {
  color: var(--accent-color);
  margin-bottom: 10px;
}

.item-reviews p {
  color: var(--text-color);
  margin-bottom: 5px;
}

.review-distribution {
  margin-top: 10px;
}

.review-distribution p {
  color: var(--text-color);
  margin-bottom: 3px;
}

.item-buttons {
  text-align: center;
}

.close-popup {
  background-color: #6c757d;
  color: white;
  padding: 8px 12px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.close-popup:hover {
  background-color: #5a6268;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .item-popup-content {
    width: 90%;
    margin: 10px;
    padding: 15px;
  }

  .item-popup-header {
    flex-direction: column;
  }

  .item-image-container,
  .item-info {
    width: 100%;
    padding: 0;
  }

  .item-info {
    margin-top: 10px;
  }

  .image-gallery {
    flex-wrap: wrap;
  }

  .gallery-thumbnail {
    width: calc(33.33% - 5px);
    margin-bottom: 5px;
  }
}

.add-to-cart-message {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: var(--accent-color);
  color: var(--background-dark);
  padding: 10px 20px;
  border-radius: 5px;
  z-index: 1001;
}

/* Fade-out */
.fade-out {
  opacity: 0;
  transition: opacity 0.5s ease;
}

/* Cart-transition */
.cart-transition {
  transition: all 1s ease-in-out;
  transform: scale(1.2);
  color: var(--accent-color);
  text-shadow: 0 0 10px rgba(255, 179, 71, 0.5);
}

/* Animations on Scroll */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(50px) rotateX(-10deg);
  transition: all 0.8s cubic-bezier(0.17, 0.85, 0.438, 0.99);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0) rotateX(0);
}

/* Floating Animation */
.float-animation {
  animation: float 6s ease-in-out infinite;
}

/* Parallax Section */
.parallax-section {
  transform-style: preserve-3d;
  transform: translateZ(-1px) scale(2);
  z-index: -1;
}

/* Card Tilt Effect */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
}

/* Loading Animation Styles */
.loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--background-dark);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-screen.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loading-content {
  text-align: center;
  perspective: 1000px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 400px;
  margin: 0 auto;
  padding: 0 20px;
}

.loading-logo {
  font-size: 4rem;
  font-family: var(--font-display);
  color: var(--accent-color);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(-50px) rotateX(-90deg);
  animation: logoReveal 1.5s ease-out forwards;
}

.loading-bar-container {
  width: 100%;
  height: 4px;
  background: rgba(255, 179, 71, 0.1);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  transform: scaleX(0);
  animation: containerReveal 0.5s ease-out 0.5s forwards;
}

.loading-bar {
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 100%;
  background: var(--accent-color);
  transform-origin: left;
  animation: loadingProgress 2s ease-in-out;
}

.loading-text {
  margin-top: 1rem;
  color: var(--text-color);
  font-family: var(--font-display);
  opacity: 0;
  animation: textFade 2s ease-out 0.5s forwards;
}