/* Reset et styles globaux */
* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
  line-height: 1.6;
  color: #ffffff;
  background-color: #0a0a0a;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 0;
  font-weight: 600;
}

p {
  margin-bottom: 1rem;
}

/* Links */
a {
  color: #667eea;
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: #764ba2;
  text-decoration: underline;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: #667eea;
  color: white;
}

.btn-primary:hover {
  background-color: #764ba2;
  transform: translateY(-2px);
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 1rem;
}

.mt-4 {
  margin-top: 1.5rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.mb-4 {
  margin-bottom: 1.5rem;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* Navigation */
.navbar {
  background: #0a0a0a;
  border-bottom: 1px solid #1f1f1f;
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.nav-brand h1 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  color: #9ca3af;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #ffffff;
}

/* Hero Section */
.hero-section {
  background: #0a0a0a;
  color: #ffffff;
  min-height: 90vh;
  align-items: center;
  justify-content: center;
  padding: 3rem;
}

.hero-container {
  margin: 0 auto;
  text-align: center;
  padding: 0 2rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-description {
  font-size: 1.25rem;
  line-height: 1.7;
  color: #d1d5db;
  margin-bottom: 3rem;
  margin-left: auto;
  margin-right: auto;
}

/* Code Section */
.code-section {
  margin: 3rem 0;
}

.code-block {
  background: transparent;
  border: none;
  padding: 0;
  position: relative;
  margin-bottom: 1rem;
  text-align: center;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* Script Loader Container (style matching dashboard) */
.script-loader-container {
  display: flex;
  align-items: center;
  background: #111827;
  border: 1px solid #374151;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  gap: 0.5rem;
  transition: border-color 0.3s ease;
}

.script-loader-container:focus-within {
  border-color: #667eea;
}

.script-loader-display {
  flex: 1;
  padding: 0.5rem;
  font-family: 'Courier New', monospace;
  font-size: 0.95rem;
  overflow-x: auto;
  white-space: nowrap;
}

.script-loader-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.code-function {
  color: #a78bfa;
}

.code-punctuation {
  color: #e5e7eb;
}

.code-keyword {
  color: #c084fc;
}

.code-string {
  color: #d8b4fe;
}

.script-loader-copy {
  background: #374151;
  border: none;
  color: #9ca3af;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.script-loader-copy:hover {
  background: #4b5563;
  color: #ffffff;
}

.script-loader-copy:active {
  transform: scale(0.95);
}

.eye-icon,
.copy-icon {
  width: 20px;
  height: 20px;
}

.code-function {
  color: #a78bfa;
}

.code-punctuation {
  color: #e5e7eb;
}

.code-keyword {
  color: #c084fc;
}

.code-string {
  color: #d8b4fe;
}

.copy-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #374151;
  border: none;
  color: #9ca3af;
  padding: 0.5rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.copy-btn:hover {
  background: #4b5563;
  color: #ffffff;
}

.code-description {
  color: #9ca3af;
  font-size: 0.95rem;
  margin-top: 1rem;
  text-align: center;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}

/* Section Titles */
.section-title {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-size: 2rem;
  font-weight: 600;
  text-align: center;
  margin: 4rem 0 2rem 0;
}

/* Games Section */
.games-section {
  margin: 4rem 0;
  padding: 0 1rem;
}

.games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
  justify-content: center;
}

/* Card Style - Matching the image */
.card {
  background: #1a1a2e;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  position: relative;
  z-index: 1;
  background: rgba(45, 45, 70, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  margin-top: 180px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.card-content h3 {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-align: center;
}

.card-content ul {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}

.card-content li {
  color: #d1d5db;
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
  position: relative;
  padding-left: 1rem;
  text-align: left;
}

.card-content li:before {
  content: '•';
  color: #8b5cf6;
  font-weight: bold;
  position: absolute;
  left: 0;
}

.play-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
  color: #ffffff;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  text-transform: capitalize;
  margin-top: auto;
}

.play-btn:hover {
  background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
  color: #ffffff;
  text-decoration: none;
}

/* Features Section */
.features-section {
  margin: 4rem 0;
}

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

.feature-card {
  background: #1f1f1f;
  border: 1px solid #374151;
  border-radius: 12px;
  padding: 2rem;
  text-align: center;
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: #667eea;
}

.feature-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.feature-card p {
  color: #9ca3af;
  line-height: 1.6;
  margin: 0;
}

/* Footer */
.footer {
  background: #0a0a0a;
  border-top: 1px solid #1f1f1f;
  padding: 2rem 0;
}

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

.footer p {
  color: #6b7280;
  margin: 0;
  font-size: 0.9rem;
}

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

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

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

  .hero-description {
    font-size: 1.1rem;
  }

  .games-section {
    padding: 0 1rem;
  }

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

  .code-block {
    padding: 1.5rem;
    margin: 0 1rem 1rem 1rem;
  }

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

  .nav-links {
    gap: 1rem;
  }
}