/* Путь: /var/www/fastuser/data/www/murvpn.com/static/css/style.css
   Описание: Все стили сайта MurVPN, тёмная и светлая темы */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

/* ── CSS-переменные: тёмная тема (по умолчанию) ── */
:root {
  --bg: #0d1117;
  --bg-card: #161b22;
  --bg-card-hover: #1c2333;
  --bg-elevated: #21262d;
  --border: #30363d;
  --border-light: #21262d;
  --text: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-text: #ffffff;
  --hero-gradient: linear-gradient(135deg, #0d1117 0%, #161b22 50%, #1a2332 100%);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
  --promo-bg: #1a2332;
  --promo-border: #3b82f6;
  --success: #3fb950;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
}

/* ── Светлая тема ── */
[data-theme="light"] {
  --bg: #ffffff;
  --bg-card: #f8fafc;
  --bg-card-hover: #f1f5f9;
  --bg-elevated: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #e2e8f0;
  --text: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-text: #ffffff;
  --hero-gradient: linear-gradient(135deg, #eff6ff 0%, #f8fafc 50%, #e0e7ff 100%);
  --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  --card-shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.12);
  --promo-bg: #eff6ff;
  --promo-border: #2563eb;
}

/* ── Сброс и база ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background var(--transition), color var(--transition);
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--accent-hover);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Шапка ── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: background var(--transition), border var(--transition);
}

.header__inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
  height: 64px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header__brand {
  display: flex;
  align-items: center;
}

.header__logo {
  height: 36px;
  width: auto;
}

.header__tg {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.header__tg:hover {
  color: var(--text);
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-self: end;
}

.header__link {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.header__link:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.header__link--primary {
  background: var(--accent);
  color: var(--accent-text) !important;
  font-weight: 600;
}

.header__link--primary:hover {
  background: var(--accent-hover);
}

.header__link--accent {
  border: 1px solid var(--accent);
  color: var(--accent) !important;
  font-weight: 600;
}

.header__link--accent:hover {
  background: var(--accent);
  color: var(--accent-text) !important;
}

.theme-toggle {
  background: none;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 18px;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.theme-toggle:hover {
  background: var(--bg-elevated);
}

/* ── Hero ── */
.hero {
  padding: 80px 0 60px;
  text-align: center;
  background: var(--hero-gradient);
  transition: background var(--transition);
}

.hero__title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.hero__subtitle {
  font-size: 20px;
  color: var(--text-secondary);
  margin-bottom: 48px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.hero__cta {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 48px;
}

.cta-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  flex: 1;
  max-width: 340px;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
}

.cta-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.cta-card__icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.cta-card__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-card__desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.cta-card__button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text) !important;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  transition: background var(--transition);
  margin-top: auto;
}

.cta-card__button:hover {
  background: var(--accent-hover);
}

.hero__hint {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 32px;
}

.hero__counter {
  font-size: 28px;
  font-weight: 700;
  color: var(--accent);
}

.hero__counter-label {
  font-size: 16px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ── Тарифы ── */
.pricing {
  padding: 80px 0;
}

.section-title {
  font-size: 32px;
  font-weight: 700;
  text-align: center;
  margin-bottom: 48px;
  letter-spacing: -0.01em;
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
  justify-content: center;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.pricing-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
  border-color: var(--accent);
}

.pricing-card--daily {
  border-color: var(--accent);
  position: relative;
}

.pricing-card--daily::before {
  content: '🔥';
  position: absolute;
  top: -12px;
  right: -8px;
  font-size: 20px;
}

.pricing-card--standard {
  border-color: var(--accent);
}

.pricing-card__name {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
}

.pricing-card__desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.5;
}

.pricing-card__price {
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 16px;
}

.pricing-card__features {
  list-style: none;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pricing-card__features li {
  padding: 4px 0;
  border-bottom: 1px solid var(--border-light);
}

.pricing-card__features li:last-child {
  border-bottom: none;
}

.pricing-card__button {
  display: inline-block;
  width: 100%;
  background: var(--accent);
  color: var(--accent-text) !important;
  padding: 10px 0;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--transition);
  margin-top: auto;
}

.pricing-card__button:hover {
  background: var(--accent-hover);
}

/* ── Прокси для Telegram ── */
.proxies-section {
  padding: 40px 0;
  text-align: center;
}

.proxies-section__desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 24px;
  line-height: 1.6;
}

.proxies-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 500px;
  margin: 0 auto 24px;
}

.proxy-link {
  display: block;
  padding: 12px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  transition: all var(--transition);
  word-break: break-all;
}

.proxy-link:hover {
  border-color: var(--accent);
  background: var(--bg-card-hover);
  transform: translateY(-1px);
  box-shadow: var(--card-shadow-hover);
}

.proxies-section__more {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
}

/* ── Баннер промокода ── */
.promo-banner__button {
  display: block;
  width: 100%;
  padding: 10px 0;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  text-align: center;
  transition: background var(--transition);
}

.promo-banner__button:hover {
  background: var(--accent-hover);
}

.promo-banner__button--link {
  display: block;
  color: var(--accent-text) !important;
  text-align: center;
}

/* ── FAQ ── */
.faq {
  padding: 40px 0 80px;
}

.accordion {
  max-width: 800px;
  margin: 0 auto;
}

.accordion__item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  overflow: hidden;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}

.accordion__header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 20px;
  background: none;
  border: none;
  color: var(--text);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  font-family: var(--font);
  transition: background var(--transition);
}

.accordion__header:hover {
  background: var(--bg-card-hover);
}

.accordion__arrow {
  font-size: 12px;
  transition: transform var(--transition);
  flex-shrink: 0;
  margin-left: 12px;
}

.accordion__item--open .accordion__arrow {
  transform: rotate(180deg);
}

.accordion__body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.accordion__body-inner {
  padding: 0 20px 16px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ── Баннер промокода ── */
.promo-banner {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 50;
  background: var(--promo-bg);
  border: 1px solid var(--promo-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  max-width: 300px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transition: all var(--transition);
}

.promo-banner__text {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}

.promo-banner__link {
  font-size: 13px;
  font-weight: 500;
}

.promo-banner__close {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 18px;
}

/* ── Основной контент + боковая колонка ── */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  padding: 0 0 80px;
}

.content-layout__main {
  min-width: 0;
}

.news-sidebar {
  position: sticky;
  top: 80px;
  align-self: start;
  padding-right: 8px;
}

.news-sidebar__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
}

.news-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: all var(--transition);
  box-shadow: var(--card-shadow);
}

.news-card--pinned {
  border-color: var(--accent);
}

.news-card__date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
  text-decoration: none;
  display: block;
}

.news-card__date:hover {
  color: var(--accent);
}

.hashtag-link {
  color: var(--accent);
  text-decoration: none;
}

.hashtag-link:hover {
  text-decoration: underline;
}

.news-card__text {
  font-size: 14px;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: 8px;
  line-height: 1.5;
}

.news-card__text--expanded {
  display: block;
  -webkit-line-clamp: unset;
}

.news-card__toggle {
  font-size: 13px;
  color: var(--accent);
  cursor: pointer;
  background: none;
  border: none;
  font-weight: 500;
}

.news-card__toggle:hover {
  color: var(--accent-hover);
}

.news-sidebar__all {
  display: inline-block;
  margin-top: 12px;
  font-size: 14px;
  font-weight: 500;
}

/* ── Подвал ── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 40px 0 24px;
  transition: background var(--transition), border var(--transition);
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer__logo {
  height: 28px;
  width: auto;
}

.footer__links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}

.footer__links a {
  color: var(--text-secondary);
  font-size: 14px;
}

.footer__links a:hover {
  color: var(--text);
}

.footer__support {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Админка ── */
.admin {
  padding: 40px 0 80px;
}

.admin__login {
  max-width: 360px;
  margin: 80px auto;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.admin__login-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

.admin__field {
  margin-bottom: 16px;
}

.admin__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--text-secondary);
}

.admin__input {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 14px;
  font-family: var(--font);
  transition: border var(--transition);
}

.admin__input:focus {
  outline: none;
  border-color: var(--accent);
}

.admin__textarea {
  min-height: 120px;
  resize: vertical;
  font-family: var(--font);
}

.admin__button {
  display: inline-block;
  padding: 10px 24px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: background var(--transition);
}

.admin__button:hover {
  background: var(--accent-hover);
}

.admin__button--danger {
  background: #da3633;
}

.admin__button--danger:hover {
  background: #c62828;
}

.admin__button--secondary {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}

.admin__button--secondary:hover {
  background: var(--bg-card-hover);
}

.admin__error {
  color: #da3633;
  font-size: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.admin__section {
  margin-bottom: 40px;
}

.admin__section-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
}

.admin__post {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.admin__post--pinned {
  border-color: var(--accent);
}

.admin__post-id {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 50px;
}

.admin__post-date {
  font-size: 12px;
  color: var(--text-muted);
  min-width: 150px;
}

.admin__post-preview {
  flex: 1;
  font-size: 13px;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin__post-actions {
  display: flex;
  gap: 8px;
}

.admin__editor {
  margin-top: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.admin__editor-buttons {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.admin__check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.admin__check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

/* ── Адаптив ── */
@media (max-width: 768px) {
  .hero__title {
    font-size: 32px;
  }

  .hero__subtitle {
    font-size: 16px;
  }

  .hero__cta {
    flex-direction: column;
    align-items: center;
  }

  .cta-card {
    max-width: 100%;
  }

  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
    padding: 0 16px;
  }

  .content-layout {
    grid-template-columns: 1fr;
  }

  .news-sidebar {
    position: static;
    order: 1;
    padding: 0 16px;
  }

  .content-layout__main {
    order: 2;
  }

  .promo-banner {
    bottom: 12px;
    right: 12px;
    left: 12px;
    max-width: none;
    max-height: 44px;
    overflow: hidden;
    padding: 10px 36px 10px 14px;
    cursor: pointer;
    transition: max-height 0.3s ease, padding 0.3s ease;
  }

  .promo-banner--expanded {
    max-height: 300px;
    padding: 16px 20px;
    cursor: default;
  }

  .promo-banner__text {
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0;
  }

  .promo-banner--expanded .promo-banner__text {
    white-space: normal;
    margin-bottom: 10px;
    font-size: 14px;
  }

  .promo-banner__button {
    display: none;
  }

  .promo-banner--expanded .promo-banner__button {
    display: block;
  }

  .promo-banner--expanded .promo-banner__button--link {
    display: block;
  }

  .promo-banner__close {
    top: 10px;
    right: 10px;
  }

  .footer__inner {
    flex-direction: column;
    text-align: center;
  }

  .footer__links {
    justify-content: center;
  }

  .section-title {
    font-size: 24px;
  }

  .header__inner {
    grid-template-columns: 1fr;
    gap: 4px;
    height: auto;
    padding-top: 8px;
    padding-bottom: 8px;
  }

  .header__brand {
    justify-content: center;
  }

  .header__logo {
    height: 28px;
  }

  .header__tg {
    font-size: 18px;
    text-align: center;
    padding: 2px 0;
  }

  .header__nav {
    gap: 6px;
    justify-self: center;
  }

  .header__link {
    font-size: 12px;
    padding: 6px 10px;
  }

  .header__link--primary {
    font-size: 12px;
  }
}
