:root {
  --primary-bg: #0f0f0f;           /* your executor dark bg */
  --secondary-bg: #1a1a1a;
  --accent-color: #5D7091;         /* new accent (was purple) */
  --accent-hover: #335587;         /* slightly darker on hover */
  --text-color: #e2e2e2;
  --text-secondary: #888888;
  --card-bg: #1c1c1c;
  --card-border: #252525;
  --toast-success: rgba(34, 197, 94, 0.9);
  --toast-error: rgba(239, 68, 68, 0.9);
}

/* Base Styles */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--accent-color) var(--primary-bg);
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: var(--primary-bg);
  color: var(--text-color);
  width: 710px;
  height: 542px;
  overflow: hidden;
}

.container {
  width: 100%;
  height: 100%;
  padding: 0.8rem;
  overflow-y: auto;
}

/* Header & Stats */
.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4rem 0;
  margin-bottom: 0.8rem;
}

.stats {
  display: flex;
  gap: 0.8rem;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
}

.stat-item i {
  font-size: 0.8rem;
  color: var(--accent-color);
}

/* Search Box */
.search-container {
  position: relative;
  width: 100%;
  margin-bottom: 0.8rem;
}

.search-wrapper {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.input-container {
  position: relative;
  flex: 1;
}

.search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-secondary);
  font-size: 0.75rem;
  z-index: 2;
}

#searchInput {
  width: 100%;
  padding: 0.5rem 0.7rem 0.5rem 2rem;
  border-radius: 5px;
  background: var(--secondary-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

#searchInput:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(192, 188, 206, 0.2);
}

.pagination {
  display: flex;
  gap: 0.3rem;
}

.pagination button {
  width: 30px;
  height: 30px;
  border-radius: 5px;
  background: var(--secondary-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-color);
  cursor: pointer;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.pagination button:not(:disabled):hover {
  background: var(--accent-color);
  transform: translateY(-1px);
}

.pagination button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Script Cards */
.scripts-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.7rem;
  padding: 0.4rem 0;
}

.script-card {
  background: var(--card-bg);
  border-radius: 6px;
  padding: 0.8rem;
  border: 1px solid var(--card-border);
  transition: all 0.2s ease;
  position: relative;
}

.script-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.script-card img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.script-info h3 {
  font-size: 0.85rem;
  margin-bottom: 0.3rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.script-description {
  color: var(--text-secondary);
  font-size: 0.7rem;
  margin: 0.3rem 0;
  line-height: 1.4;
}

.script-badges {
  display: flex;
  gap: 0.3rem;
  flex-wrap: wrap;
  margin: 0.3rem 0;
}

.script-views {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  display: flex;
  align-items: center;
  gap: 0.2rem;
}

.script-views i {
  font-size: 0.6rem;
  color: var(--text-secondary);
}

.badge {
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.65rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}

.badge.verified {
  background: rgba(34, 197, 94, 0.1);
  color: #22c55e;
}

.badge.key-system {
  background: rgba(234, 179, 8, 0.1);
  color: #eab308;
}

.badge.universal {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-secondary);
}

.copy-btn {
  width: 100%;
  padding: 0.5rem;
  border-radius: 4px;
  background: var(--accent-color);
  color: #141414;
  border: none;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 500;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Loading Animations */
.website-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 720px;
  height: 422px;
  background: var(--primary-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

.website-loader.hide {
  opacity: 0;
  pointer-events: none;
}

.loader-animation {
  width: 40px;
  height: 40px;
  position: relative;
}

.loader-animation span {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: var(--accent-color);
  animation: spin 0.8s linear infinite;
}

.loader-animation span:nth-child(2) {
  border: 3px solid rgba(255, 255, 255, 0.05);
}

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

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 10px;
  right: 10px;
  z-index: 9999;
}

.toast {
  padding: 0.5rem 1rem 0.5rem 2.2rem;
  margin-bottom: 0.5rem;
  border-radius: 5px;
  color: white;
  font-size: 0.75rem;
  font-weight: 500;
  opacity: 0;
  transform: translateX(20px);
  transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  position: relative;
}

.toast::before {
  content: "";
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.toast.success {
  background: var(--toast-success);
}

.toast.error {
  background: var(--toast-error);
}

.toast.success::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.toast.error::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
}

.toast.show {
  opacity: 1;
  transform: translateX(0);
}

.toast.hide {
  opacity: 0;
  transform: translateY(-10px);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--primary-bg);
}

::-webkit-scrollbar-thumb {
  background: var(--accent-color);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-hover);
}

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