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

body {
  font-family: 'Nunito', sans-serif;
  background: #f5f7fa;
  min-height: 100vh;
  overflow-x: hidden;
  color: #1f2937;
}

/* Loading */
.loading-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  gap: 20px;
}

.spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Header */
.header {
  text-align: center;
  padding: 48px 20px 36px;
  background: #ffffff;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.06);
}

.header-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-bottom: 16px;
  gap: 12px;
}

.language-switcher {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.language-button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.language-button:hover {
  background: #f8fafc;
  color: #0f172a;
}

.language-button.active {
  background: linear-gradient(135deg, #667eea 0%, #60a5fa 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.28);
}

.header h1 {
  font-size: 48px;
  font-weight: 800;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header p {
  font-size: 18px;
  color: #4b5563;
  font-weight: 500;
}

/* Container */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 48px 20px 60px;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 30px;
  text-align: center;
}

/* Filter Tabs */
.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 10px 24px;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 25px;
  color: #475569;
  cursor: pointer;
  transition: all 0.3s;
  font-weight: 600;
  font-size: 14px;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
}

.filter-tab:hover {
  background: #f8fafc;
  color: #0f172a;
}

.filter-tab.active {
  background: linear-gradient(135deg, #667eea 0%, #60a5fa 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 24px rgba(102, 126, 234, 0.3);
}

/* Scripts Grid */
.scripts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.script-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 16px;
  padding: 30px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.script-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.script-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 55px rgba(15, 23, 42, 0.12);
}

.script-card:hover::before {
  transform: scaleX(1);
}

.script-card.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.script-card.disabled:hover {
  transform: none;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.08);
}

.card-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #667eea 0%, #60a5fa 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 28px;
  color: white;
}

.card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 10px;
  color: #0f172a;
}

.card-description {
  font-size: 15px;
  color: #4b5563;
  line-height: 1.6;
  margin-bottom: 20px;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-status {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #0f766e;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.card-status.coming-soon {
  background: rgba(245, 158, 11, 0.16);
  color: #b45309;
}

.card-category {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 600;
}

/* Test Frame */
.test-frame {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.65);
  z-index: 1000;
  backdrop-filter: blur(5px);
  box-sizing: border-box;
  padding: 20px;
}

.test-frame.active {
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.test-content {
  position: relative;
  width: min(1280px, 100%);
  height: 100%;
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(15, 23, 42, 0.22);
}

.test-header {
  position: absolute;
  top: 20px;
  left: 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
  z-index: 10;
  background: rgba(248, 250, 252, 0.94);
  backdrop-filter: blur(12px);
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  width: auto;
  max-width: calc(100% - 40px);
}

.test-title {
  font-size: 20px;
  font-weight: 700;
  text-align: left;
  color: #0f172a;
}

.close-btn {
  order: -1;
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.38);
  color: #b91c1c;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Nunito', sans-serif;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.close-btn:hover {
  background: rgba(248, 113, 113, 0.28);
}

.iframe-container {
  width: 100%;
  height: 100%;
  border: none;
}

/* Footer */
.footer {
  text-align: center;
  padding: 36px 20px 48px;
  color: #64748b;
  font-size: 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: #ffffff;
}

.footer a {
  color: #6366f1;
  text-decoration: none;
  font-weight: 600;
}

.footer a:hover {
  text-decoration: underline;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #94a3b8;
}

.empty-state i {
  font-size: 64px;
  margin-bottom: 20px;
  opacity: 0.35;
}

.empty-state p {
  font-size: 18px;
}

/* Transitions */
.fade-enter-active, .fade-leave-active {
  transition: opacity 0.3s;
}
.fade-enter-from, .fade-leave-to {
  opacity: 0;
}