/*CSS VARIABLES & BASE*/
:root {
  --primary: #2c3e50;
  --secondary: #3498db;
  --accent: #2ecc71;
  --dark: #1a1a1a;
  --light: #f8f9fa;
  --gray: #6c757d;
  --border-radius: 8px;
  --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
  --transition: all 0.3s ease;
}

* {
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  color: #fff;
  background: linear-gradient(135deg, #0c0e15 0%, #1a2a3a 100%);
  background-attachment: fixed;
  overflow-x: hidden;
}

/*CONTAINER & LAYOUT*/
@media (min-width: 1200px) {
  .container {
    max-width: 1450px !important;
  }
}

/*LOGO & BRANDING*/
.logo-image {
  max-width: 35px;
  margin-right: 8px;
}

.navbar-brand {
  display: flex;
  align-items: center;
  color: #fff !important;
  font-weight: 700;
  font-size: 1.5rem;
}

.navbar-brand__text {
  font-size: 25px;
  font-weight: 700;
  color: #fff !important;
  margin-right: 50px;
  margin-left: 8px;
}

/*NAVBAR */
.navbar {
  background: #121722;
  position: fixed;
  width: 100%;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-item {
  margin-right: 25px;
}

.nav-link {
  color: #b8b8b8 !important;
  font-weight: 500;
  padding: 0.5rem 0;
  position: relative;
  transition: var(--transition);
  font-size: 20px;
}

.nav-link:hover {
  color: #fff !important;
}

.nav-item.active .nav-link {
  color: #fff !important;
  font-weight: 700;
}

.nav-item.active .nav-link::after {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/*BUTTONS */
.buttons {
  color: #fff;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--accent), #1abc9c);
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
  font-size: 1.05rem;
  text-decoration: none;
  display: inline-block;
  margin-right: 1rem;
}

.open_clean_form {
    color: #fff;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--accent), #1abc9c);
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
  font-size: 1.05rem;
  text-decoration: none;
  display: inline-block;
  margin-right: 1rem;
}

.buttons:hover {
  color: #fff;
  text-decoration: none;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
}

.buttons-light {
  color: #fff;
  border-radius: 30px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  backdrop-filter: blur(5px);
  font-size: 1.2rem;
  text-decoration: none;
  display: inline-block;
}

.buttons-light:hover {
  color: #fff;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

.btn-primary {
  color: #fff;
  border-radius: 30px;
  background: linear-gradient(90deg, var(--accent), #1abc9c);
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
  font-size: 1.05rem;
  height: auto;
  line-height: 1.5;
}

.btn-primary:hover {
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
  text-decoration: none;
}

/*HEADER SECTION*/
.header {
  background: url(../images/header_background.png);
  background-repeat: no-repeat;
  background-position: right;
  background-size: contain;
  display: flex;
  min-height: 850px;
  align-items: center;
  padding-top: 90px;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(12, 15, 21, 0.7) 0%, rgba(26, 42, 58, 0.95) 70%);
  z-index: -1;
}

.header::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 30% 30%, rgba(46, 204, 113, 0.1) 0%, transparent 30%),
    radial-gradient(circle at 70% 70%, rgba(52, 152, 219, 0.1) 0%, transparent 30%);
  z-index: -1;
}

.header-text__h1 {
  color: #fff;
  font-size: 60px;
  font-weight: 750;
  letter-spacing: 1px;
  margin-bottom: 20px;
  background: linear-gradient(to right, var(--accent), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  line-height: 1.2;
}

.header-text__p {
  font-size: 22px;
  opacity: 0.8;
  margin-bottom: 30px;
  max-width: 700px;
}

/*FORM INPUTS & LOGIN*/
.inputs {
  width: 100%;
  background: rgba(20, 25, 35, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
  text-align: center;
  color: #fff;
  transition: var(--transition);
}

.inputs:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.2);
}

.login-links {
  display: block;
  color: var(--gray);
  transition: var(--transition);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  text-decoration: none;
  border: 1px solid transparent;
}

.login-links:hover {
  color: var(--accent);
  text-decoration: none;
  padding-left: 1.25rem;
  background: rgba(46, 204, 113, 0.1);
  border-color: rgba(46, 204, 113, 0.2);
}

/*MODAL WINDOW*/
.modal-content {
  background: rgba(30, 40, 60, 0.95);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.modal-header {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.5rem;
}

.modal-title {
  color: #fff;
  font-size: 1.5rem;
}

.close {
  color: var(--gray) !important;
  opacity: 1;
  transition: var(--transition);
}

.close:hover {
  color: var(--accent) !important;
}

.modal-body {
  padding: 1.5rem;
}

/* NOTIFICATIONS - Исправленный стиль */
.notification {
  /* Позиционирование поверх всех элементов */
  position: absolute;
  top: 90px; /* Отступ сверху (высота navbar + отступ) */
  left: 40%;
  transform: translateX(-50%); /* Центрирование по горизонтали */
  transform: translateY(10px);
  z-index: 1050; /* Выше чем navbar (1000) и header */
  
  /* Размеры и форма "куба" */
  width: 90%;
  max-width: 600px; /* Ограничение ширины для блочного вида */
  min-height: 100px; /* Минимальная высота */
  
  /* Оформление */
  background: rgba(30, 40, 60, 0.95); /* Плотный фон, чтобы текст не просвечивал */
  padding: 25px 30px;
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  
  /* Анимация появления */
  opacity: 0;
  animation: slideDown 0.4s ease forwards;
}

/* Анимация появления */
@keyframes slideDown {
  from {
    opacity: 0;
    top: 60px;
  }
  to {
    opacity: 1;
    top: 80px;
  }
}

.notification > h2 {
  color: #fff;
  font-size: 22px;
  margin: 0 0 10px 0; /* Отступ только снизу */
  font-weight: 700;
  line-height: 1.3;
}

.notification > p {
  margin: 0;
  padding: 0;
  color: #fff;
  opacity: 0.85;
  font-size: 15px;
  line-height: 1.5; /* Улучшенная читаемость */
}

/* Адаптив для мобильных */
@media (max-width: 768px) {
  .notification {
    top: 70px;
    width: 95%;
    padding: 20px;
  }
  
  .notification > h2 {
    font-size: 18px;
  }
  
  .notification > p {
    font-size: 13px;
  }
}
/* RESPONSIVE DESIGN (Mobile First)*/
@media (max-width: 768px) {
body {
background-attachment: scroll;
}
  
  .header-text__h1 {
    font-size: 32px;
  }
  
  .header-text__p {
    font-size: 14px;
  }
  
  .buttons,
  .buttons-light {
    width: 100%;
    max-width: 300px;
    margin-bottom: 10px;
    display: block;
    text-align: center;
  }
  
  .btn-primary {
    width: 100%;
    max-width: 300px;
    margin-top: 15px;
  }
  
  .navbar {
    padding: 0.75rem 0;
  }
}

@media (max-width: 480px) {
  .header-text__h1 {
    font-size: 28px;
  }
  
  .navbar-brand__text {
    font-size: 18px;
    margin-right: 20px;
  }
}

/*Content-block*/
.content-block {
    transform: translateY(100px);
    border-radius: 3px;
    background: linear-gradient(#0c0e15 0%, #1a2a3a 100%);
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.4);
    padding: 25px;
}

.content-block__name {
  font-weight: 600;
  margin-bottom: 12px;
}
.content-block__body {
  margin-left: -10px;
}

/* Принудительно скрыть backdrop */
.modal-backdrop.show {
    display: none !important;
    opacity: 0 !important;
}

/* Разблокировать прокрутку */
body.modal-open {
    overflow: auto !important;
    padding-right: 0 !important;
}

/* Карта новостей */

.card-body {
    background: linear-gradient(#0c0e15 0%, #1a2a3a 100%);
}

.card-img-top {
    background: #0c0e15;
}

.card-title {
  font-size: 30px;
}

.card-text {
  font-size: 18px;
}

/* content-block1 */
.content-block1 {
  margin-top: 10px;
  max-width: 430px;
}

/* install instruction */
/* Инструкции по установке */
.install-instructions {
  font-size: 1.15rem;
  line-height: 1.7;
  color: #fff;
}

.install-instructions code {
  background: rgba(46, 204, 113, 0.15);
  color: var(--accent);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.95em;
}

.install-instructions kbd {
  background: rgba(52, 152, 219, 0.25);
  color: var(--secondary);
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid rgba(52, 152, 219, 0.4);
  font-size: 0.9em;
  margin: 0 2px;
}

/* Карточка шага */
.step-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(30, 40, 60, 0.6);
  border-radius: var(--border-radius);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: var(--transition);
}

.step-card:hover {
  border-color: rgba(46, 204, 113, 0.3);
  background: rgba(30, 40, 60, 0.8);
  transform: translateX(3px);
}

.step-number {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, var(--accent), #1abc9c);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 3px 10px rgba(46, 204, 113, 0.3);
}

.step-text {
  flex: 1;
}

.step-text strong {
  color: var(--accent);
  font-weight: 600;
}

.path-hint {
  display: inline-block;
  margin: 6px 0 4px;
  padding: 6px 12px;
  background: rgba(52, 152, 219, 0.15);
  border-radius: 6px;
  border-left: 3px solid var(--secondary);
  font-family: 'Consolas', monospace;
  font-size: 1.05rem;
}

/* Алерт в стиле ZEROCRAFT */
.zerocraft-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(46, 204, 113, 0.12), rgba(26, 188, 156, 0.08));
  border: 1px solid rgba(46, 204, 113, 0.35);
  border-radius: var(--border-radius);
  box-shadow: 0 4px 20px rgba(46, 204, 113, 0.15);
}

.alert-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.alert-text {
  flex: 1;
  font-size: 1.05rem;
  line-height: 1.6;
}

.alert-text strong {
  color: var(--accent);
}

/* Адаптив для мобильных */
@media (max-width: 576px) {
  .install-instructions {
    font-size: 1.05rem;
  }
  
  .step-card {
    padding: 10px 14px;
  }
  
  .step-number {
    width: 24px;
    height: 24px;
    font-size: 0.9rem;
  }
  
  .path-hint {
    font-size: 0.95rem;
    padding: 5px 10px;
  }
}

/* Скрыть share-popup */
#share-popup,
[class*="share-popup"],
[id*="share-popup"],
.social ul li a.tw,
.social ul li a.fb,
.social ul li a.vk,
.social ul li a.gp {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  opacity: 0 !important;
}
/* STORY ARTICLE STYLES */
.box.story {
    background: linear-gradient(135deg, rgba(12, 14, 21, 0.95) 0%, rgba(26, 42, 58, 0.95) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--box-shadow);
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.story-header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}

.story-title {
    font-size: 42px;
    font-weight: 750;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.story-badge {
    display: inline-block;
    background: rgba(46, 204, 113, 0.15);
    color: var(--accent);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.story-image-container {
    position: relative;
    margin: 40px 0;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.story-image {
    width: 100%;
    height: auto;
    display: block;
    transition: var(--transition);
}

.story-image-container:hover .story-image {
    transform: scale(1.02);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(12, 14, 21, 0.95), transparent);
    color: #fff;
    padding: 30px 25px 20px;
    font-size: 16px;
    font-weight: 500;
}

.story-content {
    color: #fff;
}

.lead-text {
    font-size: 20px;
    line-height: 1.8;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

.lead-text strong {
    color: var(--accent);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 40px 0;
}

.feature-card {
    background: rgba(30, 40, 60, 0.6);
    border-radius: var(--border-radius);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(46, 204, 113, 0.3);
    box-shadow: 0 10px 30px rgba(46, 204, 113, 0.15);
}

.feature-icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: block;
}

.feature-card h3 {
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 12px;
    font-weight: 600;
}

.feature-card p {
    font-size: 15px;
    line-height: 1.7;
    opacity: 0.85;
    margin: 0;
}

.feature-card strong {
    color: #fff;
}

.server-info-block {
    background: linear-gradient(135deg, rgba(46, 204, 113, 0.1), rgba(26, 188, 156, 0.05));
    border: 2px solid rgba(46, 204, 113, 0.3);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}

.server-info-block h3 {
    color: var(--accent);
    font-size: 26px;
    margin-bottom: 20px;
}

.server-address {
    margin: 20px 0;
}

.address-label {
    display: block;
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 8px;
}

.address-code {
    display: inline-block;
    background: rgba(12, 14, 21, 0.8);
    color: var(--accent);
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 24px;
    font-weight: 700;
    border: 1px solid rgba(46, 204, 113, 0.4);
    font-family: 'Consolas', monospace;
}

.server-description {
    font-size: 15px;
    opacity: 0.85;
    margin: 0;
}

.highlight {
    color: var(--accent);
    font-weight: 600;
}

.content-section {
    margin: 40px 0;
}

.content-section h3 {
    color: var(--secondary);
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: 600;
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 12px 0;
    font-size: 16px;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list li strong {
    color: var(--accent);
}

.cta-section {
    text-align: center;
    margin-top: 50px;
    padding: 40px;
    background: rgba(30, 40, 60, 0.4);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.cta-text {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-story-primary,
.btn-story-secondary {
    display: inline-block;
    padding: 14px 35px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 16px;
    text-decoration: none;
    transition: var(--transition);
    margin: 10px;
}

.btn-story-primary {
    background: linear-gradient(90deg, var(--accent), #1abc9c);
    color: #fff;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4);
}

.btn-story-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(46, 204, 113, 0.6);
    color: #fff;
}

.btn-story-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-story-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    color: #fff;
}

/* Адаптивность */
@media (max-width: 768px) {
    .box.story {
        padding: 25px;
        margin: 20px 10px;
    }
    
    .story-title {
        font-size: 28px;
    }
    
    .lead-text {
        font-size: 16px;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card {
        padding: 20px;
    }
    
    .address-code {
        font-size: 18px;
        padding: 10px 20px;
    }
    
    .cta-section {
        padding: 25px;
    }
    
    .btn-story-primary,
    .btn-story-secondary {
        display: block;
        margin: 10px auto;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .story-title {
        font-size: 24px;
    }
    
    .feature-icon {
        font-size: 36px;
    }
    
    .feature-card h3 {
        font-size: 18px;
    }
}

/* Ограничивающий контейнер для статьи */
.box.story {
    background: linear-gradient(135deg, rgba(12, 14, 21, 0.95) 0%, rgba(26, 42, 58, 0.95) 100%);
    border-radius: var(--border-radius);
    padding: 40px;
    margin: 30px auto;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--box-shadow);
    max-width: 1000px;
    overflow: hidden; /* Предотвращает выход контента за границы */
    position: relative;
}

/* Обертка для изображения */
.story-image-wrapper {
    position: relative;
    width: 100%;
    margin: 30px 0;
    border-radius: var(--border-radius);
    overflow: hidden; /* Обрезает изображение по границам */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    background: rgba(12, 14, 21, 0.6);
}

/* Само изображение */
.story-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover; /* Сохраняет пропорции и заполняет контейнер */
    max-width: 100%; /* Гарантирует что не выйдет за границы */
    transition: transform 0.3s ease;
}

/* Эффект при наведении */
.story-image-wrapper:hover .story-image {
    transform: scale(1.02);
}

/* Подпись к изображению */
.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(12, 14, 21, 0.95), transparent);
    color: #fff;
    padding: 30px 25px 20px;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .box.story {
        padding: 25px;
        margin: 20px 10px;
    }
    
    .story-image-wrapper {
        margin: 20px 0;
    }
    
    .image-caption {
        padding: 20px 15px 15px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .box.story {
        padding: 20px;
    }
}