/* --- Глобальные переменные для нового дизайна --- */
:root {
    --color-bg: #16181e;
    --color-surface: #20242c;
    --color-surface-light: #2c313a;
    --color-border: #3a404b;
    --color-text-primary: #f0f0f0;
    --color-text-secondary: #8a919f;
    --color-accent: #6c63ff;
    --color-accent-hover: #574fde;
    --border-radius: 12px;
    --transition-speed: 0.25s;
  }
  
  /* --- Переопределение базовых стилей --- */
  body {
    background: var(--color-bg);
    color: var(--color-text-primary);
  }
  .tw-header {
    background: rgba(22, 24, 30, 0.7);
    backdrop-filter: blur(10px);
    border-bottom-color: var(--color-border);
  }
  
  /* --- Мобильная шапка: бургер и выдвижное меню, как в dashboard --- */
  /* Показываем бургер и скрываем правую часть шапки на телефонах */
  @media (max-width: 820px) {
    .header-right {
      display: none;
    }
    .burger {
      display: flex;
    }
  }
  
  /* Стили открытого офф‑канвас меню */
  .nav-open .header-right {
    display: flex;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    align-items: flex-start;
    padding: 6rem 2rem 2rem;
    gap: 1.5rem;
    z-index: 1000;
    box-shadow: -5px 0 15px rgba(0,0,0,0.3);
    border-left: 1px solid var(--color-border);
  }
  
  .nav-open .header-right .balance-display,
  .nav-open .header-right .user-email,
  .nav-open .header-right .btn {
    background: var(--color-surface-light);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
    width: 100%;
    box-sizing: border-box;
  }
  
  .nav-open .header-right .balance-display { display: flex; justify-content: space-between; align-items: center; }
  .nav-open .header-right .user-email { text-align: center; font-weight: 600; }
  .nav-open .header-right .btn { text-align: center; justify-content: center; }
  
  /* Позиционируем бургер поверх, чтобы легко закрывать */
  .nav-open .burger { position: fixed; right: 1.5rem; }
  .form-input {
    background-color: var(--color-surface);
    border-color: var(--color-border);
    border-radius: var(--border-radius);
    padding: 14px 16px;
    font-size: 1rem;
  }
  .form-input:focus {
      border-color: var(--color-accent);
      box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
  }

  /* --- Текстовое поле с иконкой глаза --- */
  .input-with-toggle {
    position: relative;
    display: flex;
    align-items: center;
  }
  .input-with-toggle .form-input {
    width: 100%;
    padding-right: 44px; /* место под кнопку */
  }
  .btn-eye {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    cursor: pointer;
    border-radius: 8px;
  }
  .btn-eye:hover, .btn-eye:focus {
    color: var(--color-text-primary);
    background-color: rgba(255,255,255,0.04);
    outline: none;
  }
  .btn-eye .icon-eye-off { display: none; }
  .btn-eye.is-visible .icon-eye { display: none; }
  .btn-eye.is-visible .icon-eye-off { display: inline-block; }
  
  /* --- Основная разметка страницы --- */
  .server-main {
    padding: 2rem 0 5rem;
  }
  
  .back-link {
      display: inline-block;
      color: var(--color-text-secondary);
      text-decoration: none;
      font-weight: 500;
      margin-bottom: 1.5rem;
      transition: color 0.2s;
  }
  .back-link:hover {
      color: var(--color-text-primary);
  }
  
  .server-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1.5rem;
  }
  .server-title {
      display: flex;
      align-items: center;
      gap: 1rem;
  }
  .server-icon {
      width: 48px;
      height: 48px;
      flex-shrink: 0;
      background-color: var(--color-surface);
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
  }
  .server-icon img {
      width: 28px;
      height: 28px;
  }
  .server-header h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.25rem 0;
  }
  .status-indicator {
    font-size: 0.9rem;
    font-weight: 500;
    color: #27c93f;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
  }
  .status-indicator::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: currentColor;
  }
  
  .server-actions {
    display: flex;
    gap: 0.5rem;
  }
  .action-btn {
      background-color: var(--color-surface);
      border: 1px solid var(--color-border);
      color: var(--color-text-secondary);
      border-radius: var(--border-radius);
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      transition: all 0.2s;
  }
  .action-btn:hover {
      background-color: var(--color-surface-light);
      color: var(--color-text-primary);
  }
  .action-btn svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
  }
  
  .server-tabs {
      display: flex;
      gap: 1rem;
      border-bottom: 1px solid var(--color-border);
      margin-bottom: 2.5rem;
      overflow-x: auto;              /* Горизонтальная прокрутка при нехватке места */
      -webkit-overflow-scrolling: touch; /* Плавный скролл на iOS */
      scrollbar-width: none;         /* Прячем скроллбар в Firefox */
  }
  .server-tabs::-webkit-scrollbar { display: none; } /* Прячем скроллбар в WebKit */
  .tab-item {
      padding: 0.75rem 0.25rem;
      color: var(--color-text-secondary);
      text-decoration: none;
      font-weight: 500;
      border-bottom: 2px solid transparent;
      transition: all 0.2s;
      white-space: nowrap;  /* Не переносим слова */
      flex: 0 0 auto;       /* Не даем сжиматься, пусть уходят в скролл */
  }
  .tab-item:hover {
      color: var(--color-text-primary);
  }
  .tab-item.active {
      color: var(--color-text-primary);
      border-bottom-color: var(--color-accent);
  }
  
  .dashboard-grid {
      display: grid;
      grid-template-columns: 1fr;
      gap: 1.5rem;
  }
  @media (min-width: 992px) {
      .dashboard-grid {
          grid-template-columns: repeat(3, 1fr);
      }
  }
  
  .chart-card {
      background-color: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--border-radius);
      padding: 1.5rem;
  }
  .chart-card.large {
      grid-column: span 1;
  }
  @media (min-width: 992px) {
      .chart-card.large {
          grid-column: span 2;
      }
  }
  .chart-card h3 {
      margin: 0 0 1.5rem 0;
      font-size: 1.1rem;
      font-weight: 600;
      color: var(--color-text-primary);
  }
  
  .traffic-header,
  .cpu-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }
  
  .traffic-info,
  .cpu-info {
      color: var(--color-text-secondary);
      font-size: 0.9rem;
      font-weight: 500;
  }
  /* --- Стили для подзаголовка --- */
  .chart-card h3 .subtitle {
      font-size: 0.9rem;
      font-weight: 500;
      color: var(--color-text-secondary);
      margin-left: 0.5rem;
  }
  
  
  /* --- Контейнер для графиков --- */
  .chart-container {
      position: relative;
      height: 250px; /* Фиксированная высота */
  }
  
  .doughnut-chart-container {
      position: relative;
      width: 180px;
      height: 180px;
      margin: 2rem auto;
  }
  .doughnut-chart-text {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
  }
  .doughnut-chart-text span {
      display: block;
      color: var(--color-text-secondary);
      font-size: 0.9rem;
  }
  .doughnut-chart-text #disk-usage-percent {
      font-size: 2rem;
      font-weight: 700;
      color: var(--color-text-primary);
  }
  
  .disk-stats {
      display: flex;
      justify-content: space-around;
      text-align: center;
      margin-top: 2rem;
  }
  .disk-stats > div {
      display: flex;
      flex-direction: column;
      align-items: center;
  }
  .disk-stats span {
      display: block;
      font-size: 0.85rem;
      color: var(--color-text-secondary);
      margin-top: 0.25rem;
      order: 2;
  }
  .disk-stats strong {
      font-weight: 600;
      font-size: 1.1rem;
      color: var(--color-text-primary);
      order: 1;
  }
  
  .info-card {
      background-color: var(--color-surface);
      border: 1px solid var(--color-border);
      border-radius: var(--border-radius);
      padding: 1.5rem;
  }
  .info-icon-wrapper {
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: var(--color-surface-light);
      color: var(--color-accent);
      display: flex;
      align-items: center;
      justify-content: center;
      margin-bottom: 1rem;
  }
  .info-icon-wrapper svg {
      width: 20px;
      height: 20px;
      fill: currentColor;
  }
  .info-card h3 {
      margin: 0 0 1.5rem 0;
      font-size: 1rem;
      font-weight: 600;
  }
  .access-info {
      display: flex;
      flex-direction: column;
      gap: 1rem;
  }
  .access-row {
      font-size: 0.9rem;
  }
  .access-row span {
      display: block;
      color: var(--color-text-secondary);
      margin-bottom: 0.25rem;
  }
  .access-row strong {
      font-weight: 500;
      font-family: 'SF Mono', 'Fira Code', monospace;
      color: var(--color-text-primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
      word-break: break-all;
  }
  .copy-icon {
      cursor: pointer;
      color: var(--color-text-secondary);
      transition: color 0.2s;
      width: 16px; /* Уменьшен размер */
      height: 16px; /* Уменьшен размер */
      flex-shrink: 0;
  }
  .copy-icon:hover {
      color: var(--color-text-primary);
  }

/* --- Стили для управления статистикой --- */
.stats-controls {
    margin-bottom: 2rem;
}
.dropdown-container {
    position: relative;
    display: inline-block;
}
.dropdown-btn {
    background: none;
    border: none;
    color: var(--color-text-primary);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    white-space: nowrap;
    flex-wrap: nowrap;
}
.dropdown-btn span {
    color: var(--color-text-secondary);
    white-space: nowrap;
}
.dropdown-btn strong {
    color: var(--color-accent);
    white-space: nowrap;
}
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-surface-light);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    margin-top: 0.5rem;
    z-index: 10;
    display: none;
    min-width: 150px;
}
.dropdown-container.open .dropdown-menu {
    display: block;
}
.dropdown-menu a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--color-text-primary);
    text-decoration: none;
    border-radius: 8px;
}
.dropdown-menu a:hover {
    background-color: var(--color-accent);
}

/* --- Стили для вкладок --- */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* --- Стили для вкладки Доступ --- */
.access-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0 0 2rem 0;
    letter-spacing: -0.02em;
}

.access-sections {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    margin-top: 1rem;
}

.access-section {
    display: flex;
    align-items: center;
    padding: 1.75rem 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    gap: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.access-section:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.15);
}

.access-icon {
    width: 56px;
    height: 56px;
    background-color: var(--color-surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
}

.access-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-text-primary);
}

.access-content {
    flex: 1;
    min-width: 0;
}

.access-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.access-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.access-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-text {
    background: none;
    border: none;
    color: #4fd1c5;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.btn-text:hover {
    color: #38b2ac;
    transform: translateY(-1px);
}

.btn-text::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: currentColor;
    transition: width 0.2s ease;
}

.btn-text:hover::after {
    width: 100%;
}

.btn-secondary {
    background: linear-gradient(135deg, #2c313a 0%, #3a404b 100%);
    border: 1px solid var(--color-border);
    color: var(--color-text-primary);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-secondary:hover::before {
    left: 100%;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #3a404b 0%, #4a515c 100%);
    border-color: var(--color-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.25);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 56px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #3a404b 0%, #4a515c 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
    border: 1px solid var(--color-border);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 2px;
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #4fd1c5 0%, #38b2ac 100%);
    border-color: #4fd1c5;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2), 0 0 20px rgba(79, 209, 197, 0.3);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(28px);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.toggle-switch:hover .toggle-slider {
    transform: scale(1.05);
}

.toggle-switch:hover .toggle-slider:before {
    transform: scale(1.1);
}

.toggle-switch input:checked + .toggle-slider:hover:before {
    transform: translateX(28px) scale(1.1);
}

/* --- Стили для вкладки Сеть --- */
.network-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0 0 2rem 0;
    letter-spacing: -0.02em;
}

.network-section {
    margin-bottom: 3rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 1.5rem 0;
    letter-spacing: -0.01em;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.network-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.network-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    gap: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.network-item:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.15);
}

.network-icon {
    width: 56px;
    height: 56px;
    background-color: var(--color-surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
}

.network-icon svg {
    width: 28px;
    height: 28px;
    color: var(--color-text-primary);
}

.network-content {
    flex: 1;
    min-width: 0;
}

.network-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
}

.network-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.network-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

/* Кнопка Добавить */
.btn-primary {
    background: linear-gradient(135deg, #6c63ff 0%, #574fde 100%);
    border: none;
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(108, 99, 255, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #574fde 0%, #4a41d1 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 99, 255, 0.4);
}

/* Фильтры IP-адресов */
.ip-filters {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--color-border);
}

.filter-item {
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem 0;
    transition: all 0.2s ease;
    position: relative;
}

.filter-item.active {
    color: #6c63ff;
    font-weight: 600;
}

.filter-item.active::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #6c63ff;
    border-radius: 1px;
}

.filter-item:hover:not(.active) {
    color: var(--color-text-primary);
}

/* IP-адреса */
.ip-addresses {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ip-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    gap: 1.5rem;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.ip-item:hover {
    border-color: var(--color-accent);
    box-shadow: 0 4px 16px rgba(108, 99, 255, 0.15);
}

.ip-icon {
    width: 48px;
    height: 48px;
    background-color: var(--color-surface-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--color-border);
}

.ip-icon svg {
    width: 24px;
    height: 24px;
    color: var(--color-text-primary);
}

.ip-content {
    flex: 1;
    min-width: 0;
}

.ip-content h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    letter-spacing: -0.01em;
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.ip-content p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
    font-weight: 400;
}

.ip-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-menu {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-menu:hover {
    background-color: var(--color-surface-light);
    color: var(--color-text-primary);
}

.btn-menu svg {
    width: 20px;
    height: 20px;
}

/* --- Стильное popup окно для паузы как на фото --- */
.pause-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pause-popup.show {
    display: flex;
}

.pause-content {
    background: #282B30;
    border-radius: 12px;
    padding: 32px;
    min-width: 420px;
    max-width: 480px;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    border: 1px solid #3a3d42;
}

/* Адаптивность для планшетов */
@media (max-width: 768px) {
    .pause-content {
        min-width: 380px;
        max-width: 420px;
        padding: 28px;
        margin: 20px;
    }
    
    .pause-content h3 {
        font-size: 20px;
        margin-bottom: 18px;
    }
    
    .pause-content p {
        font-size: 15px;
        margin-bottom: 28px;
    }
    
    .pause-btn {
        padding: 12px 24px;
        font-size: 14px;
        min-width: 110px;
    }
}

/* Адаптивность для мобильных телефонов */
@media (max-width: 480px) {
    .pause-popup {
        padding: 16px;
    }
    
    .pause-content {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        padding: 24px 20px;
        margin: 0;
        border-radius: 8px;
    }
    
    .pause-close-btn {
        top: 16px;
        right: 16px;
        font-size: 20px;
        width: 24px;
        height: 24px;
    }
    
    .pause-content h3 {
        font-size: 18px;
        margin-bottom: 16px;
        padding-right: 40px; /* Место для кнопки закрытия */
    }
    
    .pause-content p {
        font-size: 14px;
        margin-bottom: 24px;
        line-height: 1.4;
    }
    
    .pause-actions {
        flex-direction: column;
        gap: 12px;
        width: 100%;
    }
    
    .pause-btn {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
        min-width: auto;
    }
}

/* Адаптивность для очень маленьких экранов */
@media (max-width: 360px) {
    .pause-popup {
        padding: 12px;
    }
    
    .pause-content {
        padding: 20px 16px;
    }
    
    .pause-content h3 {
        font-size: 17px;
        margin-bottom: 14px;
    }
    
    .pause-content p {
        font-size: 13px;
        margin-bottom: 20px;
    }
    
    .pause-btn {
        padding: 12px 16px;
        font-size: 14px;
    }
}

/* Поддержка ландшафтной ориентации на мобильных */
@media (max-width: 768px) and (orientation: landscape) {
    .pause-popup {
        padding: 12px;
    }
    
    .pause-content {
        padding: 20px 24px;
        max-height: 80vh;
        overflow-y: auto;
    }
    
    .pause-content h3 {
        font-size: 18px;
        margin-bottom: 12px;
    }
    
    .pause-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }
    
    .pause-actions {
        gap: 12px;
    }
    
    .pause-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}

/* Поддержка высоких экранов (iPhone X и подобные) */
@media (min-height: 800px) and (max-width: 480px) {
    .pause-popup {
        padding: 20px;
    }
    
    .pause-content {
        padding: 28px 24px;
    }
    
    .pause-content h3 {
        font-size: 19px;
        margin-bottom: 18px;
    }
    
    .pause-content p {
        font-size: 15px;
        margin-bottom: 28px;
    }
    
    .pause-btn {
        padding: 16px 24px;
        font-size: 16px;
    }
}

.pause-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.pause-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.pause-content h3 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    letter-spacing: -0.01em;
}

.pause-content p {
    margin: 0 0 32px 0;
    color: #b8b9bc;
    font-size: 16px;
    text-align: center;
    line-height: 1.5;
    font-weight: 400;
}

.pause-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
}

.pause-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    min-width: 120px;
    transition: all 0.2s ease;
}

.pause-secondary {
    background: #424549;
    color: #fff;
    border: 1px solid #4a4d52;
}

.pause-secondary:hover {
    background: #4a4d52;
    border-color: #52555a;
}

.pause-primary {
    background: #6A6AF0;
    color: #fff;
    border: 1px solid #7a7aff;
}

.pause-primary:hover {
    background: #7a7aff;
    border-color: #8a8aff;
}

/* Стили для поля ввода секретного кода */
.code-input-container {
    margin-bottom: 24px;
    text-align: center;
}

.code-input {
    width: 100%;
    max-width: 200px;
    padding: 14px 16px;
    background: #1e2124;
    border: 2px solid #3a3d42;
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    letter-spacing: 2px;
    transition: all 0.2s ease;
    outline: none;
}

.code-input:focus {
    border-color: #6A6AF0;
    box-shadow: 0 0 0 3px rgba(106, 106, 240, 0.1);
}

.code-input::placeholder {
    color: #6c6e71;
    letter-spacing: 1px;
}

.code-error {
    margin-top: 8px;
    color: #ff6b6b;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* --- Модальные окна --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 20px;
    padding: 2.5rem;
    max-width: 480px;
    width: 90%;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.modal-close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    color: var(--color-text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close-btn:hover {
    background-color: var(--color-surface-light);
    color: var(--color-text-primary);
}

.modal-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin: 0 0 1rem 0;
    text-align: center;
    letter-spacing: -0.02em;
}

.modal-content p {
    font-size: 1rem;
    color: var(--color-text-secondary);
    margin: 0 0 2rem 0;
    text-align: center;
    line-height: 1.5;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.modal-actions .btn-primary,
.modal-actions .btn-secondary {
    min-width: 120px;
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 12px;
    transition: all 0.2s ease;
}

/* Специальные стили для модального окна секретного кода */
.secret-code-input {
    margin-bottom: 2rem;
    text-align: center;
}

.secret-code-input input {
    background-color: var(--color-surface-light);
    border: 2px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--color-text-primary);
    text-align: center;
    letter-spacing: 0.2em;
    width: 200px;
    transition: all 0.2s ease;
}

.secret-code-input input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.2);
}

.secret-code-input input::placeholder {
    color: var(--color-text-secondary);
    letter-spacing: normal;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* --- Конфигурация (управление) --- */
.config-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-text-primary);
    margin: 0 0 2rem 0;
}

.manage-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.manage-item {
    display: flex;
    align-items: center;
    padding: 1.5rem 2rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    gap: 1.5rem;
    transition: all 0.2s ease;
}

.manage-item:hover { border-color: var(--color-accent); box-shadow: 0 4px 16px rgba(108,99,255,.15); }

.manage-icon {
    width: 56px; height: 56px; border-radius: 50%;
    background-color: var(--color-surface-light);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--color-border);
    flex-shrink: 0;
}
.manage-icon svg { width: 28px; height: 28px; color: var(--color-text-primary); }

.manage-content { flex: 1; min-width: 0; }
.manage-content h4 { margin: 0 0 .5rem 0; font-size: 1.1rem; font-weight: 700; color: var(--color-text-primary); }
.manage-content p { margin: 0; color: var(--color-text-secondary); font-size: .95rem; }

.manage-actions { flex-shrink: 0; }
