@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@400;600&family=Orbitron:wght@700&display=swap');/* ===== ГЛОБАЛЬНЫЙ СБРОС ВНУТРИ КОМПОНЕНТА ===== */
.landing-page *,
.landing-page *::before,
.landing-page *::after {
  box-sizing: border-box;
}

/* ===== БАЗОВЫЕ ПЕРЕМЕННЫЕ ===== */
.landing-page {
  --primary: #00a3ff;
  --primary-glow: rgba(0, 163, 255, 0.4);
  --accent: #00ff9d;
  --accent-glow: rgba(0, 255, 157, 0.4);
  --bg-dark: #0a0f1a;
  --bg-card: rgba(15, 23, 42, 0.6);
  --text-primary: #e2e8f0;
  --text-secondary: #94a3b8;
  --border: rgba(148, 163, 184, 0.2);
  
  min-height: 100dvh; /* ✅ Динамическая высота для мобильных браузеров */
  background: linear-gradient(135deg, var(--bg-dark) 0%, #111827 50%, #0f172a 100%);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden; /* ✅ Защита от горизонтального скролла */
}

.landing-content {
  max-width: 1200px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.5rem;
}

/* ===== БРЕНД ===== */
.brand {
  text-align: center;
  animation: fadeInDown 0.6s ease;
  width: 100%;
}

.brand-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 0 30px var(--primary-glow);
  word-wrap: break-word; /* ✅ Не вылезет за края */
  line-height: 1.2;
}

.brand-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
  line-height: 1.4;
}

/* ===== ГЕРОЙ-СЕКЦИЯ ===== */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2rem;
  align-items: center;
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.pc-illustration {
  position: relative;
  width: 100%;
  max-width: 180px;
  aspect-ratio: 1 / 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.pc-illustration .icon {
  font-size: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
  cursor: default;
}

.pc-illustration .icon:hover {
  transform: scale(1.1) translateY(-4px);
  text-shadow: 0 0 15px var(--accent-glow);
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.hero-text h2 {
  font-size: 1.7rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.hero-text p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

/* ===== CTA: КНОПКА НАЧАТЬ ===== */
.cta-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
  width: 100%;
  animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-start {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  max-width: 320px;
  padding: 0.9rem 1.5rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: #0a0f1a;
  background: linear-gradient(135deg, var(--accent), #00cc7a);
  border: 2px solid var(--accent);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
  box-shadow: 0 6px 25px var(--accent-glow);
  text-decoration: none;
}

.btn-start:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 35px var(--accent-glow);
  border-color: #00ff9d;
}

.btn-start:active {
  transform: translateY(0);
}

.btn-arrow {
  font-size: 1.1rem;
  transition: transform 0.2s ease;
}

.btn-start:hover .btn-arrow {
  transform: translateX(4px);
}

.hint {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  opacity: 0.85;
  text-align: center;
  padding: 0 0.5rem;
}

/* ===== ФИЧИ ===== */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  width: 100%;
  max-width: 900px;
  animation: fadeInUp 0.8s ease 0.6s both;
}

.feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  gap: 0.6rem;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.feature:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}

.feature-icon {
  font-size: 1.8rem;
  flex-shrink: 0;
}

.feature h3 {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.3;
}

.feature p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  margin: 0;
  line-height: 1.5;
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-15px); }
  to { opacity: 1; transform: translateY(0); }
}

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

/* ===== MOBILE: < 768px ===== */
@media (max-width: 768px) {
  .landing-page { padding: 1.5rem 0.75rem; align-items: flex-start; }
  
  .brand-title { font-size: 1.9rem; }
  .hero { grid-template-columns: 1fr; text-align: center; gap: 1.5rem; }
  .hero-text h2 { font-size: 1.4rem; }
  
  .features { grid-template-columns: 1fr; gap: 1rem; }
  .feature {
    padding: 1rem;
    flex-direction: row;
    text-align: left;
    justify-content: flex-start;
    gap: 0.875rem;
  }
  .feature-icon { font-size: 1.4rem; margin-top: 2px; }
  .feature h3, .feature p { text-align: left; }
}

/* ===== MOBILE: <= 375px (iPhone SE/mini) ===== */
@media (max-width: 375px) {
  .landing-page { padding: 1rem 0.5rem; }
  .landing-content { gap: 1.75rem; }
  
  .brand-title { font-size: 1.6rem; line-height: 1.25; }
  .brand-subtitle { font-size: 0.9rem; }
  
  .pc-illustration { max-width: 140px; padding: 0.75rem; gap: 0.5rem; }
  .pc-illustration .icon { font-size: 1.4rem; }
  
  .hero-text h2 { font-size: 1.25rem; }
  .hero-text p { font-size: 0.875rem; }
  
  .btn-start {
    max-width: 100%;
    padding: 0.875rem 1rem;
    font-size: 1rem;
  }
  
  .hint { font-size: 0.8rem; }
  
  .feature { padding: 0.875rem; gap: 0.6rem; }
  .feature-icon { font-size: 1.2rem; }
  .feature h3 { font-size: 0.9rem; }
  .feature p { font-size: 0.8rem; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .btn-start:hover, .feature:hover, .pc-illustration .icon:hover {
    transform: none !important;
  }
}
  .error-container {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top, #0f2027, #0a0a0a);
    color: white;
  }

  .error-box {
    text-align: center;
    padding: 40px;
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 157, 0.2);
    box-shadow: 0 0 40px rgba(0, 255, 157, 0.2);
    animation: fadeIn 0.8s ease;
  }

  .error-code {
    font-size: 80px;
    font-family: 'Orbitron', sans-serif;
    background: linear-gradient(135deg, #00FF9D, #00A3FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
  }

  .error-title {
    font-size: 24px;
    margin-top: 10px;
  }

  .error-subtitle {
    color: #aaa;
    margin-bottom: 20px;
  }

  .emoji {
    font-size: 40px;
    margin-bottom: 20px;
    animation: float 2s infinite ease-in-out;
  }

  .btn-home {
    padding: 10px 20px;
    border: none;
    border-radius: 999px;
    background: transparent;
    color: #00ff9d;
    border: 2px solid #00ff9d;
    cursor: pointer;
    transition: all 0.3s ease;
  }

  .btn-home:hover {
    background: rgba(0,255,157,0.2);
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(0,255,157,0.6);
  }
  
  /* Анимации */
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: translateY(30px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes float {
    0% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0); }
  }
/* ── Auth Layout ── */
.auth-page .header {
  padding: 24px 0;
  text-align: center;
  border-bottom: 1px solid rgba(0, 163, 255, 0.2);
  margin-bottom: 40px;
}

.auth-page .header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(18px, 2.5vw, 28px);
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-page .content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ── Card ── */
.auth-card {
  width: 100%;
  max-width: 400px;
  background-color: #1e1e1e;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.2);
}

/* ── Inputs ── */
.input-field {
  width: 100%;
  padding: 12px 16px;
  margin-bottom: 20px;
  border-radius: 8px;
  border: 1px solid #555;
  background-color: #2a2a2a;
  color: #fff;
}

/* ── Buttons ── */
.auth-page .btn {
  width: 100%;
}

/* ── Errors ── */
.error-msg {
  color: #dc3545;
  font-size: 14px;
  margin-top: 10px;
}<style scoped>
.profile-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(0,163,255,0.25), transparent 35%),
    radial-gradient(circle at bottom right, rgba(0,255,157,0.18), transparent 35%),
    linear-gradient(135deg, #0b1120, #111827 40%, #0f172a);
  color: white;
  overflow-x: hidden;
}

.profile-content {
  max-width: 1250px;
  margin: auto;
  padding: 30px 20px 80px;
}

/* HERO */

.hero-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 28px;

  padding: 34px;
  border-radius: 30px;

  background: rgba(255,255,255,0.06);

  backdrop-filter: blur(18px);

  border: 1px solid rgba(255,255,255,0.08);

  box-shadow:
    0 10px 40px rgba(0,0,0,0.35),
    inset 0 1px 0 rgba(255,255,255,0.05);

  overflow: hidden;

  margin-bottom: 34px;
}

.hero-card::before {
  content: '';
  position: absolute;

  width: 280px;
  height: 280px;

  background: radial-gradient(circle, rgba(0,163,255,0.25), transparent 70%);

  top: -140px;
  right: -120px;

  pointer-events: none;
}

.avatar {
  width: 110px;
  height: 110px;

  min-width: 110px;

  border-radius: 50%;

  background:
    linear-gradient(135deg, #00ff9d, #00a3ff);

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 44px;
  font-weight: 800;

  color: #0b1120;

  box-shadow:
    0 0 30px rgba(0,163,255,0.35);

  border: 4px solid rgba(255,255,255,0.15);
}

.hero-info {
  z-index: 2;
}

.hero-info h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: 0.5px;
}

.hero-info p {
  margin-top: 8px;
  color: #aab4c5;
  font-size: 15px;
}

.role-badge {
  margin-top: 18px;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 16px;

  border-radius: 999px;

  font-size: 13px;
  font-weight: 700;

  letter-spacing: 0.5px;

  border: 1px solid rgba(255,255,255,0.08);
}

.role-badge.admin {
  background: rgba(255,0,90,0.14);
  color: #ff4f87;
}

.role-badge.standard {
  background: rgba(0,255,157,0.12);
  color: #00ff9d;
}

/* STATS */

.stats-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(240px, 1fr));

  gap: 22px;

  margin-bottom: 34px;
}

.stat-card {
  position: relative;

  padding: 28px;

  border-radius: 26px;

  background: rgba(255,255,255,0.05);

  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(16px);

  overflow: hidden;

  transition:
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.stat-card::before {
  content: '';

  position: absolute;

  inset: 0;

  background:
    linear-gradient(
      135deg,
      rgba(255,255,255,0.06),
      transparent
    );

  pointer-events: none;
}

.stat-card:hover {
  transform: translateY(-8px);

  border-color: rgba(0,163,255,0.35);

  box-shadow:
    0 15px 35px rgba(0,0,0,0.25),
    0 0 30px rgba(0,163,255,0.15);
}

.stat-card .emoji {
  font-size: 36px;
}

.stat-card h3 {
  margin: 16px 0 10px;

  color: #aeb9cb;

  font-size: 15px;
  font-weight: 600;
}

.stat-card p {
  margin: 0;

  font-size: 38px;
  font-weight: 800;

  background: linear-gradient(135deg, #ffffff, #9ad7ff);

  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* PROFILE CARD */

.profile-card {
  background: rgba(255,255,255,0.05);

  border-radius: 28px;

  padding: 30px;

  margin-bottom: 34px;

  border: 1px solid rgba(255,255,255,0.08);

  backdrop-filter: blur(14px);

  box-shadow:
    0 10px 35px rgba(0,0,0,0.25);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 14px;

  margin-bottom: 24px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(20px, 4vw, 28px);
}

/* PROGRESS */

.progress-bar {
  height: 20px;

  border-radius: 999px;

  background: rgba(255,255,255,0.08);

  overflow: hidden;

  position: relative;
}

.progress-fill {
  height: 100%;

  border-radius: 999px;

  background:
    linear-gradient(
      90deg,
      #00ff9d,
      #00a3ff,
      #0066ff
    );

  position: relative;

  transition: width 0.5s ease;
}

.progress-fill::after {
  content: '';

  position: absolute;
  inset: 0;

  background:
    linear-gradient(
      120deg,
      transparent,
      rgba(255,255,255,0.4),
      transparent
    );

  animation: shine 2.5s infinite;
}

@keyframes shine {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.progress-text {
  margin-top: 14px;
  color: #9aa4b2;
}

/* QUIZ */

.quiz-history {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.quiz-item {
  display: flex;
  justify-content: space-between;
  align-items: center;

  gap: 16px;

  padding: 22px;

  border-radius: 22px;

  background: rgba(255,255,255,0.04);

  transition: 0.25s ease;

  border: 1px solid transparent;
}

.quiz-item:hover {
  transform: translateY(-4px);

  border-color: rgba(0,163,255,0.2);

  background: rgba(255,255,255,0.06);
}

.quiz-item h3 {
  margin: 0;
  font-size: 24px;
}

.quiz-item p {
  margin-top: 6px;
  color: #9aa4b2;
}

.quiz-badge {
  padding: 10px 16px;

  border-radius: 999px;

  font-weight: 700;

  white-space: nowrap;
}

.quiz-badge.excellent {
  background: rgba(0,255,157,0.14);
  color: #00ff9d;
}

.quiz-badge.good {
  background: rgba(255,196,0,0.14);
  color: #ffc400;
}

.quiz-badge.bad {
  background: rgba(255,90,90,0.14);
  color: #ff7070;
}

/* COMPONENTS */

.components-grid {
  display: grid;

  grid-template-columns:
    repeat(auto-fit, minmax(280px, 1fr));

  gap: 18px;
}

.component-item {
  display: flex;
  align-items: center;
  gap: 16px;

  padding: 20px;

  border-radius: 22px;

  background: rgba(255,255,255,0.04);

  border: 1px solid rgba(255,255,255,0.05);

  transition: 0.25s ease;
}

.component-item:hover {
  transform: translateY(-5px);

  border-color: rgba(0,163,255,0.2);

  background: rgba(255,255,255,0.06);
}

.component-item h3 {
  margin: 0 0 6px;
}

.component-item p {
  margin: 0;
  color: #9aa4b2;
}

.component-icon {
  width: 60px;
  height: 60px;

  border-radius: 18px;

  background:
    linear-gradient(
      135deg,
      rgba(0,163,255,0.18),
      rgba(0,255,157,0.12)
    );

  display: flex;
  align-items: center;
  justify-content: center;

  font-size: 26px;

  border: 1px solid rgba(255,255,255,0.08);
}

/* ACTIONS */

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

.action-btn {
  border: none;

  border-radius: 18px;

  padding: 15px 26px;

  font-weight: 700;
  font-size: 15px;

  color: white;

  cursor: pointer;

  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

.action-btn:hover {
  transform: translateY(-4px);

  box-shadow:
    0 10px 25px rgba(0,0,0,0.25);
}

.blue {
  background:
    linear-gradient(
      135deg,
      #00a3ff,
      #0066ff
    );
}

.green {
  background:
    linear-gradient(
      135deg,
      #00ff9d,
      #00c27a
    );
}

.red {
  background:
    linear-gradient(
      135deg,
      #ff4f87,
      #ff2d55
    );
}

/* STATES */

.loading-box,
.empty {
  color: #9aa4b2;
  text-align: center;
  padding: 30px;
}

/* MOBILE */

@media (max-width: 768px) {
  .profile-content {
    padding: 20px 14px 60px;
  }

  .hero-card {
    flex-direction: column;
    align-items: flex-start;

    padding: 24px;
  }

  .avatar {
    width: 90px;
    height: 90px;

    font-size: 34px;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .quiz-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .actions {
    flex-direction: column;
  }

  .action-btn {
    width: 100%;
  }

  .components-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .hero-info h1 {
    font-size: 26px;
  }

  .stat-card p {
    font-size: 30px;
  }

  .profile-card {
    padding: 22px;
  }

  .component-item {
    padding: 16px;
  }

  .quiz-item {
    padding: 18px;
  }
}
</style>
.admin-wrapper {
  min-height: 100vh;
  padding-top: 100px; 
  background: #0b0f19; 
}


.admin-page {
  background: #0b0f19;
  color: white;
  padding: 0 20px 40px; 
}

.page-header {
  text-align: center;
  margin-bottom: 40px;
}

.page-header h1 {
  font-size: 42px;
  margin-bottom: 10px;
}

.page-header p {
  color: #a0aec0;
}

.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  margin-top: 80px;
  font-size: 20px;
}

.loader {
  width: 28px;
  height: 28px;
  border: 3px solid #444;
  border-top: 3px solid #6c63ff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 35px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 25px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1f2937, #374151);
  border: 1px solid rgba(255,255,255,0.08);
}

.stat-card p {
  font-size: 32px;
  font-weight: bold;
  margin-top: 6px;
}

.stat-icon {
  font-size: 38px;
}

.admin-section {
  background: #111827;
  border-radius: 18px;
  padding: 25px;
  margin-bottom: 35px;
  border: 1px solid rgba(255,255,255,0.08);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.table-wrapper {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

.admin-table th {
  background: #1f2937;
  color: #cbd5e1;
}

.admin-table th,
.admin-table td {
  padding: 16px;
  border-bottom: 1px solid #253041;
  text-align: left;
}

.admin-table tr:hover {
  background: rgba(255,255,255,0.03);
}

.mono {
  font-family: monospace;
}

.role-select,
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  background: #1f2937;
  color: white;
  border: 1px solid #374151;
  border-radius: 10px;
  padding: 12px;
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-add,
.btn-save {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
}

.btn-cancel {
  background: #374151;
  color: white;
  border: none;
  padding: 12px 18px;
  border-radius: 12px;
  cursor: pointer;
}

.icon-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 20px;
  margin-right: 10px;
}

.icon-btn.delete:hover { transform: scale(1.15); }
.icon-btn.edit:hover { transform: scale(1.15); }

.actions { white-space: nowrap; }
.empty { text-align: center; padding: 30px; color: #94a3b8; }

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal {
  width: 90%;
  max-width: 700px;
  background: #111827;
  border-radius: 20px;
  padding: 30px;
  border: 1px solid rgba(255,255,255,0.08);
}

.modal-header { margin-bottom: 25px; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.form-group.full { grid-column: span 2; }

.modal-actions {
  margin-top: 25px;
  display: flex;
  justify-content: flex-end;
  gap: 15px;
}

@media (max-width: 768px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-group.full { grid-column: span 1; }
  .section-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  .page-header h1 { font-size: 30px; }
  
 
  .admin-wrapper {
    padding-top: 90px; 
  }
}
.components-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #1a1f35 0%, #0d1117 45%, #06090f 100%);
  color: white;
}

.components-page .content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px;
}

.page-title {
  font-size: clamp(28px, 5vw, 52px);
  font-weight: 800;
  text-align: center;
  margin-bottom: 30px;
  background: linear-gradient(90deg, #00c6ff, #00ff9d);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.search-bar {
  display: flex;
  justify-content: center;
  margin-bottom: 35px;
}

.search-input {
  width: 100%;
  max-width: 650px;
  padding: 16px 22px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
  color: white;
  font-size: 16px;
  transition: 0.3s;
}

.search-input:focus {
  outline: none;
  border-color: #00c6ff;
  box-shadow: 0 0 20px rgba(0,198,255,0.4);
}

.components-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit,minmax(300px,1fr));
  gap: 24px;
}

.component-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  transition: 0.35s;
  display: flex;
  flex-direction: column;
}

.component-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0,198,255,0.4);
  box-shadow: 0 12px 35px rgba(0,198,255,0.15);
}

.card-image-box {
  height: 230px;
  background: linear-gradient(145deg, #111827, #1f2937);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.card-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: 0.3s;
}

.component-card:hover .card-img {
  transform: scale(1.05);
}

.card-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  background: rgba(0,198,255,0.15);
  color: #00c6ff;
  border: 1px solid rgba(0,198,255,0.2);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
}

.price {
  color: #00ff9d;
  font-size: 18px;
  font-weight: 700;
}

.card-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
}

.card-specs {
  color: #cbd5e1;
  line-height: 1.6;
  flex-grow: 1;
}

.btn-select {
  margin-top: 20px;
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, #00c6ff, #0072ff);
  color: white;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-select:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,114,255,0.35);
}

.loader,
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 20px;
}


@media (max-width: 768px) {
  .components-page .content {
    padding: 16px;
  }

  .components-grid {
    grid-template-columns: 1fr;
  }

  .card-title {
    font-size: 20px;
  }

  .search-input {
    font-size: 15px;
  }
}

/* ===== ФИЛЬТР КАТЕГОРИЙ ===== */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1.5rem 0;
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.cat-btn {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: #94a3b8;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
}

.cat-btn:hover {
  color: #e2e8f0;
  border-color: #00a3ff;
  background: rgba(0, 163, 255, 0.1);
}

.cat-btn.active {
  color: #0a0f1a;
  background: linear-gradient(135deg, #00ff9d, #00cc7a);
  border-color: #00ff9d;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 255, 157, 0.3);
}

.cat-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .category-filter {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.75rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,163,255,0.4) transparent;
  }
  
  .category-filter::-webkit-scrollbar {
    height: 4px;
  }
  
  .category-filter::-webkit-scrollbar-thumb {
    background: rgba(0,163,255,0.4);
    border-radius: 2px;
  }
  
  .cat-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}.bios-page {
  min-height: 100vh;
  padding: 40px 20px;
  background:
    radial-gradient(circle at top, #0f172a 0%, #020617 70%);
  color: white;
}

.bios-hero {
  text-align: center;
  margin-bottom: 50px;
}

.bios-title {
  font-size: clamp(40px, 6vw, 72px);
  font-family: 'Orbitron', sans-serif;
  color: #00ff9d;
  text-shadow:
    0 0 20px rgba(0,255,157,.5);
}

.bios-subtitle {
  color: #94a3b8;
  margin-top: 15px;
  font-size: 18px;
}

.loading {
  text-align: center;
  font-size: 22px;
  color: #00a3ff;
}

.bios-section {
  margin-bottom: 50px;
}

.glass {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(18px);
  border-radius: 24px;
  padding: 25px;
}

.update-grid,
.cpu-check {
  display: grid;
  grid-template-columns:
    repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  margin-top: 25px;
}

select,
input {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  color: white;
  padding: 14px;
  border-radius: 14px;
  outline: none;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  border: none;
  border-radius: 14px;
  padding: 14px 18px;
  cursor: pointer;
  font-weight: 700;
  transition: .3s;
}

.btn-primary {
  background:
    linear-gradient(135deg,#00ff9d,#00a3ff);
  color: black;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(0,163,255,.15);
  color: #00a3ff;
}

.btn-danger {
  background: rgba(255,77,109,.15);
  color: #ff4d6d;
}

.risk-box {
  margin-top: 20px;
  padding: 20px;
  border-radius: 18px;
  font-weight: 700;
}

.risk-box.low {
  background: rgba(0,255,157,.1);
  border: 1px solid rgba(0,255,157,.4);
}

.risk-box.medium {
  background: rgba(255,193,7,.1);
  border: 1px solid rgba(255,193,7,.4);
}

.risk-box.high {
  background: rgba(255,77,109,.1);
  border: 1px solid rgba(255,77,109,.4);
}

.progress-wrapper {
  width: 100%;
  height: 16px;
  background: rgba(255,255,255,.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 25px;
}

.progress-fill {
  height: 100%;
  background:
    linear-gradient(90deg,#00ff9d,#00a3ff);
  transition: width .5s ease;
}

.steps {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.step {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  color: #64748b;
  transition: .3s;
}

.step.active {
  color: white;
  background: rgba(0,255,157,.15);
  border: 1px solid rgba(0,255,157,.3);
}

.cpu-result {
  margin-top: 20px;
  padding: 18px;
  border-radius: 14px;
  font-weight: 700;
}

.cpu-result.success {
  background: rgba(0,255,157,.1);
  border: 1px solid rgba(0,255,157,.3);
}

.cpu-result.error {
  background: rgba(255,77,109,.1);
  border: 1px solid rgba(255,77,109,.3);
}

.timeline {
  position: relative;
  margin-top: 40px;
  padding-left: 30px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  width: 3px;
  height: 100%;
  background:
    linear-gradient(#00ff9d,#00a3ff);
}

.timeline-item {
  position: relative;
  margin-bottom: 35px;
}

.timeline-dot {
  position: absolute;
  left: -27px;
  top: 25px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #00ff9d;
  box-shadow:
    0 0 15px rgba(0,255,157,.8);
}

.bios-card {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 22px;
  padding: 24px;
  transition: .3s;
}

.bios-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0,255,157,.4);
}

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

.bios-header h2 {
  color: #00a3ff;
}

.bios-badge {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(0,255,157,.15);
  color: #00ff9d;
  font-size: 12px;
  font-weight: 700;
}

.bios-badge.beta {
  background: rgba(255,77,109,.15);
  color: #ff4d6d;
}

.bios-description {
  margin: 18px 0;
  color: #cbd5e1;
  line-height: 1.7;
}

.bios-info {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  color: #94a3b8;
  margin-bottom: 18px;
}

.stability-bar {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255,255,255,.08);
}

.stability-fill {
  height: 100%;
  background:
    linear-gradient(90deg,#00ff9d,#00a3ff);
}

.bios-actions {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .bios-page {
    padding: 20px 15px;
  }

  .bios-actions {
    flex-direction: column;
  }

  .bios-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}.details-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #131a2c 0%, #0d1117 45%, #05070c 100%);
  color: white;
}

.content {
 max-width: 800px;
  margin: 0 auto;
  padding: 24px;
}

.btn-back {
  margin-bottom: 25px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.3s;
}

.btn-back:hover {
  background: rgba(255,255,255,0.1);
}
.loading{
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 20px;
}

.product-card {
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(14px);
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
}

.card-header {
  padding: 28px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.product-title {
  font-size: clamp(28px, 5vw, 46px);
  margin-top: 10px;
  line-height: 1.2;
}

.price-tag {
  font-size: 34px;
  font-weight: 800;
  color: #00ff9d;
}

.card-body {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 35px;
  padding: 32px;
}

.visual-section {
  background: rgba(255,255,255,0.04);
  border-radius: 24px;
  padding: 20px;
}

.image-wrapper {
  display: flex;
    width: 70%;
    height: 100%;
  overflow: hidden;
  flex-direction: column;
  align-items: center;
}

.component-image {
  width: 100%;
  max-height: 400px;
  object-fit: contain;
}

.img-caption {
  margin-top: 18px;
  color: #94a3b8;
}

.specs-section h3 {
  margin-bottom: 20px;
  font-size: 28px;
}

.specs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.spec-row {
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 16px;
}

.spec-row.highlight {
  border: 1px solid rgba(0,198,255,0.3);
}

.label {
  color: #00c6ff;
  font-weight: 700;
  margin-bottom: 8px;
  display: block;
}

.value {
  line-height: 1.6;
  color: #e2e8f0;
}

.hint {
  display: block;
  margin-top: 10px;
  color: #94a3b8;
}

.actions {
  margin-top: 28px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-add,
.btn-go {
  flex: 1;
  min-width: 220px;
  padding: 16px;
  border-radius: 18px;
  border: none;
  cursor: pointer;
  font-weight: 700;
  transition: 0.3s;
}

.btn-add {
  background: linear-gradient(135deg,#00ff9d,#00c6ff);
  color: #081018;
}

.btn-go {
  background: rgba(255,255,255,0.05);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-add:hover,
.btn-go:hover {
  transform: translateY(-3px);
}

@media (max-width: 900px) {
  .card-body {
    grid-template-columns: 1fr;
  }

  .price-tag {
    font-size: 28px;
  }

  .product-title {
    font-size: 32px;
  }
}

@media (max-width: 600px) {
  .content {
    padding: 14px;
  }

  .card-header {
    padding: 20px;
  }

  .card-body {
    padding: 18px;
  }

  .btn-add,
  .btn-go {
    width: 100%;
  }

  .product-title {
    font-size: 28px;
  }

  .price-tag {
    font-size: 24px;
  }
}

/* ===== LOADER / ЗАГРУЗКА ===== */
.loader {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* 🔹 Спиннер */
.loader::before {
  content: '';
  width: 56px;
  height: 56px;
  border: 4px solid rgba(0, 198, 255, 0.2);
  border-top-color: #00c6ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  box-shadow: 0 0 20px rgba(0, 198, 255, 0.3);
}

/* 🔹 Пульсирующая точка под спиннером */
.loader::after {
  content: '';
  width: 12px;
  height: 12px;
  background: #00ff9d;
  border-radius: 50%;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
}

/* 🔹 Анимация вращения */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 🔹 Анимация пульсации */
@keyframes pulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1);
    box-shadow: 0 0 15px rgba(0, 255, 157, 0.5);
  }
  50% { 
    opacity: 0.6; 
    transform: scale(0.85);
    box-shadow: 0 0 25px rgba(0, 255, 157, 0.8);
  }
}

/* 🔹 Текст загрузки */
.loader span {
  color: #94a3b8;
  font-size: 1rem;
  animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* ===== EMPTY STATE ===== */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: #94a3b8;
  font-size: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.empty-state::before {
  content: '🔍';
  font-size: 3rem;
  opacity: 0.7;
  filter: drop-shadow(0 0 15px rgba(0, 198, 255, 0.3));
}

/* ===== АДАПТИВ ДЛЯ МОБИЛЬНЫХ ===== */
@media (max-width: 768px) {
  .loader,
  .empty-state {
    padding: 60px 16px;
  }
  
  .loader::before {
    width: 48px;
    height: 48px;
    border-width: 3px;
  }
  
  .loader::after {
    width: 10px;
    height: 10px;
  }
}

@media (max-width: 375px) {
  .loader,
  .empty-state {
    padding: 50px 12px;
    font-size: 18px;
  }
  
  .loader::before {
    width: 40px;
    height: 40px;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .loader::before,
  .loader::after,
  .loader span {
    animation: none !important;
  }
  
  .loader::before {
    border-top-color: #00c6ff;
    opacity: 0.8;
  }
}/* ===== БАЗОВЫЕ ОТСТУПЫ И ТИПОГРАФИКА ===== */
.builder-page {
  --spacing-xs: 0.25rem;   /* 4px */
  --spacing-sm: 0.5rem;    /* 8px */
  --spacing-md: 1rem;      /* 16px */
  --spacing-lg: 1.5rem;    /* 24px */
  --spacing-xl: 2rem;      /* 32px */
  
  --btn-height: 40px;
  --btn-padding-x: 1.25rem;
  --btn-font-size: 0.95rem;
  --btn-border-radius: 8px;
  
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;
}

/* Заголовки с отступами */
.selection-panel h2,
.build-panel h2 {
  color: #00a3ff;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.4rem;
  margin: 0 0 var(--spacing-lg) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(0,163,255,0.3);
  text-shadow: 0 0 10px rgba(0,163,255,0.2);
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
}

.selection-panel h2::before,
.build-panel h2::before {
  content: '';
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #00ff9d, #00a3ff);
  border-radius: 2px;
  display: inline-block;
}

/* Текстовые элементы с правильными отступами */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-xs); /* Отступ до спецификаций */
}

.name {
  font-weight: 600;
  color: #e2e8f0;
  font-size: 0.95rem;
  line-height: 1.4;
  flex: 1;
  margin-right: var(--spacing-sm);
}

.price {
  color: #00ff9d;
  font-weight: 700;
  font-size: 1rem;
  white-space: nowrap;
  text-shadow: 0 0 8px rgba(0,255,157,0.3);
}

.specs {
  color: #94a3b8;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0 0 var(--spacing-md) 0; /* Отступ до кнопки */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== ЕДИНАЯ СИСТЕМА КНОПОК ===== */

/* Базовый стиль для ВСЕХ кнопок */
.builder-page button {
  height: var(--btn-height);
  padding: 0 var(--btn-padding-x);
  font-size: var(--btn-font-size);
  font-weight: 500;
  border-radius: var(--btn-border-radius);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-xs);
  white-space: nowrap;
  user-select: none;
}

.builder-page button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

/* === PRIMARY: зелёная акцентная (добавить, сохранить, проверить) === */
.btn-add,
.btn-save,
.btn-check,
.actions button:first-child,
.actions button:nth-child(2) {
  background: linear-gradient(135deg, #00ff9d, #00cc7a);
  color: #0a0f1a;
  border-color: rgba(0,255,157,0.4);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0,255,157,0.2);
}

.btn-add:hover:not(:disabled),
.btn-save:hover:not(:disabled),
.btn-check:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,255,157,0.4);
  border-color: #00ff9d;
}

.btn-add:active:not(:disabled),
.btn-save:active:not(:disabled),
.btn-check:active:not(:disabled) {
  transform: translateY(0);
}

/* === SECONDARY: синяя (вкладки, основные действия) === */
.tab,
.actions button:last-child {
  background: rgba(0,163,255,0.15);
  color: #00a3ff;
  border-color: rgba(0,163,255,0.4);
}

.tab:hover:not(.active):not(:disabled),
.actions button:last-child:hover:not(:disabled) {
  background: rgba(0,163,255,0.25);
  border-color: #00a3ff;
  box-shadow: 0 4px 12px rgba(0,163,255,0.2);
}

.tab.active {
  background: linear-gradient(135deg, #00a3ff, #0077cc);
  color: #fff;
  border-color: #00a3ff;
  box-shadow: 0 4px 16px rgba(0,163,255,0.4);
}

/* === DANGER: красная (удалить, очистить) === */
.build-item button,
.btn-remove,
.btn-clear {
  background: rgba(255,77,109,0.15);
  color: #ff4d6d;
  border-color: rgba(255,77,109,0.4);
  width: var(--btn-height);
  height: var(--btn-height);
  padding: 0;
  border-radius: 50%;
  font-size: 1.1rem;
}

.build-item button:hover:not(:disabled),
.btn-remove:hover:not(:disabled),
.btn-clear:hover:not(:disabled) {
  background: rgba(255,77,109,0.25);
  border-color: #ff4d6d;
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(255,77,109,0.3);
}

/* === GHOST: прозрачная (доп. действия) === */
.btn-ghost {
  background: transparent;
  color: #94a3b8;
  border-color: rgba(148,163,184,0.3);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(148,163,184,0.1);
  color: #e2e8f0;
  border-color: rgba(148,163,184,0.5);
}

/* ===== КОМПОНЕНТЫ: карточки и списки ===== */
.component-card-small {
  background: rgba(15,23,42,0.6);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 12px;
  padding: var(--spacing-md);
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm); 
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
   overflow: hidden;           
  position: relative;     
  isolation: isolate; 
}

.component-card-small:hover {
  border-color: rgba(0,163,255,0.4);
  box-shadow: 0 4px 20px rgba(0,163,255,0.15);
}

/* Кнопка "+" в карточке — выравниваем вправо */
.component-card-small .btn-add {
  width: 100%;
  margin-top: var(--spacing-xs);
    position: relative;
  z-index: 10;                
  pointer-events: auto;  
}

/* ===== СПИСОК СБОРКИ ===== */
.build-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm); 
  margin: 0 0 var(--spacing-lg) 0;
}

.build-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--spacing-sm) var(--spacing-md);
  background: rgba(30,41,59,0.5);
  border: 1px solid rgba(148,163,184,0.2);
  border-radius: 8px;
  gap: var(--spacing-md);
}

.build-item > div {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  flex: 1;
  min-width: 0;
}

.build-item span:not(.badge) {
  color: #e2e8f0;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Badge в сборке */
.badge {
  background: rgba(0,255,157,0.15);
  color: #00ff9d;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid rgba(0,255,157,0.3);
}

/* ===== SUMMARY: итоги ===== */
.summary {
  background: rgba(15,23,42,0.8);
  border: 1px solid rgba(0,163,255,0.3);
  border-radius: 12px;
  padding: var(--spacing-lg);
  margin: 0 0 var(--spacing-lg) 0;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-xs);
}

.summary div {
  color: #e2e8f0;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.summary div:last-child {
  padding-top: var(--spacing-sm);
  border-top: 1px dashed rgba(148,163,184,0.3);
  color: #00a3ff;
  font-weight: 600;
}

/* ===== ACTIONS: панель действий ===== */
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-sm);
  margin: var(--spacing-lg) 0;
}

.actions button {
  width: 100%;
}

/* На мобильных — кнопки в колонку */
@media (max-width: 768px) {
  .actions {
    grid-template-columns: 1fr;
  }
}

/* ===== RESULT BOX: результаты проверки ===== */
.result-box {
  background: rgba(15,23,42,0.8);
  border-radius: 12px;
  padding: var(--spacing-lg);
  margin-top: var(--spacing-md);
  border-left: 4px solid #00a3ff;
}

.result-box.success {
  border-left-color: #00ff9d;
  background: rgba(0,255,157,0.08);
}

.result-box.error {
  border-left-color: #ff4d6d;
  background: rgba(255,77,109,0.08);
}

.result-box h3 {
  margin: 0 0 var(--spacing-sm) 0;
  font-size: 1.1rem;
  color: #e2e8f0;
}

.result-box p {
  margin: var(--spacing-xs) 0;
  color: #94a3b8;
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ===== EMPTY / LOADING STATES ===== */
.empty,
.empty-build,
.loader {
  text-align: center;
  padding: var(--spacing-xl) var(--spacing-lg);
  color: #94a3b8;
  font-size: 0.95rem;
}

.empty::before,
.empty-build::before {
  content: '📦';
  display: block;
  font-size: 2.5rem;
  margin: 0 0 var(--spacing-md) 0;
  opacity: 0.6;
}

.loader::before {
  content: '';
  display: block;
  width: 32px;
  height: 32px;
  margin: 0 auto var(--spacing-md);
  border: 3px solid rgba(0,163,255,0.3);
  border-top-color: #00a3ff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* ===== ВКЛАДКИ КАТЕГОРИЙ ===== */
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin: 0 0 var(--spacing-lg) 0;
  padding-bottom: var(--spacing-sm);
  border-bottom: 1px solid rgba(148,163,184,0.2);
}

.tab {
  padding: var(--spacing-sm) var(--spacing-md);
  font-size: 0.9rem;
  border-radius: 6px;
  min-width: max-content;
}

/* ===== СЕТКА КОМПОНЕНТОВ ===== */
.components-list .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--spacing-lg); 
  
}

/* ===== FOCUS STATES  ===== */
.builder-page button:focus-visible,
.tab:focus-visible {
  outline: 2px solid #00ff9d;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(0,255,157,0.2);
}

input:focus-visible,
select:focus-visible {
  outline: 2px solid #00a3ff;
  border-color: #00a3ff;
  box-shadow: 0 0 0 3px rgba(0,163,255,0.2);
}

/* ===== АНИМАЦИИ ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.component-card-small {
  animation: fadeInUp 0.3s ease forwards;
}
.component-card-small:nth-child(odd) { animation-delay: 0.05s; }
.component-card-small:nth-child(even) { animation-delay: 0.1s; }

.build-item {
  animation: fadeInUp 0.25s ease forwards;
}
.build-item:nth-child(2) { animation-delay: 0.05s; }
.build-item:nth-child(3) { animation-delay: 0.1s; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .builder-container {
    flex-direction: column;
    gap: var(--spacing-lg);
  }
  
  .components-list .grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }
}

@media (max-width: 768px) {
  .builder-page {
    --btn-height: 44px; 
    --btn-font-size: 1rem;
  }
  
  .card-header {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .price {
    font-size: 1.1rem;
  }
  
  .specs {
    -webkit-line-clamp: 3;
  }
  
  .summary {
    padding: var(--spacing-md);
  }
  
  .actions {
    gap: var(--spacing-md);
  }
}


@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
/* ===== MOBILE: 375px (iPhone SE/mini) ===== */
@media (max-width: 375px) {
  .builder-page {
    --spacing-md: 0.875rem;  
    --spacing-lg: 1.25rem;   
    --btn-height: 44px;     
  }


  .selection-panel h2,
  .build-panel h2 {
    font-size: 1.2rem;
    margin-bottom: var(--spacing-md);
  }


  .component-card-small {
    padding: var(--spacing-sm);
    gap: var(--spacing-xs);
  }

  .card-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }

  .name {
    font-size: 0.9rem;
    margin-right: 0;
  }

  .price {
    font-size: 0.95rem;
  }

  .specs {
    font-size: 0.8rem;
    -webkit-line-clamp: 3; 
    margin-bottom: var(--spacing-sm);
  }

  .component-card-small .btn-add {
    width: 100%;
    font-size: 0.9rem;
    padding: 0 var(--spacing-sm);
  }

  .components-list .grid {
    grid-template-columns: 1fr;
    gap: var(--spacing-sm);
  }

  .category-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: var(--spacing-xs);
    scrollbar-width: thin;
    scrollbar-color: rgba(0,163,255,0.4) transparent;
  }
  
  .category-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .category-tabs::-webkit-scrollbar-thumb {
    background: rgba(0,163,255,0.4);
    border-radius: 2px;
  }

  .tab {
    flex-shrink: 0;
    padding: var(--spacing-xs) var(--spacing-sm);
    font-size: 0.85rem;
  }

  .build-item {
    flex-wrap: wrap;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
  }

  .build-item > div {
    min-width: 100%;  
    justify-content: space-between;
  }

  .build-item button {
    width: 36px;
    height: 36px;
    font-size: 1rem;
    align-self: flex-end;
  }

  .badge {
    font-size: 0.7rem;
    padding: 2px 8px;
  }

  .summary {
    padding: var(--spacing-md);
    font-size: 0.9rem;
  }

  .summary div {
    font-size: 0.95rem;
  }

  .actions {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
    margin: var(--spacing-lg) 0;
  }

  .actions button {
    height: 48px;  
    font-size: 1rem;
  }


  .result-box {
    padding: var(--spacing-md);
  }

  .result-box h3 {
    font-size: 1rem;
  }

  .result-box p {
    font-size: 0.85rem;
  }


  .empty,
  .empty-build,
  .loader {
    padding: var(--spacing-lg) var(--spacing-md);
    font-size: 0.9rem;
  }


  .builder-container,
  .selection-panel,
  .build-panel {
    min-width: 0;  
  }

  /* Изображения/иконки не вылезут */
  .component-card-small img,
  .avatar {
    max-width: 100%;
    height: auto;
  }
}

/* ===== EXTRA SMALL: < 320px (очень старые устройства) ===== */
@media (max-width: 320px) {
  .builder-page {
    --spacing-sm: 0.375rem;
    --spacing-md: 0.75rem;
  }
  
  .name,
  .price,
  .specs,
  .summary div {
    font-size: 0.85rem;
  }
  
  .tab {
    font-size: 0.8rem;
    padding: 4px 8px;
  }
}
  /* Защита */
/* 🔥 Ядерный костыль: форс-добавленная кнопка */
.btn-add.force-added {
  background: linear-gradient(135deg, #00ff9d, #00cc7a) !important;
  color: #0a0f1a !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  opacity: 0.95;
  transition: none !important;
}

/* 🔥 Гарантированная блокировка кликов */
.btn-add:disabled,
.btn-add.force-added {
  pointer-events: none !important;
  user-select: none !important;
}

.lab-wrapper {
  min-height: 100vh;
  padding-top: 100px; /* Место для хедера */
  background: #0b0f17; /* Тёмный фон */
}

.lab-page {
  padding: 0 20px 40px;
  background:
    radial-gradient(circle at top, rgba(0,255,200,0.12), transparent 30%),
    #0b0f17;
  color: #fff;

}


@media (max-width: 768px) {
  .lab-wrapper {
    padding-top: 90px; 
  }
  
  .lab-page {
    padding: 0 15px 30px;
  }
}

/* HERO */

.hero {
  position: relative;
  margin-bottom: 40px;
  overflow: hidden;
  border-radius: 24px;
  padding: 50px;
  background:
    linear-gradient(
      135deg,
      rgba(0,255,170,0.08),
      rgba(0,140,255,0.08)
    );

  border: 1px solid rgba(255,255,255,0.08);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-subtitle {
  color: #00ffd0;
  letter-spacing: 3px;
  margin-bottom: 10px;
  font-size: 14px;
}

.hero h1 {
  font-size: 54px;
  margin-bottom: 20px;
  font-family: 'Orbitron', sans-serif;
}

.hero-text {
  max-width: 700px;
  color: #b7c0d8;
  line-height: 1.7;
  font-size: 18px;
}

.hero-glow {
  position: absolute;
  right: -100px;
  top: -100px;
  width: 400px;
  height: 400px;
  background: #00ffd0;
  opacity: 0.12;
  filter: blur(120px);
}

/* GRID */

.lab-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
  margin-bottom: 30px;
}

.panel {
  background: rgba(15,20,30,0.92);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  padding: 30px;
  backdrop-filter: blur(12px);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 25px;
}

.panel-header h2 {
  font-size: 24px;
  font-family: 'Orbitron', sans-serif;
}

/* FORM */

.form-group {
  margin-bottom: 28px;
}

.form-group label {
  display: block;
  margin-bottom: 12px;
  color: #d8e2ff;
}

.range-info {
  margin-bottom: 10px;
  color: #00ffd0;
  font-weight: bold;
}

.slider {
  width: 100%;
  accent-color: #00ffd0;
}

/* BUTTONS */

.button-group {
  display: flex;
  gap: 15px;
  margin-top: 25px;
}

.btn-primary,
.btn-secondary,
.btn-refresh {
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: 0.25s;
  font-weight: 600;
}

.btn-primary {
  background: linear-gradient(135deg, #00ffd0, #0099ff);
  color: #000;
  padding: 14px 24px;
}

.btn-primary:hover {
  transform: translateY(-2px);
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  padding: 14px 24px;
}

.btn-secondary:hover {
  background: rgba(255,255,255,0.15);
}

.btn-refresh {
  background: rgba(255,255,255,0.08);
  color: white;
  width: 42px;
  height: 42px;
}

/* RESULTS */

.results {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.result-card {
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 24px;
}

.result-card p {
  color: #9fb0d3;
  margin-bottom: 10px;
}

.result-card h3 {
  font-size: 40px;
}

.hot {
  color: #ff5e5e;
}

.danger {
  color: #ffb347;
}

.status-box {
  padding: 18px;
  border-radius: 16px;
  text-align: center;
  font-weight: bold;
}

.status-box.success {
  background: rgba(0,255,120,0.12);
  color: #00ff88;
}

.status-box.fail {
  background: rgba(255,0,80,0.12);
  color: #ff5c8a;
}

/* PROFILES */

.profiles-section {
  margin-top: 20px;
}

.profiles-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
}

.profile-card {
  background: rgba(255,255,255,0.04);
  border-radius: 18px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,0.05);
}

.profile-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 18px;
}

.profile-top h3 {
  font-size: 18px;
}

.profile-date {
  color: #8ea0c7;
  font-size: 14px;
}

.profile-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.profile-stats span {
  display: block;
  color: #8ea0c7;
  margin-bottom: 4px;
}

.profile-stats strong {
  font-size: 18px;
}

/* EMPTY */

.empty-state {
  padding: 50px 20px;
  text-align: center;
  color: #7f8ca8;
}

/* MOBILE */

@media (max-width: 1000px) {
  .lab-grid {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: 42px;
  }
}

@media (max-width: 700px) {
  .lab-page {
    padding: 20px;
  }

  .hero {
    padding: 30px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .button-group {
    flex-direction: column;
  }
}.quiz-page {
  min-height: 100vh;
  background: radial-gradient(circle at top, #16213e 0%, #0f172a 45%, #020617 100%);
  color: white;
}

.quiz-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 40px 20px;
}

.quiz-header {
  margin-bottom: 30px;
}

.quiz-header h1 {
  font-size: 42px;
  margin-bottom: 25px;
  font-weight: 800;
}

.progress-wrapper {
  background: rgba(255,255,255,0.05);
  border-radius: 18px;
  padding: 30px;
  border: 1px solid rgba(0,163,255,0.2);
  width: 100%; 
  box-sizing: border-box;
}

.progress-info {
  display: flex;
  justify-content: center; 
  align-items: center;
  gap: 20px; 
  margin-bottom: 20px;
  width: 100%;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.3px;
}



.progress-bar {
  height: 14px;
  border-radius: 30px;
  background: rgba(255,255,255,0.08);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 30px;
  background: linear-gradient(90deg, #00ff9d, #00a3ff);
  transition: width 0.3s ease;
}

/* Карточка */
.quiz-card,
.finish-card,
.loading-card {
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(0,163,255,0.15);
  backdrop-filter: blur(10px);
  border-radius: 24px;
  padding: 35px;
  box-shadow: 0 0 35px rgba(0,163,255,0.12);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Номер вопроса */
.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #00a3ff, #00ff9d);
  color: #020617;
  font-size: 1.5rem;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0, 163, 255, 0.4);
  position: relative;
}
.question-number::after {
  content: '';
  position: absolute;
  inset: -4px;
  border: 2px solid rgba(0, 255, 157, 0.3);
  border-radius: 50%;
}

.question {
  font-size: 30px;
  margin: 16px 0 24px;
  line-height: 1.4;
}

.difficulty {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 12px;
}
.easy { background: rgba(0,255,157,0.15); color: #00ff9d; }
.medium { background: rgba(255,193,7,0.15); color: #ffc107; }
.hard { background: rgba(255,82,82,0.15); color: #ff5252; }

.options {
  display: grid;
  gap: 18px;
  width: 100%;
}

.option-btn {
  display: flex;
  align-items: center;
  gap: 18px;
  background: rgba(255,255,255,0.04);
  border: 2px solid rgba(255,255,255,0.06);
  border-radius: 18px;
  padding: 18px;
  color: white;
  cursor: pointer;
  transition: 0.25s;
  font-size: 16px;
  text-align: left;
  width: 100%;
}

.option-btn:hover {
  transform: translateY(-3px);
  border-color: #00a3ff;
}

.option-btn.active {
  background: linear-gradient(135deg, rgba(0,255,157,0.2), rgba(0,163,255,0.2));
  border-color: #00ff9d;
}

.option-index {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  flex-shrink: 0;
}

.actions {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  width: 100%;
}

.btn-next,
.btn-submit {
  border: none;
  border-radius: 16px;
  padding: 16px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  color: white;
  background: linear-gradient(135deg, #00a3ff, #00ff9d);
  transition: 0.25s;
}

.btn-next:hover,
.btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 25px rgba(0,163,255,0.4);
}

.btn-next:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.loader {
  width: 60px;
  height: 60px;
  border: 5px solid rgba(255,255,255,0.1);
  border-top-color: #00a3ff;
  border-radius: 50%;
  margin: 0 auto 20px;
  animation: spin 0.8s linear infinite;
}

.loading-card,
.finish-card {
  text-align: center;
}

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

.result-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at top, #16213e 0%, #0f172a 45%, #020617 100%);
  color: white;
}

.result-container {
  max-width: 850px;
  margin: 0 auto;
  padding: 50px 20px;
}

.result-card {
  background: rgba(15,23,42,0.92);
  border: 1px solid rgba(0,163,255,0.2);
  border-radius: 30px;
  padding: 45px;
  box-shadow: 0 0 40px rgba(0,163,255,0.12);
  backdrop-filter: blur(12px);
}

.icon {
  font-size: 70px;
  text-align: center;
  margin-bottom: 15px;
}

h1 {
  text-align: center;
  font-size: 42px;
  margin-bottom: 35px;
}

.score-block {
  display: flex;
  align-items: center;
  gap: 35px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.score-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background:
    linear-gradient(135deg, #00a3ff, #00ff9d);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 42px;
  font-weight: 800;
  box-shadow: 0 0 35px rgba(0,163,255,0.35);
}

.score-info h2 {
  font-size: 36px;
  margin-bottom: 10px;
}

.score-info p {
  color: #94a3b8;
  font-size: 18px;
}

.stats {
  display: grid;
  gap: 18px;
  margin-bottom: 35px;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  padding: 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
}

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

.btn-primary,
.btn-secondary {
  flex: 1;
  border: none;
  border-radius: 16px;
  padding: 16px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, #00a3ff, #00ff9d);
  color: white;
}

.btn-secondary {
  background: rgba(255,255,255,0.08);
  color: white;
  border: 1px solid rgba(255,255,255,0.1);
}

.btn-primary:hover,
.btn-secondary:hover {
  transform: translateY(-2px);
}.btn {
  padding: 12px 28px;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: 0.3s;
}

.btn-primary {
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  color: white;
}

.btn-green { background: #28a745; color: white; }
.btn-red { background: #dc3545; color: white; }
.btn-blue { background: #17a2b8; color: white; }
.btn-yellow { background: #ffc107; color: black; }

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background: #0D0D0D;
  color: #FFFFFF;
  font-family: 'Exo 2', sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
#app {
  width: 100%;
  max-width: 1200px;
  padding: 40px 20px;
  text-align: center;
  background: #0D0D0D; 
  min-height: 100vh; 
}
/* ── Главная (LoginPage) ── */
.home h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(24px, 4vw, 48px);
  margin-bottom: 30px;
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.home img {
  max-width: 50%;
  border: 2px solid #00A3FF;
  border-radius: 12px;
  margin: 30px 0;
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.5);
  transition: all 0.3s ease;
}
.home img:hover {
  transform: translateY(4px);
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.1);
}
.auth-buttons { margin-top: 20px; }
/* ── Кнопки ── */
.btn {
  display: inline-block;
  padding: 12px 28px;
  margin: 8px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  font-family: 'Exo 2', sans-serif;
}
.btn.full { width: 100%; margin: 0; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  color: #000;
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-3px);
  box-shadow: 0 0 20px #00FF9D;
}
.btn-secondary {
  background: transparent;
  border: 2px solid #00A3FF;
  color: #00A3FF;
}
.btn-secondary:hover:not(:disabled) {
  background: rgba(0,163,255,0.1);
  transform: translateY(-3px);
  box-shadow: 0 0 20px rgba(0,163,255,0.4);
}
.btn-outline {
  background: transparent;
  border: 2px solid #ff4d4d;
  color: #ff4d4d;
  padding: 8px 20px;
  font-size: 14px;
}
.btn-outline:hover { background: rgba(255,77,77,0.1); }
.btn-ghost {
  background: transparent;
  border: none;
  color: #888;
  font-size: 14px;
  margin-top: 12px;
  padding: 6px 0;
  cursor: pointer;
  font-family: 'Exo 2', sans-serif;
}
.btn-ghost:hover { color: #fff; }
/* ── Role badge ── */
.role-badge {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.role-badge.admin { background: #ff6b35; color: #000; }
.role-badge.standard { background: #00A3FF; color: #000; }
/* ── Auth card ── */
.auth-card {
  max-width: 420px;
  margin: 0 auto;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(0,163,255,0.3);
  border-radius: 20px;
  padding: 40px 36px;
  backdrop-filter: blur(10px);
  box-shadow: 0 0 40px rgba(0,163,255,0.15);
  text-align: left;
}
.auth-card h2 {
  font-family: 'Orbitron', sans-serif;
  font-size: 24px;
  margin-bottom: 28px;
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: center;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 14px;
  color: #aaa;
  margin-bottom: 8px;
}
.form-group input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(0,163,255,0.3);
  border-radius: 10px;
  color: #fff;
  font-size: 15px;
  font-family: 'Exo 2', sans-serif;
  outline: none;
  transition: border-color 0.2s;
}
.form-group input:focus { border-color: #00FF9D; }
.form-group input::placeholder { color: #555; }
.hint { color: #555; font-size: 12px; }
.error-msg {
  background: rgba(255,77,77,0.15);
  border: 1px solid rgba(255,77,77,0.4);
  color: #ff6b6b;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 18px;
}
.switch-link {
  text-align: center;
  font-size: 14px;
  color: #888;
  margin-top: 16px;
}
.switch-link a {
  color: #00A3FF;
  cursor: pointer;
  text-decoration: underline;
}
.switch-link a:hover { color: #00FF9D; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
}
/* ── Bios and quiz ── */
.page {
  padding: 20px;
  color: white;
}
.header-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 28px;
  margin-bottom: 20px;
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.question {
  font-size: 20px;
  margin-bottom: 20px;
}
.profile-card {
  background: rgba(255,255,255,0.05);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(0,255,157,0.2);
  box-shadow: 0 0 20px rgba(0,255,157,0.1);
}.skeleton-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
}

.skeleton-img,
.skeleton-text,
.skeleton-btn {
  background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}

@keyframes shimmer {
  0% { background-position: -500px 0; }
  100% { background-position: 500px 0; }
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
  border-bottom: 2px solid rgba(0, 163, 255, 0.2);
  margin-bottom: 40px;
}
.header h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: clamp(20px, 3vw, 32px);
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.user-info {
  display: flex;
  gap: 12px;
  align-items: center;
}
.user-email { font-size: 14px; color: #aaa; }
.role-badge {
  padding: 4px 10px;
  border-radius: 12px;
  font-weight: bold;
  text-transform: capitalize;
  color: white;
}
.admin-badge { background: #dc3545; }
.user-badge { background: #17a2b8; }
.guest-badge { background: #6c757d; }

.btn-logout {
  border: 2px solid #00FF9D;
  border-radius: 8px;
  padding: 6px 14px;
  cursor: pointer;
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  color: white;
  font-weight: bold;
  transition: transform 0.2s, filter 0.2s;
}
.btn-logout:hover {
  transform: translateY(-2px);
  filter: brightness(1.2);
}

.hero-img {
  max-width: 100%;
  width: 100%;
  margin: 0 auto 30px;
  display: block;
  border-radius: 12px;
  border: 2px solid #00A3FF;
  box-shadow: 0 0 30px rgba(0, 163, 255, 0.5);
  transition: all 0.3s ease;
}

.hero-img:hover {
  transform: translateY(4px);
  box-shadow: 0 0 40px rgba(0, 255, 157, 0.3);
}

.content { 
  text-align: center;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
.welcome-text { font-size: 22px; margin-bottom: 8px; }
.subtitle { font-size: 16px; color: #888; margin-bottom: 20px; }
.highlight { color: #00FF9D; font-weight: 6; }

.buttons-grid, .sections-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  margin-bottom: 30px;
  justify-items: center;
}
.btn-component {
  padding: 14px 28px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  color: white;
  transition: transform 0.2s, filter 0.2s;
}
.btn-component:hover { transform: translateY(-2px); filter: brightness(1.2); }

.all-components {
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  box-shadow: 0 0 20px rgba(0, 163, 255, 0.4);
}

.all-components:hover {
  box-shadow: 0 0 30px rgba(0, 255, 157, 0.6);
}

.green { background-color: #28a745; }
.red { background-color: #dc3545; }
.blue { background-color: #17a2b8; }
.yellow { background-color: #ffc107; color: black; }
.dark { background-color: #424242; }

.btn-section {
  padding: 14px 28px;
  border-radius: 12px;
  border: none;
  font-weight: bold;
  font-size: 16px;
  cursor: pointer;
  background: linear-gradient(135deg, #00FF9D, #00A3FF);
  color: white;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 0 15px rgba(0, 255, 157, 0.3);
}
.btn-section:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 25px rgba(0, 163, 255, 0.6);
}

@keyframes shimmer { 0% { background-position: -500px 0; } 100% { background-position: 500px 0; } }
.skeleton-wrapper { display: flex; flex-direction: column; align-items: center; }
.skeleton-img, .skeleton-text, .skeleton-btn {
  background: linear-gradient(90deg, #1e1e1e 25%, #2a2a2a 50%, #1e1e1e 75%);
  background-size: 1000px 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 10px;
}
.skeleton-img { width: 50%; height: 200px; margin-bottom: 20px; }
.skeleton-text { width: 60%; height: 20px; margin-bottom: 10px; }
.skeleton-text.small { width: 40%; }
.skeleton-buttons {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; width: 100%; margin-top: 20px;
}
.skeleton-btn { height: 50px; }



*,
*::before,
*::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 16px; 
  -webkit-text-size-adjust: 100%; 
}

body {
  overflow-x: hidden; 
  width: 100%;
  min-width: 320px; 
}

/*  Адаптивные контейнеры */
.container,
.content,
.page-content {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem;
}

/*  Адаптивная типографика (жидкие шрифты) */
h1 { font-size: clamp(1.75rem, 5vw, 3rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
p, span, label, input, button {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
}

/*  Адаптивные отступы */
.section,
.card,
.panel {
  padding: clamp(1rem, 3vw, 2rem);
  margin: clamp(0.5rem, 2vw, 1.5rem) 0;
}

/*  Гибкие сетки (автоматический перенос) */
.grid,
.grid-cols,
.components-grid,
.features,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: clamp(0.75rem, 2vw, 1.5rem);
}

/*  Гибкие флекс-контейнеры */
.flex,
.actions,
.card-header,
.hero {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 2vw, 1rem);
  align-items: center;
}

/*  Адаптивные изображения */
img,
picture,
.video-wrapper {
  max-width: 100%;
  height: auto;
  display: block;
}

/*  Адаптивные таблицы */
.table-wrapper {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
}

table {
  min-width: 600px; /* Таблица не сжимается меньше — появляется скролл */
  width: 100%;
  border-collapse: collapse;
}

/* 🔹 Адаптивные кнопки и инпуты (удобный тап) */
button,
.btn,
input,
select,
textarea {
  min-height: 44px; /* Минимальный размер для тач-интерфейса */
  min-width: 44px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  touch-action: manipulation; /* Убирает задержку при тапе */
}

/*  Скрытие скроллбара (для эстетики, но скролл работает) */
.scrollable {
  overflow-x: auto;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge */
}
.scrollable::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Медиа-запросы: планшеты (< 1024px) */
@media (max-width: 1024px) {
  .container,
  .content {
    padding: 1.25rem;
  }
  
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

/* Медиа-запросы: мобильные (< 768px) */
@media (max-width: 768px) {
  html { font-size: 15px; }
  
  .container,
  .content {
    padding: 1rem;
  }
  
  /* Сложение колонок в одну */
  .grid-2,
  .grid-cols-2,
  .two-columns,
  .card-body,
  .hero {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
  }
  
  /* Центрирование заголовков на мобильных */
  .page-title,
  .section-title,
  .card-header {
    text-align: center !important;
    justify-content: center !important;
  }
  
  /* Кнопки на всю ширину */
  .btn,
  .actions button,
  .modal-actions button {
    width: 100%;
    max-width: 100%;
  }
  
  /* Скрываем второстепенные элементы */
  .hide-mobile {
    display: none !important;
  }
}

/*  Медиа-запросы: маленькие мобильные (≤ 375px — iPhone SE) */
@media (max-width: 375px) {
  html { font-size: 14px; }
  
  .container,
  .content {
    padding: 0.75rem;
  }
  
  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.25rem; }
  h3 { font-size: 1.1rem; }
  
  .card,
  .panel,
  .modal {
    padding: 0.875rem;
    border-radius: 12px;
  }
  
  button,
  .btn,
  input {
    min-height: 48px; 
    font-size: 0.95rem;
    padding: 0.875rem;
  }
  
  /* Горизонтальный скролл для вкладок/фильтров */
  .tabs,
  .category-filter,
  .filter-bar {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 0.5rem;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 163, 255, 0.4) transparent;
  }
  
  .tabs::-webkit-scrollbar,
  .category-filter::-webkit-scrollbar {
    height: 3px;
  }
  
  .tabs::-webkit-scrollbar-thumb,
  .category-filter::-webkit-scrollbar-thumb {
    background: rgba(0, 163, 255, 0.4);
    border-radius: 2px;
  }
  
  .tab,
  .cat-btn,
  .filter-btn {
    flex-shrink: 0;
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }
}

/*  Медиа-запросы: очень маленькие (≤ 320px) */
@media (max-width: 320px) {
  html { font-size: 13px; }
  
  .container { padding: 0.5rem; }
  
  button,
  input {
    min-height: 44px;
    font-size: 0.9rem;
  }
}

/* 🔹 Поддержка prefers-reduced-motion (доступность) */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Пейзажная ориентация на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
  .modal,
  .fullscreen {
    max-height: 90vh;
    overflow-y: auto;
  }
}