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

:root {
  /* Dark theme (default) */
  --bg-primary: #0a0a0a;
  --bg-secondary: #111111;
  --bg-card: rgba(17, 17, 17, 0.8);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --accent-primary: #00ff9f;
  --accent-secondary: #ff6b6b;
  --accent-tertiary: #4ecdc4;
  --accent-warning: #ffd93d;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow-glow: 0 0 20px rgba(0, 255, 159, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
  --theme-icon: "🌙";
  --hover-card: rgba(0, 0, 0, 0.8);
}

[data-theme="light"] {
  /* Light theme */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-glass: rgba(0, 0, 0, 0.05);
  --accent-primary: #059669;
  --accent-secondary: #dc2626;
  --accent-tertiary: #0891b2;
  --accent-warning: #d97706;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --text-muted: #9ca3af;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.3);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.1);
  --theme-icon: "☀️";
  --hover-card: rgba(255, 255, 255, 0.8);
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Theme toggle button */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: var(--bg-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--text-primary);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-card);
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: var(--shadow-glow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

.theme-toggle::before {
  content: var(--theme-icon);
  animation: spin 0.6s ease-in-out;
}

@keyframes spin {
  0% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(180deg) scale(1.2);
  }
  100% {
    transform: rotate(360deg) scale(1);
  }
}

/* Light theme specific adjustments */
[data-theme="light"] .bg-animation::before {
  background: radial-gradient(
      circle at 20% 50%,
      rgba(5, 150, 105, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(220, 38, 38, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(8, 145, 178, 0.1) 0%,
      transparent 50%
    );
}

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

.bg-animation::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 50%,
      rgba(0, 255, 159, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 107, 107, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 80%,
      rgba(78, 205, 196, 0.1) 0%,
      transparent 50%
    );
  animation: float 20s ease-in-out infinite;
}

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

/* Header */
header {
  text-align: center;
  padding: 80px 20px 60px;
  position: relative;
  background: linear-gradient(135deg, var(--bg-secondary) 0%, transparent 100%);
}

.header-content h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin-bottom: 20px;
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-tertiary)
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    filter: drop-shadow(0 0 10px rgba(0, 255, 159, 0.5));
  }
  to {
    filter: drop-shadow(0 0 20px rgba(0, 255, 159, 0.8));
  }
}

.header-content p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 40px;
  flex-wrap: wrap;
}

.stat-item {
  text-align: center;
  padding: 20px;
  background: var(--bg-glass);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Main content */
main {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 60px;
}

.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 30px;
  margin-top: 40px;
}

.script-card {
  background: var(--bg-card);
  border-radius: 16px;
  padding: 30px;
  border: 1px solid var(--border-color);
  backdrop-filter: blur(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.script-card::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background-color: var(--hover-card);
  border-radius: 16px;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: -1;
}

.script-card:hover::before {
  opacity: 1;
}

.script-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card);
}

.script-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 15px;
}

.script-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-primary);
}

.script-type {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-tertiary)
  );
  color: var(--bg-primary);
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
}

.script-description {
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.script-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--accent-primary),
    var(--accent-tertiary)
  );
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--bg-glass);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  box-shadow: var(--shadow-glow);
}

.code-block {
  background: var(--bg-secondary);
  border-radius: 12px;
  margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  display: none;
  animation: slideDown 0.3s ease-out;
}

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

.code-header {
  background: var(--bg-glass);
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.code-title {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.copy-btn {
  background: none;
  border: none;
  color: var(--accent-primary);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: background 0.2s;
}

.copy-btn:hover {
  background: var(--bg-glass);
}

.code-content {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  padding: 20px;
  overflow-x: auto;
}

/* Responsive design */
@media (max-width: 768px) {
  .scripts-grid {
    grid-template-columns: 1fr;
  }

  .stats {
    gap: 20px;
  }

  .script-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .script-actions {
    width: 100%;
  }

  .btn {
    flex: 1;
    justify-content: center;
  }

  .theme-toggle {
    width: 50px;
    height: 50px;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
  }
}

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Terminal-like cursor */
.cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--accent-primary);
  animation: blink 1s infinite;
}

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

/*Foooter*/

footer {
  display: flex;
  justify-content: center;
  background-color: var(--hover-card);
}

#lien-footer {
  text-decoration: none;
  color: var(--text-primary);
}
