:root {
  --blue: #2563eb;
  --green: #16a34a;
  --yellow: #facc15;
  --dark: #0f172a;
  --gray: #64748b;
  --light: #f8fafc;
  --white: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: var(--light);
  color: var(--dark);
}

.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: white;
  padding: 16px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

.logo {
  font-size: 22px;
  font-weight: 900;
  color: var(--blue);
}

nav {
  display: flex;
  gap: 14px;
  align-items: center;
}

nav a {
  text-decoration: none;
  color: var(--dark);
  font-weight: 700;
}

button,
.btn {
  border: none;
  border-radius: 12px;
  padding: 11px 18px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}

.primary {
  background: var(--blue);
  color: white;
}

.green {
  background: var(--green);
  color: white;
}

.hero {
  padding: 80px 32px;
  background: linear-gradient(135deg, #2563eb, #16a34a);
  color: white;
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 36px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(36px, 5vw, 64px);
  margin: 0 0 20px;
}

.hero p {
  font-size: 20px;
  line-height: 1.6;
  max-width: 720px;
}

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

.hero-card {
  background: rgba(255, 255, 255, 0.16);
  padding: 32px;
  border-radius: 28px;
  backdrop-filter: blur(10px);
  text-align: center;
  animation: float 4s infinite ease-in-out;
}

.coin {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  margin: auto;
  background: radial-gradient(circle, #fde68a, #f59e0b);
  color: #78350f;
  display: grid;
  place-items: center;
  font-size: 44px;
  font-weight: 900;
  animation: spin 5s linear infinite;
}

@keyframes float {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-14px);
  }
}

@keyframes spin {
  from {
    transform: rotateY(0);
  }

  to {
    transform: rotateY(360deg);
  }
}

.features {
  max-width: 1200px;
  margin: auto;
  padding: 60px 24px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.feature {
  background: white;
  padding: 24px;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.feature span {
  font-size: 38px;
}

.section {
  max-width: 1200px;
  margin: auto;
  padding: 60px 24px;
}

.section h2 {
  font-size: 38px;
  margin-bottom: 8px;
}

.subtitle {
  color: var(--gray);
  font-size: 18px;
}

.lessons-grid {
  margin-top: 32px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}

.lesson-card {
  background: white;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
  transition: 0.25s;
  position: relative;
}

.lesson-card:hover {
  transform: translateY(-6px);
}

.lesson-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

.lesson-body {
  padding: 18px;
}

.badge {
  background: #dbeafe;
  color: var(--blue);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.lesson-card h3 {
  font-size: 18px;
  margin: 12px 0 8px;
}

.lesson-card p {
  color: var(--gray);
  font-size: 14px;
  line-height: 1.45;
}

.locked {
  filter: grayscale(0.45);
}

.lock {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: white;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
}

.price-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.price-card {
  background: white;
  padding: 32px;
  border-radius: 28px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.price-card.premium {
  border: 3px solid var(--green);
}

.price {
  font-size: 44px;
  font-weight: 900;
  color: var(--green);
  margin: 14px 0;
}

.price-card li {
  margin: 10px 0;
}

footer {
  background: var(--dark);
  color: white;
  text-align: center;
  padding: 32px;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  display: grid;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal-box {
  background: white;
  border-radius: 24px;
  padding: 28px;
  width: min(460px, 100%);
  position: relative;
}

.modal-box.large {
  width: min(900px, 100%);
  max-height: 90vh;
  overflow: auto;
}

.close {
  position: absolute;
  right: 16px;
  top: 16px;
  background: #fee2e2;
  color: #991b1b;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 22px;
}

input {
  width: 100%;
  padding: 14px;
  margin: 8px 0;
  border-radius: 12px;
  border: 1px solid #cbd5e1;
}

.hidden {
  display: none !important;
}

.lesson-image {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 18px;
  margin: 16px 0;
}

.info-box {
  background: #f1f5f9;
  padding: 16px;
  border-radius: 16px;
  margin: 12px 0;
}

@media (max-width: 950px) {

  .hero,
  .features,
  .lessons-grid,
  .price-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {

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

  .hero,
  .features,
  .lessons-grid,
  .price-grid {
    grid-template-columns: 1fr;
  }
}

footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

.page {
  max-width: 1100px;
  margin: auto;
  padding: 50px 24px;
}

.legal-card,
.dashboard-card {
  background: white;
  padding: 28px;
  border-radius: 24px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
  margin-bottom: 24px;
}

.legal-card h2,
.dashboard-card h2 {
  margin-top: 0;
}

.progress-wrap {
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
  height: 24px;
  margin: 16px 0;
}

.progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  color: white;
  text-align: center;
  font-size: 13px;
  font-weight: 900;
  line-height: 24px;
}

.dashboard-lessons {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.dashboard-lesson {
  border: 1px solid #e2e8f0;
  padding: 18px;
  border-radius: 18px;
  background: #f8fafc;
}

.dashboard-lesson.done {
  border-color: #16a34a;
  background: #ecfdf5;
}

.test-question {
  background: #f8fafc;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 14px;
}

.test-question label {
  display: block;
  margin: 8px 0;
  cursor: pointer;
}

.certificate {
  border: 6px solid #2563eb;
  padding: 40px;
  text-align: center;
  border-radius: 24px;
  background: #ffffff;
}

.certificate h1 {
  font-size: 42px;
  color: #2563eb;
}

@media (max-width: 750px) {
  .dashboard-lessons {
    grid-template-columns: 1fr;
  }
}
/* ===== CONTACTS (index.html) ===== */
.contacts-section {
  background: linear-gradient(135deg, #0f2027, #203a43, #2c5364);
  color: #fff;
  max-width: 100%;
  padding: 60px 24px;
}
.contacts-section h2 {
  text-align: center;
  font-size: 2rem;
  margin-bottom: 8px;
}
.contacts-section .subtitle {
  text-align: center;
  color: #a0c4d8;
  margin-bottom: 48px;
}
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  max-width: 900px;
  margin: 0 auto 40px;
}
.contact-card {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 16px;
  padding: 24px 20px;
  text-align: center;
  transition: transform 0.25s, background 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.contact-card:hover {
  transform: translateY(-6px);
  background: rgba(255,255,255,0.14);
}
.contact-card--info {
  cursor: default;
}
.contact-card--info:hover {
  transform: none;
}
.contact-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  display: block;
}
.contact-card h4 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: #e0f0ff;
}
.contact-card p {
  font-size: 0.88rem;
  color: #7ec8e3;
  margin: 0;
  word-break: break-all;
}

/* Map */
.map-visual {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 2px solid rgba(255,255,255,0.12);
}
.map-visual iframe {
  width: 100%;
  height: 300px;
  border: none;
  display: block;
  filter: saturate(0.7) brightness(0.85);
}
.map-label {
  background: rgba(255,255,255,0.07);
  padding: 12px 20px;
  font-size: 0.88rem;
  color: #a0c4d8;
}

/* ===== CONTACTS (legal.html) ===== */
.contacts-legal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 8px;
}
.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px;
  border-radius: 14px;
  background: #f1f5f9;
  text-decoration: none;
  color: var(--dark);
  transition: background 0.2s, transform 0.2s;
}
a.contact-item:hover {
  background: #dbeafe;
  transform: translateY(-3px);
}
.contact-item span {
  font-size: 1.6rem;
  flex-shrink: 0;
}
.contact-item b {
  display: block;
  font-size: 0.85rem;
  color: var(--gray);
}
.contact-item p {
  margin: 4px 0 0;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--blue);
  word-break: break-all;
}
.contacts-legal .map-visual {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  overflow: hidden;
}
.contacts-legal .map-visual iframe {
  filter: none;
  height: 260px;
}
.contacts-legal .map-label {
  background: #f8fafc;
  color: var(--gray);
}

/* Footer links */
footer a {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 700;
}

/* ═══════════════════════════════════════════
   ADMIN PANEL STYLES
   ═══════════════════════════════════════════ */

/* Nav badge */
.admin-nav-badge {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: white;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.3px;
}

/* Header card */
.admin-header-card {
  background: linear-gradient(135deg, #1e3a5f, #1e40af);
  border-radius: 24px;
  padding: 28px 32px;
  margin-bottom: 16px;
  color: white;
}
.admin-title-row {
  display: flex;
  align-items: center;
  gap: 18px;
}
.admin-crown {
  font-size: 2.8rem;
  line-height: 1;
}
.admin-header-card h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  color: white;
}
.admin-header-card p {
  margin: 0;
  color: #93c5fd;
  font-size: 0.9rem;
}

/* Tabs */
.admin-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.admin-tab {
  padding: 10px 22px;
  border-radius: 12px;
  border: 2px solid #e2e8f0;
  background: white;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--gray);
  transition: all 0.2s;
}
.admin-tab:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.admin-tab.active {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

/* Panel header */
.admin-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 10px;
}
.admin-panel-header h3 {
  margin: 0;
  font-size: 1.1rem;
}

/* Stats */
.admin-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.admin-stat {
  background: #f1f5f9;
  border-radius: 16px;
  padding: 18px 20px;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--blue);
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--gray);
  font-weight: 600;
}

/* Table */
.admin-table-scroll {
  overflow-x: auto;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}
.admin-table th {
  background: #f1f5f9;
  padding: 12px 14px;
  text-align: left;
  font-weight: 800;
  color: var(--gray);
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
}
.admin-table td {
  padding: 11px 14px;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}
.admin-table tr:last-child td {
  border-bottom: none;
}
.admin-table tr:hover td {
  background: #f8fafc;
}
.row-blocked td {
  opacity: 0.55;
  background: #fff7f7;
}

/* Cell classes */
.td-email   { font-weight: 600; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-uid     { font-family: monospace; font-size: 0.78rem; color: var(--gray); max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-date    { white-space: nowrap; color: var(--gray); }
.td-order-id{ font-family: monospace; font-size: 0.78rem; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-actions { white-space: nowrap; }

/* Badges */
.role-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.role-admin { background: #fef3c7; color: #92400e; }
.role-user  { background: #e0f2fe; color: #075985; }

.paid-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
}
.paid-yes { background: #dcfce7; color: #15803d; }
.paid-no  { background: #fee2e2; color: #991b1b; }

.status-badge {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: capitalize;
}
.status-success, .status-sandbox { background: #dcfce7; color: #15803d; }
.status-created  { background: #fef9c3; color: #854d0e; }
.status-failure  { background: #fee2e2; color: #991b1b; }

/* Action buttons */
.btn-admin {
  padding: 5px 11px;
  border-radius: 8px;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  margin: 2px;
  transition: opacity 0.15s;
}
.btn-admin:hover { opacity: 0.8; }
.btn-toggle-paid  { background: #dbeafe; color: #1d4ed8; }
.btn-toggle-block { background: #fef3c7; color: #92400e; }
.btn-delete-user  { background: #fee2e2; color: #991b1b; }

/* Misc */
.admin-loading { color: var(--gray); font-style: italic; }
.admin-error   { color: #dc2626; font-weight: 600; }
.admin-hint    { color: var(--gray); font-size: 0.9rem; }

@media (max-width: 650px) {
  .admin-tabs { flex-direction: column; }
  .admin-stats-row { grid-template-columns: 1fr 1fr; }
  .td-actions { display: flex; flex-wrap: wrap; gap: 4px; }
}
