/* ==========================================================================
   sportsheet — Clean Matte Dark Developer Business Card Styles (No Glow)
   ========================================================================== */

:root {
  --bg-color: #090a0f;
  --card-bg: #12151f;
  --card-border: rgba(255, 255, 255, 0.08);
  --card-border-hover: rgba(255, 255, 255, 0.16);
  
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --accent-cyan: #38bdf8;
  --accent-purple: #a855f7;
  --accent-green: #22c55e;
  --accent-tg: #229ed9;
  
  --font-main: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  
  --transition: all 0.2s ease;
}

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

body {
  min-height: 100vh;
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 70px 16px 30px; /* Отступ сверху для маскота */
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Тонкая фоновая сетка (без глоу)
   ========================================================================== */

.grid-overlay {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 32px 32px;
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Главная карточка-контейнер (матовый темный стиль)
   ========================================================================== */

.card-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  padding: 22px 20px 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible; /* Чтобы маскот аккуратно лежал на границе */
  animation: cardAppear 0.4s ease forwards;
}

@keyframes cardAppear {
  0% {
    opacity: 0;
    transform: translateY(14px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   Маскот котик (image.png) на верхнем краю карточки справа
   ========================================================================== */

.mascot-top {
  position: absolute;
  top: -53px;
  right: 28px;
  width: 120px;
  z-index: 10;
  pointer-events: none;
  user-select: none;
}

.mascot-top-img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.6));
}

/* ==========================================================================
   Шапка визитки: Язык (слева) и Время (справа)
   ========================================================================== */

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
  z-index: 2;
}

.lang-switch-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-main);
  padding: 5px 12px;
  border-radius: 9999px;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: var(--transition);
}

.lang-switch-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

.globe-icon {
  color: var(--accent-cyan);
}

.time-widget {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.03);
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Секция профиля: аватар без глоу и имя
   ========================================================================== */

.profile-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.avatar-wrapper {
  position: relative;
  width: 104px;
  height: 104px;
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.12);
  background: #181b24;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.profile-name {
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.profile-tag {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--accent-cyan);
  background: rgba(56, 189, 248, 0.06);
  padding: 2px 10px;
  border-radius: 9999px;
  display: inline-block;
  border: 1px solid rgba(56, 189, 248, 0.15);
}

.profile-bio {
  font-size: 0.88rem;
  color: var(--text-muted);
  max-width: 330px;
  line-height: 1.45;
}

/* ==========================================================================
   Секция действий: Telegram сверху, Get Script снизу
   ========================================================================== */

.actions-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

/* 1. Telegram карточка */
.tg-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-main);
  transition: var(--transition);
}

.tg-card:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(34, 158, 217, 0.4);
  transform: translateY(-1px);
}

.link-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tg-icon {
  background: rgba(34, 158, 217, 0.12);
  color: var(--accent-tg);
}

.link-info {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.link-label {
  font-size: 0.76rem;
  color: var(--text-dim);
  font-weight: 500;
}

.link-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  font-family: var(--font-mono);
}

.link-ext {
  color: var(--text-dim);
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.tg-card:hover .link-ext {
  color: var(--accent-cyan);
}

/* 2. Кнопка Get Script (чистый матовый стиль без глоу) */
.btn-get-script {
  position: relative;
  width: 100%;
  background: #171a25;
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: #ffffff;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: var(--transition);
  text-align: left;
}

.btn-get-script:hover {
  background: #1b1f2e;
  border-color: rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
}

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

.btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  background: #251d38;
  border: 1px solid rgba(168, 85, 247, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #c084fc;
  flex-shrink: 0;
}

.btn-text-group {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.btn-title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #ffffff;
}

.btn-hint {
  font-size: 0.76rem;
  color: var(--text-dim);
}

.btn-arrow {
  color: var(--text-dim);
  transition: transform 0.2s ease, color 0.2s ease;
}

.btn-get-script:hover .btn-arrow {
  transform: translateX(3px);
  color: #c084fc;
}

/* ==========================================================================
   МОДАЛЬНОЕ ОКНО "GET SCRIPT" (Без глоу)
   ========================================================================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.modal-dialog {
  position: relative;
  width: 100%;
  max-width: 500px;
  background: #11141c;
  border: 1px solid var(--card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s ease;
  z-index: 2;
}

.modal-overlay.active .modal-dialog {
  transform: scale(1);
}

.modal-header {
  background: #161a24;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title-box {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 600;
  color: #ffffff;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.modal-body {
  padding: 14px 16px;
}

.code-viewer-wrapper {
  background: #080a0f;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
  padding: 14px;
  max-height: 240px;
  overflow-y: auto;
}

.code-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-all;
}

.code-content {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: #38bdf8;
}

.modal-footer {
  background: #161a24;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 12px 16px;
  display: flex;
  justify-content: flex-end;
}

.btn-modal {
  font-family: var(--font-main);
  font-size: 0.86rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
}

.btn-copy {
  background: #272138;
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #ffffff;
}

.btn-copy:hover {
  background: #322849;
  border-color: rgba(168, 85, 247, 0.7);
  transform: translateY(-1px);
}

/* ==========================================================================
   Toast Notification (Без глоу)
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #161a24;
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  font-weight: 500;
  z-index: 2000;
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  color: var(--accent-green);
  font-weight: bold;
}

/* ==========================================================================
   Адаптивность (Mobile)
   ========================================================================== */

@media (max-width: 480px) {
  body {
    padding: 60px 10px 20px;
  }
  
  .card-container {
    padding: 20px 16px 22px;
    border-radius: 20px;
  }
  
  .mascot-top {
    top: -46px;
    right: 20px;
    width: 100px;
  }
}
