:root {
  --bg: #12002f;
  --white: #ffffff;
  --accent: #bb86fc;
  --gray: #cccccc;
  --radius: 16px;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: var(--bg);
  color: var(--white);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

main.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 700px;
  width: 90%;
  margin: auto;
  padding: 30px;
}

.header {
  position: fixed;
  top: 0;
  width: 100%;
  background: #1b003d;
  display: flex;
  align-items: center;
  padding: 20px;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.header-logo {
  width: 48px;
  height: 48px;
  margin-right: 15px;
}

.header-title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.header-title span {
  color: var(--accent);
}

.container {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 80px 20px 60px;
  max-width: 720px;
  width: 100%;
  margin: 0 auto;
}

h1 {
  margin-top: 0;
  font-size: 28px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
}

.subtitle {
  color: var(--gray);
  margin-bottom: 30px;
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 20px;
  font-size: 16px;
  border-radius: var(--radius);
  border: none;
  background: #1b003a;
  color: var(--white);
  box-shadow: inset 0 0 0 1px #3c0069;
  outline: none;
}

.clear-btn {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  font-size: 16px;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  line-height: 1;
  padding: 0;
  transition: opacity 0.2s ease;
}
.clear-btn:hover {
  opacity: 1;
}

button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  padding: 12px 24px;
  border-radius: 30px;
  background: linear-gradient(135deg, #ff8df4, #a960ff);
  color: white;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(255, 141, 244, 0.3);
  transition: transform 0.2s, box-shadow 0.2s;
  margin: 20px auto;
}

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 141, 244, 0.4);
}
button:hover {
  transform: translateY(-2px);
  background: #a357f5;
  box-shadow: 0 6px 16px rgba(163, 87, 245, 0.35);
  transition: all 0.3s ease;
}
button .btn-icon {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

#resultBlock {
  margin-top: 30px;
  background: #25004a;
  padding: 24px 20px;
  border-radius: 20px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  max-width: 100%;
  width: 100%;
  transition: all 0.3s ease;
  position: relative;
}

#resultText {
  font-size: 16px;
  line-height: 1.6;
  color: var(--white);
  opacity: 0;
  transition: opacity 0.6s ease;
}
#resultText.show {
  opacity: 1;
}

.copy-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: none;
  border: none;
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
  box-shadow: none; /* ❗ Убираем свечение */
}

.copy-btn:hover {
  background: none;        /* без фона */
  box-shadow: none;        /* без свечения */
  opacity: 1;              /* может всплыть, если навели */
}


.copy-btn.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.copy-btn img {
  width: 18px;
  height: 18px;
}

.copy-btn.copied::after {
  content: "Скопировано!";
  position: absolute;
  top: -28px;
  right: 0;
  background: #1b003a;
  color: var(--accent);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  white-space: nowrap;
  opacity: 0.9;
  pointer-events: none;
}


.ads {
  margin-top: 40px;
}

.footer {
  position: fixed;
  bottom: 0;
  width: 100%;
  background: #1b003d;
  text-align: center;
  font-size: 13px;
  color: var(--gray);
  padding: 15px 10px;
  z-index: 10;
}

.footer-line a {
  color: var(--accent);
  text-decoration: none;
  margin: 0 6px;
  font-weight: 500;
  transition: color 0.2s ease;
}
.footer-line a:hover {
  color: #ffffff;
}

/* АНИМАЦИЯ СЛОГАНА */
#slogan.fade-out {
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.6s ease, opacity 0.6s ease;
}
#slogan.fade-in {
  transform: translateY(10px);
  opacity: 1;
  transition: transform 0.6s ease, opacity 0.6s ease;
}

/* МОДАЛКИ */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.modal.active {
  display: flex;
}

.modal-content {
  background: #fff;
  color: #111;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  padding: 30px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #555;
}
.modal-content {
  background: #fff;
  color: #111;
  border-radius: 16px;
  max-width: 600px;
  width: 100%;
  padding: 30px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0,0,0,0.2);
  animation: scaleIn 0.25s ease-in-out forwards;
}
.category-bar {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.category {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid #a960ff;
  border-radius: 30px;
  font-size: 14px;
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
  transition: background 0.3s, transform 0.2s, box-shadow 0.2s;
  box-shadow: inset 0 0 0 0 transparent;
}

.category:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-1px);
  box-shadow: inset 0 0 0 1px #fff3;
}

.category img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  pointer-events: none;
}


.modal-icon {
  width: 20px;
  vertical-align: middle;
  margin-right: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes scaleIn {
  from { transform: scale(0.95); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.popular-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin: 24px 0;
}
.popular-topics::-webkit-scrollbar {
  display: none;
}
.topic {
  flex: 0 0 auto;
  background: #1b003a;
  border: 1px solid var(--accent);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 14px;
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
}
.topic:hover {
  background: var(--accent);
  color: #12002f;
  transform: scale(1.05);
}
.ads-left {
  position: fixed;
  top: 120px;
  left: 10px;
  width: 160px;
  height: 300px;
  z-index: 9999;
}

.ads-bottom {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.ads-native {
  margin: 40px 0;
  display: flex;
  justify-content: center;
}
@media (max-width: 768px) {
  body {
    padding: 20px 10px;
    font-size: 14px;
  }

  header, footer {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .search-bar {
    flex-direction: column;
    gap: 10px;
  }

  .category-buttons {
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
  }

  .result-box {
    padding: 15px;
    font-size: 14px;
    width: 100%;
  }

  .copy-btn {
    right: 10px;
    top: 10px;
    transform: scale(0.9);
  }

  .ads-left, .ads-right {
    display: none; /* Скрываем боковую рекламу на мобилках */
  }

  .footer-links {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 768px) {
  .ads-left,
  .ads-right {
    display: none !important;
  }
}
