/* Gaming Studio CSS Variables */
:root {
  --primary-bg: #0a0a0f;
  --secondary-bg: #1a1a2e;
  --accent-bg: #16213e;
  --card-bg: #1e1e2e;
  --text-primary: #ffffff;
  --text-secondary: #b8b8b8;
  --accent-cyan: #00f5ff;
  --accent-purple: #8b5cf6;
  --accent-pink: #ff6b9d;
  --accent-orange: #ff8c42;
  --accent-green: #4ade80;
  --glow-cyan: rgba(0, 245, 255, 0.4);
  --glow-purple: rgba(139, 92, 246, 0.4);
  --border-glow: rgba(0, 245, 255, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
  --gradient-secondary: linear-gradient(135deg, var(--accent-purple), var(--accent-pink));
  --shadow-glow: 0 0 20px rgba(0, 245, 255, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  font-family: 'Exo 2', 'Roboto', sans-serif;
  background: var(--primary-bg);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Animated Background */
.bg-animation {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.floating-shapes {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.shape {
  position: absolute;
  background: var(--gradient-primary);
  border-radius: 50%;
  opacity: 0.1;
  animation: float 20s infinite linear;
}

.shape-1 {
  width: 80px;
  height: 80px;
  top: 20%;
  left: 10%;
  animation-delay: 0s;
}

.shape-2 {
  width: 60px;
  height: 60px;
  top: 50%;
  left: 80%;
  animation-delay: -5s;
}

.shape-3 {
  width: 100px;
  height: 100px;
  top: 80%;
  left: 20%;
  animation-delay: -10s;
}

.shape-4 {
  width: 40px;
  height: 40px;
  top: 30%;
  left: 70%;
  animation-delay: -15s;
}

.shape-5 {
  width: 120px;
  height: 120px;
  top: 10%;
  left: 50%;
  animation-delay: -8s;
}

@keyframes float {
  0% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-100px) rotate(180deg);
  }
  100% {
    transform: translateY(0px) rotate(360deg);
  }
}

#particleCanvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Gaming Header */
.game-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(26, 26, 46, 0.95);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-glow);
  z-index: 1000;
  transition: all 0.3s ease;
}

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

.logo-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo {
  position: relative;
  display: inline-block;
}

.logo-text {
  font-family: 'Orbitron', monospace;
  font-size: 1.8rem;
  font-weight: 900;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px var(--glow-cyan);
  position: relative;
  z-index: 2;
}

.logo-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  filter: blur(10px);
  opacity: 0.3;
  z-index: 1;
}

.tagline {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.2rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

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

.nav-btn {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.9rem;
}

.nav-btn::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: var(--accent-cyan);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav-btn:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.nav-btn:hover::before {
  clip-path: inset(0 0 0 0);
}

.power-button {
  position: relative;
  width: 40px;
  height: 40px;
  cursor: pointer;
}

.power-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  animation: pulse-ring 2s infinite;
}

.power-core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 10px var(--glow-cyan);
}

@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.2);
    opacity: 0;
  }
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
  max-width: 1400px;
  margin: 0 auto;
  gap: 4rem;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-title h1 {
  font-family: 'Orbitron', monospace;
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  position: relative;
}

.glitch {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glitch 2s infinite;
}

@keyframes glitch {
  0%, 100% {
    text-shadow: 2px 2px 0 var(--accent-cyan), -2px -2px 0 var(--accent-pink);
  }
  25% {
    text-shadow: -2px 2px 0 var(--accent-cyan), 2px -2px 0 var(--accent-pink);
  }
  50% {
    text-shadow: 2px -2px 0 var(--accent-cyan), -2px 2px 0 var(--accent-pink);
  }
  75% {
    text-shadow: -2px -2px 0 var(--accent-cyan), 2px 2px 0 var(--accent-pink);
  }
}

.hero-subtitle {
  margin-bottom: 2rem;
}

.typing-text {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  font-weight: 300;
  display: inline-block;
  position: relative;
}

.typing-text::after {
  content: '|';
  animation: blink 1s infinite;
  color: var(--accent-cyan);
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.game-button {
  position: relative;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  font-family: 'Exo 2', sans-serif;
}

.game-button.primary {
  background: var(--gradient-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-glow);
}

.game-button.secondary {
  background: transparent;
  color: var(--accent-cyan);
  border: 2px solid var(--accent-cyan);
}

.game-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 30px var(--glow-cyan);
}

.button-glow {
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.game-button:hover .button-glow {
  left: 100%;
}

.hero-visual {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  align-items: center;
}

.floating-card {
  position: relative;
  background: rgba(30, 30, 46, 0.8);
  border: 1px solid var(--border-glow);
  border-radius: 12px;
  padding: 1.5rem;
  backdrop-filter: blur(10px);
  animation: float-card 6s ease-in-out infinite;
  max-width: 250px;
}

@keyframes float-card {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.card-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.5rem;
}

.card-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.card-text {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
}

.card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  border-radius: 12px;
  filter: blur(20px);
  opacity: 0.1;
  z-index: -1;
}

/* Main Content */
.wrapper {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.section {
  padding: 1rem 0;
  position: relative;
}

.section-header {
  margin-bottom: 4rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 2rem;
  font-family: 'Orbitron', monospace;
  font-size: 2.5rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-primary);
}

.title-number {
  font-size: 1.5rem;
  color: var(--accent-cyan);
  opacity: 0.7;
}

.title-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.title-line {
  flex: 1;
  height: 2px;
  background: var(--gradient-primary);
  opacity: 0.3;
}

/* Game Grid */
.game-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.featured-grid {
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.game-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s ease;
  backdrop-filter: blur(10px);
}

.game-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-cyan);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 20px var(--glow-cyan);
}

.card-image {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

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

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

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.game-card:hover .card-overlay {
  opacity: 1;
}

.play-button {
  width: 80px;
  height: 80px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulse-play 2s infinite;
}

.play-icon {
  font-size: 2rem;
  color: white;
  margin-left: 4px;
}

@keyframes pulse-play {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 var(--glow-cyan);
  }
  70% {
    transform: scale(1.05);
    box-shadow: 0 0 0 10px rgba(0, 245, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(0, 245, 255, 0);
  }
}

.card-content {
  padding: 1.5rem;
}

.card-content h3 {
  font-family: 'Orbitron', monospace;
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.card-content p {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.card-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag {
  padding: 0.3rem 0.8rem;
  background: rgba(0, 245, 255, 0.1);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 245, 255, 0.3);
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.game-card .card-glow {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-primary);
  border-radius: 16px;
  filter: blur(30px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.game-card:hover .card-glow {
  opacity: 0.2;
}

/* Demo Showcase */
.demo-showcase {
  margin-bottom: 4rem;
  padding: 2rem;
  background: rgba(30, 30, 46, 0.5);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  backdrop-filter: blur(10px);
}

.demo-header {
  text-align: center;
  margin-bottom: 2rem;
}

.demo-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.demo-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
}

.demo-container {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.demo-frame {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 12px;
}

.demo-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  padding: 2rem;
  pointer-events: none;
}

.demo-instructions {
  color: var(--accent-cyan);
  font-weight: 500;
  text-align: center;
}

/* Gaming Modal */
.game-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  visibility: hidden;
  opacity: 0;
  transition: all 0.3s ease;
}

.game-modal.show {
  visibility: visible;
  opacity: 1;
}

.modal-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
}

.modal-content {
  position: relative;
  max-width: 1000px;
  width: 90%;
  max-height: 90vh;
  background: var(--card-bg);
  border: 1px solid var(--border-glow);
  border-radius: 16px;
  overflow-y: auto;
  box-shadow: 0 0 50px var(--glow-cyan);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.close-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 2px solid var(--accent-cyan);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.close-btn span {
  position: absolute;
  width: 20px;
  height: 2px;
  background: var(--accent-cyan);
  transform: rotate(45deg);
}

.close-btn span:nth-child(2) {
  transform: rotate(-45deg);
}

.close-btn:hover {
  background: var(--accent-cyan);
  box-shadow: 0 0 15px var(--glow-cyan);
}

.close-btn:hover span {
  background: var(--primary-bg);
}

.modal-header {
  padding: 2rem 2rem 1rem;
}

.modal-header h3 {
  font-family: 'Orbitron', monospace;
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.modal-header p {
  color: var(--accent-cyan);
  font-size: 1.1rem;
  font-weight: 500;
}

.modal-video {
  padding: 0 2rem;
}

.modal-video video {
  width: 100%;
  border-radius: 8px;
  box-shadow: var(--shadow-card);
}

.modal-body {
  padding: 2rem;
}

.modal-body p {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 2rem;
  font-size: 1rem;
}

.modal-stack {
  padding: 1rem;
  background: rgba(0, 245, 255, 0.05);
  border: 1px solid rgba(0, 245, 255, 0.2);
  border-radius: 8px;
}

.stack-label {
  color: var(--accent-cyan);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-right: 1rem;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  
  .hero-visual {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .header-container {
    padding: 1rem;
  }
  
  .game-nav ul {
    gap: 1rem;
  }
  
  .nav-btn {
    padding: 0.4rem 0.8rem;
    font-size: 0.8rem;
  }
  
  .hero-section {
    padding: 0 1rem;
  }
  
  .section-title {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .title-line {
    width: 100px;
    margin: 0 auto;
  }
  
  .game-grid {
    grid-template-columns: 1fr;
  }
  
  .featured-grid {
    grid-template-columns: 1fr;
  }
  
  .hero-actions {
    justify-content: center;
  }
  
  .demo-frame {
    height: 400px;
  }
  
  .modal-content {
    width: 95%;
    margin: 1rem;
  }
}

@media (max-width: 480px) {
  .wrapper {
    padding: 0 1rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .logo-text {
    font-size: 1.4rem;
  }
  
  .hero-title h1 {
    font-size: 2rem;
  }
  
  .typing-text {
    font-size: 1.2rem;
  }
  
  .section-title {
    font-size: 1.8rem;
  }
}

/* Utility Classes */
.text-glow {
  text-shadow: 0 0 10px var(--glow-cyan);
}

.border-glow {
  box-shadow: 0 0 15px var(--glow-cyan);
}

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

.fade-in-up {
  animation: fadeInUp 0.6s ease forwards;
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-cyan);
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  transform: translate(-50%, -50%);
}

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