:root {
  --primary: #9333ea;
  --primary-hover: #a855f7;
  --primary-light: rgba(147, 51, 234, 0.1);
  --background: #0a0a0a;
  --card: #121212;
  --card-hover: #1a1a1a;
  --foreground: #ffffff;
  --muted: #a1a1aa;
  --border: #262626;
  --border-hover: #404040;
  --radius: 0.5rem;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  background-color: var(--background);
  color: var(--foreground);
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

ul {
  list-style: none;
}

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

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

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

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

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

@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
}

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

@keyframes shimmer {
  0% {
    background-position: -100% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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

@keyframes spin-slow {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.fade-in {
  animation: fadeIn 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.fade-up {
  animation: fadeUp 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.fade-down {
  animation: fadeDown 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.fade-left {
  animation: fadeLeft 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.fade-right {
  animation: fadeRight 0.8s cubic-bezier(0.25, 0.1, 0.25, 1) forwards;
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounce 3s infinite;
}

.animate-pulse {
  animation: pulse 3s ease-in-out infinite;
}

.animate-spin-slow {
  animation: spin-slow 8s linear infinite;
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--primary) 0%,
    var(--primary-hover) 20%,
    var(--primary) 40%
  );
  background-size: 200% auto;
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* Header */
.site-header {
  background-color: rgba(10, 10, 10, 0.8);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 1.5rem 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
}

@media (min-width: 768px) {
  .header-content {
    flex-direction: row;
  }
}

.logo {
  margin-bottom: 1rem;
  cursor: pointer;
  transition: transform 0.5s ease;
}

.logo:hover {
  transform: translateY(-4px) rotate(1deg);
}

.logo h1 {
  font-size: 2.5rem;
  font-weight: bold;
}

.logo p {
  color: var(--muted);
  margin-top: 0.25rem;
  transition: color 0.5s ease;
}

.logo:hover p {
  color: var(--primary);
}

.social-links {
  display: flex;
  gap: 1.5rem;
}

.social-icon {
  font-size: 1.25rem;
  padding: 0.5rem;
  transition: all 0.5s ease;
}

.social-icon:hover {
  color: var(--primary);
  transform: scale(1.25) rotate(6deg);
  box-shadow: var(--shadow);
}

/* Hero Section */
.hero {
  text-align: center;
  padding: 3rem 0;
}

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

.category-filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2rem;
}

.filter-btn {
  background-color: var(--card);
  color: var(--foreground);
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  background-color: var(--primary-light);
  border-color: var(--primary);
}

.filter-btn.active {
  background-color: var(--primary);
  border-color: var(--primary);
}

/* Scripts Grid */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-bottom: 3rem;
}

.script-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.5s ease-in-out;
  position: relative;
  cursor: pointer;
}

.script-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(147, 51, 234, 0.2), transparent);
  opacity: 0;
  transition: all 0.7s ease;
}

.script-card:hover::after {
  opacity: 1;
  transform: translateX(-100%);
}

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

.script-image-container {
  position: relative;
  overflow: hidden;
}

.script-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.7s ease-in-out;
}

.script-card:hover .script-image {
  transform: scale(1.1) rotate(1deg);
}

.script-views {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  transition: all 0.3s ease;
}

.script-time {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.script-card:hover .script-views,
.script-card:hover .script-time {
  background-color: rgba(147, 51, 234, 0.3);
}

.image-gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

.script-content {
  padding: 1.25rem;
}

.script-badges {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius);
  font-size: 0.75rem;
  transition: all 0.3s ease;
}

.badge.category {
  border: 1px solid var(--primary);
  color: var(--primary);
  transition: transform 0.3s ease;
}

.badge.price {
  background-color: var(--card-hover);
  animation: pulse 3s ease-in-out infinite;
}

.badge.category:hover {
  transform: translateY(-3px);
}

.script-title {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  transition: color 0.3s ease;
}

.script-card:hover .script-title {
  color: var(--primary);
}

.script-description {
  color: var(--muted);
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.script-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
}

.view-details {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: all 0.5s ease;
}

.script-card:hover .view-details {
  color: var(--primary);
  transform: translateX(4px);
}

.arrow-icon {
  background-color: rgba(147, 51, 234, 0.1);
  border-radius: 50%;
  padding: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.5s ease;
}

.script-card:hover .arrow-icon {
  background-color: var(--primary-light);
  transform: translateX(3px) scale(1.1);
}

/* Script Detail Page */
.script-detail-container {
  padding: 2rem 0;
}

.back-button-container {
  margin-bottom: 1.5rem;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background-color: transparent;
  border: 1px solid var(--border);
  color: var(--foreground);
  border-radius: var(--radius);
  font-size: 0.875rem;
  transition: all 0.3s ease;
}

.back-button:hover {
  border-color: var(--primary);
  background-color: var(--primary-light);
  transform: translateX(-3px);
}

.back-button:active {
  transform: scale(0.97);
}

.script-details-header {
  margin-bottom: 2rem;
}

.script-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.script-meta span {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.875rem;
  transition: color 0.3s ease;
}

.script-meta span:hover {
  color: var(--primary);
}

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

@media (min-width: 992px) {
  .script-content-grid {
    grid-template-columns: 2fr 1fr;
  }
}

.script-info-card {
  background-color: var(--card);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: var(--shadow);
}

.script-info-card h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.script-info-card p {
  margin-bottom: 1rem;
}

.highlight {
  color: var(--primary);
  transition: color 0.3s ease;
}

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

.note {
  font-style: italic;
  color: var(--muted);
}

.code-toggle {
  border-top: 1px solid var(--border);
  margin-top: 1rem;
  padding-top: 1rem;
}

.code-container {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 1.5rem;
  animation: fadeIn 0.5s ease forwards;
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.4);
  padding: 0.75rem 1rem;
}

.code-display {
  max-height: 600px;
  overflow: auto;
  padding: 0.25rem;
}

.code-display pre {
  margin: 0;
  border-radius: var(--radius);
}

.script-sidebar-card {
  background-color: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.script-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform 1s ease;
}

.script-sidebar-card:hover .script-image {
  transform: scale(1.05);
}

.script-sidebar-content {
  padding: 1.5rem;
}

.script-price-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.script-price {
  font-size: 1.5rem;
  font-weight: bold;
}

.universal-badge {
  border: 1px solid var(--primary);
  color: var(--primary);
}

.copy-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem;
  background-color: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-weight: 500;
  cursor: pointer;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
}

.copy-button:hover {
  background-color: var(--primary-hover);
  box-shadow: var(--shadow);
}

.copy-button:active {
  transform: scale(0.97);
}

.share-section {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.share-section h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}

.share-buttons {
  display: flex;
  gap: 0.5rem;
}

.share-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 1.125rem;
  transition: all 0.3s ease;
}

.share-button:hover {
  border-color: var(--primary);
  color: var(--primary);
  background-color: var(--primary-light);
  transform: scale(1.1) rotate(6deg);
}

.related-scripts-section {
  margin-top: 3rem;
}

.related-scripts-section h2 {
  font-size: 1.75rem;
  margin-bottom: 1.5rem;
}

.related-scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Footer */
.site-footer {
  background-color: var(--card);
  border-top: 1px solid var(--border);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

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

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer-col {
  margin-bottom: 1.5rem;
}

.footer-col h3 {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.footer-col h4 {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.footer-col p {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.footer-social {
  display: flex;
  gap: 1rem;
  margin-top: 0.5rem;
}

.footer-social a {
  font-size: 1.25rem;
  transition: all 0.5s ease;
}

.footer-social a:hover {
  color: var(--primary);
  transform: scale(1.25) rotate(6deg);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col ul li a {
  color: var(--muted);
  transition: all 0.3s ease;
  display: inline-block;
}

.footer-col ul li a:hover {
  color: var(--primary);
  transform: translateX(4px);
}

.footer-bottom {
  text-align: center;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.footer-bottom p {
  color: var(--muted);
}

/* Utility Classes */
.button-pop:active {
  transform: scale(0.95);
}

.hover-lift {
  transition: transform 0.5s ease-in-out;
}

.hover-lift:hover {
  transform: translateY(-4px);
}

button {
  cursor: pointer;
  font-family: inherit;
  outline: none;
}