* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #f8f9fc;
  color: #1e293b;
  font-family: Arial, Helvetica, sans-serif;
  margin-bottom: 30px;
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
  color: inherit;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  background: white;
  border-bottom: 1px solid #e2e8f0;
  padding: 15px 0;
  margin-bottom: 60px;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 20px;
}

.nav-list {
  display: flex;
}

.nav-item {
  font-size: 18px;
  color: #475569;
}

.nav-link:hover {
  color: #6366f1;
}

.nav-link:active {
  color: #6366f1;
}

.nav-item:not(:last-child) {
  margin-right: 15px;
}

.hero-container {
  text-align: center;
  margin-bottom: 40px;
}

.hero-title {
  font-size: 42px;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-title .highlight {
  color: rgb(99, 102, 241);
}

.login-container {
  text-align: center;
  margin-bottom: 60px;
}

.telegram-login-btn {
  background-color: #2aabee;
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  display: inline-block;
  transition: transform 0.2s;
  box-shadow: 0 10px 20px -5px rgba(42, 171, 238, 0.4);
}

.telegram-login-btn:hover {
  transform: translateY(-3px);
}

.cards-flex-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 25px;
}

.card {
  background: white;
  padding: 30px;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
  transition: all 0.3s ease;
}

.card-analys {
  flex: 1 1 100%;
}

.card:hover {
  transform: translateY(-5px);
  border-color: #6366f1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.card-title {
  font-size: 24px;
  margin-bottom: 15px;
  color: #0f172a;
}

.card-text {
  font-size: 16px;
  color: #475569;
  margin-bottom: 15px;
}

.check-list {
  margin-bottom: 3px;
}

.check-list li {
  position: relative;
  padding-left: 25px;
  margin-bottom: 8px;
  color: #334155;
}

.check-list li::before {
  content: "✔";
  position: absolute;
  left: 5px;
  top: -3px;
  color: #6366f1;
}

.stats-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.stats-list li {
  background: #f1f5f9;
  padding: 8px 16px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 14px;
}

.guide-container {
  text-align: center;
  margin-bottom: 40px;
}

.guide-list {
  list-style: none;
  counter-reset: myset;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 20px; /* Отступ между карточками */
}

.guide-item {
  position: relative;
  padding: 20px 20px 20px 80px;
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: left;
  line-height: 1.5;
  align-items: center;
  min-height: 60px;
  color: #1e293b;
}

.guide-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border-color: #6366f1;
}

.guide-item::before {
  counter-increment: myset;
  content: counter(myset);
  position: absolute;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 34px;
  border-radius: 50%;
  background: #6366f1;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-family: sans-serif;
  font-size: 16px;
  line-height: 1;
  padding: 1px;
  padding-top: 2px;
}

.guide-caption {
  color: #64748b;
  font-size: 24px;
  margin-bottom: 40px;
}

.guide-title {
  font-size: 30px;
  margin-bottom: 40px;
  color: #0f172a;
  font-weight: 800;
}

.guide-link {
  color: #6366f1;
  font-weight: 700;
}

.guide-list:not(:last-child) {
  margin-bottom: 40px;
}

.ai-prompt-container {
  margin-bottom: 40px;
}

.prompt-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.prompt-title {
  font-size: 30px;
  color: #0f172a;
  font-weight: 800;
}

.btn {
  background: none;
  border: none;
  font-size: 16px;
  cursor: pointer;
  background-color: #6366f1;
  padding: 12px 30px;
  border-radius: 30px;
  color: white;
  font-weight: 700;
}

.copy-utils {
  display: flex;
  align-items: center;
}

.copy-alert {
  font-size: 16px;
  color: #64748b;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease-in-out;
  margin-right: 20px;
}

.copy-alert.active {
  opacity: 1;
  visibility: visible;
}

.prompt-bottom {
  text-align: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.6;
  max-height: 400px;
  overflow-y: auto;
  background: white;
  color: #64748b;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.document-container {
  margin-bottom: 40px;
  text-align: center;
}

.document-list {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 60px;
}

.document-item-zero {
  flex: 1 1 300px;
  overflow: hidden;
  font-size: 0;
}

.document-item-link {
  padding: 30px;
}

.document-item {
  background: white;
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
  transition: all 0.3s ease;
}

.document-item:hover {
  transform: translateY(-5px);
  border-color: #6366f1;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.niche-page {
  margin-bottom: 60px;
}

.niche-container {
  max-width: 1400px;
}

.niche-title {
  font-size: 42px;
  font-weight: 800;
  text-align: center;
  margin-bottom: 30px;
  color: #0f172a;
}

.period-selector {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}

.period-selector label {
  font-size: 16px;
  font-weight: 600;
  color: #475569;
}

.period-select {
  padding: 10px 16px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: white;
  color: #1e293b;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.period-select:hover {
  border-color: #6366f1;
}

.period-select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.table-wrapper {
  overflow-x: auto;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid #e2e8f0;
}

.niche-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 900px;
}

.niche-table thead {
  background: #2a2a2a;
  color: #e0e0e0;
}

.niche-table th {
  padding: 16px 12px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  border: 1px solid #444444;
  white-space: nowrap;
}

.niche-table tbody tr {
  background: #2a2a2a;
  transition: background-color 0.2s;
}

.niche-table tbody tr:hover {
  background: #333333;
}

.niche-table td {
  padding: 12px;
  border: 1px solid #444444;
  color: #e0e0e0;
  font-size: 14px;
}

.title-cell {
  text-align: left;
  min-width: 300px;
}

.video-cell {
  text-align: center;
  min-width: 250px;
}

.video-cell a {
  color: #60a5fa;
  text-decoration: underline;
  word-break: break-all;
}

.video-cell a:hover {
  color: #93c5fd;
}

.views-cell {
  text-align: center;
  font-weight: 600;
  min-width: 100px;
}

.translation-cell {
  text-align: left;
  min-width: 250px;
}

.transcript-cell {
  text-align: center;
  width: 120px;
  background: #1f1f1f;
}

.cell-with-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.copy-btn {
  padding: 6px 10px;
  background-color: #4b5563;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
  flex-shrink: 0;
}

.copy-btn:hover {
  background-color: #6b7280;
  transform: scale(1.05);
}

.copy-btn:active {
  transform: scale(0.95);
}

.transcript-btn {
  display: inline-block;
  padding: 8px 14px;
  color: white;
  text-decoration: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
}

.transcript-1 {
  background-color: #ef4444;
}

.transcript-1:hover {
  background-color: #dc2626;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(239, 68, 68, 0.3);
}

.transcript-2 {
  background-color: #10b981;
}

.transcript-2:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.loading-message,
.error-message {
  text-align: center;
  padding: 40px 20px;
  font-size: 18px;
  font-weight: 600;
}

.loading-message {
  color: #6366f1;
}

.error-message {
  color: #ef4444;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.no-data {
  text-align: center;
  padding: 40px 20px;
  color: #94a3b8;
  font-style: italic;
}

.subscription-card {
  background: white;
  border-radius: 16px;
  padding: 40px;
  text-align: center;
  max-width: 600px;
  margin: 60px auto;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border: 2px solid #e2e8f0;
}

.subscription-active {
  border-color: #10b981;
}

.subscription-title {
  font-size: 32px;
  margin-bottom: 20px;
  color: #0f172a;
}

.subscription-text {
  font-size: 18px;
  color: #475569;
  margin-bottom: 15px;
  line-height: 1.6;
}

.telegram-bot-link {
  display: inline-block;
  background-color: #2aabee;
  color: white;
  padding: 16px 32px;
  border-radius: 12px;
  font-size: 18px;
  font-weight: 600;
  margin: 20px 0;
  transition: transform 0.2s;
  box-shadow: 0 10px 20px -5px rgba(42, 171, 238, 0.4);
}

.telegram-bot-link:hover {
  transform: translateY(-3px);
}

.subscription-actions {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin: 25px 0;
  flex-wrap: wrap;
}

.btn-primary {
  background-color: #6366f1;
  color: white;
  padding: 14px 28px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  transition: all 0.2s;
  text-decoration: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  background-color: #4f46e5;
  box-shadow: 0 8px 15px rgba(99, 102, 241, 0.3);
}

.btn-logout {
  background: none;
  border: 2px solid #ef4444;
  color: #ef4444;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  margin-top: 20px;
  transition: all 0.2s;
}

.btn-logout:hover {
  background-color: #ef4444;
  color: white;
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 32px;
  }
  .card {
    flex: 1 1 100%;
  }
  .telegram-login-btn {
    width: 100%;
    text-align: center;
  }
}

@media (min-width: 1200px) {
  .card-analys {
    flex: 1 1 600px;
  }
}

@media (max-width: 768px) {
  .niche-title {
    font-size: 28px;
  }

  .period-selector {
    flex-direction: column;
    align-items: stretch;
  }

  .period-select {
    width: 100%;
  }

  .niche-table th,
  .niche-table td {
    padding: 8px;
    font-size: 12px;
  }

  .cell-with-copy {
    flex-direction: column;
    align-items: flex-start;
  }

  .copy-btn {
    align-self: flex-end;
  }
}
