/* Переменные - тёмная тема в стиле cyberpunk */
:root {
  --primary: #03e9f4;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --background: linear-gradient(117deg, rgb(76, 112, 114) 29%, rgb(31, 29, 24) 59%, rgb(26, 25, 23) 83%);
  --card-bg: rgba(0, 0, 0, 0.46);
  --text: #e3e3e3;
  --text-light: #a0a0a0;
  --border: rgba(3, 233, 244, 0.3);
  --shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  --glow: 0px 0px 20px 5px rgba(3, 233, 244, 0.25);
}

/* Сброс стилей */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto Condensed', sans-serif;
  background: var(--background);
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Контейнер */
.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

/* Заголовок */
.header {
  text-align: center;
  margin-bottom: 30px;
}

.header-top {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 5px;
}

.header h1 {
  font-size: 2.5rem;
  margin: 0;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(3, 233, 244, 0.5);
}

.subtitle {
  color: var(--text-light);
  font-size: 1.1rem;
}

/* Переключатель языка */
.language-switcher {
  display: flex;
  gap: 4px;
  background: var(--card-bg);
  padding: 4px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.lang-btn {
  padding: 6px 8px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  opacity: 0.5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lang-btn img {
  border-radius: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease;
}

.lang-btn:hover {
  opacity: 0.85;
}

.lang-btn:hover img {
  transform: scale(1.1);
}

.lang-btn.active {
  opacity: 1;
}

.lang-btn.active img {
  transform: scale(1.15);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Карточки */
.card {
  background: var(--card-bg);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  backdrop-filter: blur(10px);
  transition: box-shadow 0.5s ease;
}

.card:hover {
  box-shadow: 0px 0px 30px 8px rgba(45, 167, 156, 0.35);
}

.card h2 {
  font-size: 1.25rem;
  margin-bottom: 16px;
  color: var(--primary);
  padding-bottom: 10px;
  text-transform: uppercase;
}

/* Главная карточка с IP */
.card-main {
  text-align: center;


}

.card-main h2 {
  color: var(--primary);
  border-bottom-color: var(--border);
}

/* Контейнер для IP и кнопки копирования */
.ip-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 20px 0 10px;
}

.ip-display {
  font-size: 2rem;
  font-weight: bold;
  word-break: break-all;
  cursor: pointer;
  transition: text-shadow 0.3s ease;
}

.ip-display:hover {
  text-shadow: 0 0 25px rgba(3, 233, 244, 1);
}

/* Кнопка копирования */
.copy-btn {
  background: transparent;
  border: 1px solid var(--primary);
  border-radius: 6px;
  padding: 8px;
  cursor: pointer;
  color: var(--primary);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.copy-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 10px var(--primary);
}

.copy-btn.copied {
  background: var(--success);
  border-color: var(--success);
  color: #fff;
  box-shadow: 0 0 10px var(--success);
}

.ip-type {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 20px;
}

/* Карточка безопасности */
.card-security {
  text-align: center;
}

.security-status {
  font-size: 1.25rem;
  font-weight: 600;
  padding: 15px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.status-safe {
  color: #10b981;

}

.status-warning {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.status-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Сетка информации */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.info-item {
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  border: 1px solid rgba(3, 233, 244, 0.15);
}

.info-item .label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.info-item .value {
  display: block;
  font-weight: 500;
  color: var(--text);
}

.value-small {
  font-size: 0.8rem;
  word-break: break-all;
}

/* Флаг страны */
.country-flag {
  width: 20px;
  height: 15px;
  vertical-align: middle;
  margin-right: 6px;
  border-radius: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}

/* Загрузка */
.loading {
  opacity: 0.7;
  animation: pulse 1.5s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 0.4; }
}

/* Подвал */
.footer {
  text-align: center;
  padding: 20px;
  color: var(--text-light);
  font-size: 0.9rem;
}

/* Кнопка анализа */
.analyze-btn {
  margin-top: 16px;
  padding: 12px 24px;
  background: transparent;
  color: var(--primary);
  border: 1px solid var(--primary);
  border-radius: 5px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.5s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  font-family: 'Roboto Condensed', sans-serif;
}

.analyze-btn:hover {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 0 5px var(--primary),
              0 0 25px var(--primary),
              0 0 50px var(--primary);
  transform: translateY(-1px);
}

.analyze-btn:disabled {
  border-color: var(--text-light);
  color: var(--text-light);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.analyze-btn.loading::after {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Секция анализа */
.card-analyze {
  background: rgba(3, 233, 244, 0.05);
}

/* Шкала вероятности */
.probability-container {
  text-align: center;
  margin-bottom: 24px;
}

.probability-label {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 8px;
}

.probability-bar {
  height: 24px;
  background: rgba(0, 0, 0, 0.4);
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid rgba(3, 233, 244, 0.2);
}

.probability-fill {
  height: 100%;
  width: 0%;
  border-radius: 12px;
  transition: width 1s ease, background 0.3s ease;
  background: var(--success);
}

.probability-fill.medium {
  background: var(--warning);
}

.probability-fill.high {
  background: var(--danger);
}

.probability-value {
  font-size: 2rem;
  font-weight: bold;
  color: var(--text);
}

/* Список проверок */
.checks-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.check-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  gap: 12px;
  border: 1px solid rgba(3, 233, 244, 0.15);
}

.check-name {
  font-weight: 500;
  flex-shrink: 0;
}

.check-result {
  display: flex;
  align-items: center;
  gap: 8px;
  text-align: right;
}

.check-details {
  font-size: 0.85rem;
  color: var(--text-light);
  word-break: break-all;
}

.check-status {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

.check-status.ok {
  background: rgba(16, 185, 129, 0.3);
  color: #10b981;
}

.check-status.warning {
  background: rgba(245, 158, 11, 0.3);
  color: #f59e0b;
}

.check-status.danger {
  background: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

/* Вердикт */
.verdict {
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: uppercase;
}

.verdict.low {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.4);
}

.verdict.medium {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.verdict.high {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.4);
}

/* Адаптивность */
@media (max-width: 600px) {
  .container {
    padding: 15px;
  }

  .header-top {
    flex-direction: column;
    gap: 10px;
  }

  .header h1 {
    font-size: 2rem;
  }

  .ip-container {
    flex-wrap: wrap;
  }

  .ip-display {
    font-size: 1.5rem;
  }

  .card {
    padding: 16px;
  }

  .info-grid {
    grid-template-columns: 1fr;
  }

  .lang-btn {
    padding: 8px 10px;
  }

  .lang-btn img {
    width: 28px;
    height: 21px;
  }

  .check-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .check-result {
    width: 100%;
    justify-content: space-between;
  }

  .probability-value {
    font-size: 1.5rem;
  }
}
