/* ========== RESET & BASE ========== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #6C5CE7;
  --primary-light: #A29BFE;
  --primary-dark: #5A4BD1;
  --accent: #00CEC9;
  --bg: #F8F9FD;
  --card-bg: #FFFFFF;
  --text: #2D3436;
  --text-light: #636E72;
  --border: #E0E0E0;
  --success: #00B894;
  --danger: #E17055;
  --shadow: 0 2px 16px rgba(108, 92, 231, 0.08);
  --shadow-hover: 0 8px 32px rgba(108, 92, 231, 0.16);
  --radius: 12px;
  --radius-sm: 8px;
  --max-width: 1100px;
  --header-h: 64px;
  --transition: 0.25s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

a {
  text-decoration: none;
  color: inherit;
}

/* ========== HEADER ========== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  min-height: var(--header-h);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-svg {
  width: 36px;
  height: 36px;
}

.logo-accent {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 28px;
}

.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-light);
  transition: color var(--transition);
  position: relative;
}

.nav a:hover {
  color: var(--primary);
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  border-radius: 2px;
  transition: width var(--transition);
}

.nav a:hover::after {
  width: 100%;
}

/* ========== AD SLOTS ========== */
.ad-slot {
  max-width: var(--max-width);
  margin: 16px auto;
  padding: 0 20px;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-placeholder {
  background: #EEE;
  color: #AAA;
  font-size: 0.8rem;
  padding: 6px 16px;
  border-radius: var(--radius-sm);
  border: 1px dashed #CCC;
}

/* ========== HERO ========== */
.hero {
  text-align: center;
  padding: 60px 0 40px;
  background: linear-gradient(180deg, rgba(108,92,231,0.06) 0%, transparent 100%);
}

.hero-title {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 12px;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto 32px;
}

/* ========== INPUT ========== */
.input-section {
  max-width: 680px;
  margin: 0 auto 20px;
}

.input-wrapper {
  display: flex;
  gap: 10px;
}

.word-input {
  flex: 1;
  padding: 16px 20px;
  font-size: 1.1rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  background: var(--card-bg);
}

.word-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(108,92,231,0.12);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 16px 28px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
}

.btn-icon {
  font-size: 1.1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #FFF;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(108,92,231,0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
  padding: 10px 20px;
  font-size: 0.9rem;
}

.btn-outline:hover {
  background: var(--primary);
  color: #FFF;
}

.btn-copy {
  padding: 8px 14px;
  font-size: 0.82rem;
  background: var(--bg);
  color: var(--text-light);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.btn-copy:hover {
  background: var(--primary);
  color: #FFF;
  border-color: var(--primary);
}

.btn-copy.copied {
  background: var(--success);
  color: #FFF;
  border-color: var(--success);
}

/* ========== FILTERS ========== */
.filters {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  max-width: 680px;
  margin: 0 auto;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 140px;
}

.filter-group label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.filter-select {
  padding: 10px 14px;
  font-size: 0.92rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%23636E72' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}

.filter-select:focus {
  border-color: var(--primary);
}

/* ========== RESULTS TABLE ========== */
.results-section {
  margin-top: 48px;
  text-align: left;
}

.results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.results-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
}

.results-table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--card-bg);
}

.results-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.results-table thead {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #FFF;
}

.results-table thead th {
  padding: 14px 12px;
  text-align: center;
  font-weight: 600;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.results-table thead th:first-child {
  border-radius: var(--radius) 0 0 0;
}

.results-table thead th:last-child {
  border-radius: 0 var(--radius) 0 0;
}

.results-table tbody tr {
  animation: fadeUp 0.35s ease both;
  border-bottom: 1px solid var(--border);
}

.results-table tbody tr:last-child {
  border-bottom: none;
}

.results-table tbody tr:hover {
  background: rgba(108,92,231,0.04);
}

.results-table td {
  padding: 12px;
  text-align: center;
  vertical-align: middle;
}

.cell-num {
  font-weight: 700;
  color: var(--text-light);
  font-size: 0.85rem;
  width: 40px;
}

.cell-name {
  text-align: left;
  font-size: 1rem;
  min-width: 130px;
}

.cell-name strong {
  color: var(--primary);
}

.cell-available {
  color: var(--success);
  font-weight: 600;
  font-size: 0.78rem;
  min-width: 100px;
}

.cell-taken {
  color: var(--danger);
  font-weight: 600;
  font-size: 0.78rem;
  min-width: 100px;
}

.cell-unknown {
  font-size: 0.78rem;
  min-width: 100px;
}

.check-link,
.affiliate-link {
  color: inherit;
  text-decoration: none;
  font-weight: 600;
  transition: color var(--transition);
}

.check-link:hover,
.affiliate-link:hover {
  text-decoration: underline;
}

.cell-available a {
  color: var(--success);
}

.cell-unknown a {
  color: var(--primary);
}

.cell-action {
  white-space: nowrap;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========== RECENT ========== */
.recent-section {
  margin-top: 56px;
  text-align: left;
}

.recent-title {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.recent-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card-bg);
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  transition: all var(--transition);
  cursor: default;
  border: 1px solid transparent;
}

.recent-item:hover {
  border-color: var(--primary-light);
  box-shadow: var(--shadow-hover);
}

.recent-item .recent-del {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: none;
  border: none;
  color: #CCC;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}

.recent-item .recent-del:hover {
  color: var(--danger);
}

/* ========== SEO SECTION ========== */
.seo-section {
  padding: 64px 0 80px;
  background: var(--card-bg);
}

.seo-section h2 {
  font-size: 1.7rem;
  font-weight: 800;
  margin-bottom: 20px;
  color: var(--text);
}

.seo-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 32px 0 12px;
  color: var(--primary);
}

.seo-section p {
  color: var(--text-light);
  margin-bottom: 14px;
  font-size: 1rem;
  line-height: 1.8;
}

/* FAQ */
.faq-item {
  background: var(--bg);
  border-radius: var(--radius);
  margin-bottom: 12px;
  border-left: 4px solid var(--primary);
  overflow: hidden;
}

.faq-question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 18px 24px;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  font-family: inherit;
  line-height: 1.4;
  transition: color var(--transition), background var(--transition);
}

.faq-question:hover {
  color: var(--primary);
  background: rgba(108,92,231,0.04);
}

.faq-arrow {
  flex-shrink: 0;
  margin-left: 12px;
  font-size: 0.9rem;
  color: var(--primary);
  transition: transform 0.3s ease;
}

.faq-question[aria-expanded="true"] .faq-arrow {
  transform: rotate(90deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease, padding 0.35s ease;
}

.faq-answer p {
  padding: 0 24px 18px;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ========== FOOTER ========== */
.footer {
  background: #1E1E2F;
  color: rgba(255,255,255,0.7);
  padding: 40px 0;
  text-align: center;
}

.footer-logos {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.footer-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  transition: all var(--transition);
  border: 1px solid rgba(255,255,255,0.08);
}

.footer-link:hover {
  background: rgba(108,92,231,0.2);
  border-color: var(--primary);
  color: #FFF;
  transform: translateY(-2px);
}

.footer-legal {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-legal a {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  transition: color var(--transition);
}

.footer-legal a:hover {
  color: var(--primary-light);
}

.footer-copy {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.35);
}

/* ========== LOADING SPINNER ========== */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #FFF;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
  .hero-title {
    font-size: 1.9rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .input-wrapper {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
    justify-content: center;
  }

  .filters {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    min-width: unset;
  }

  .results-table-wrapper {
    border-radius: var(--radius-sm);
  }

  .results-table {
    font-size: 0.78rem;
  }

  .results-table thead th,
  .results-table td {
    padding: 8px 4px;
  }

  .cell-name {
    font-size: 0.85rem;
    min-width: 100px;
  }

  .footer-logos {
    gap: 14px;
  }

  .footer-logo-link {
    padding: 8px 10px;
  }

  .footer-logo-link img {
    width: 28px;
    height: 28px;
  }

  .results-header {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .nav {
    gap: 16px;
  }

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

  .seo-section {
    padding: 40px 0;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 40px 0 24px;
  }

  .container {
    padding: 0 12px;
  }

  .logo-svg {
    width: 28px;
    height: 28px;
  }

  .logo {
    gap: 6px;
  }

  .header-inner {
    flex-wrap: wrap;
    row-gap: 4px;
    padding: 10px 0;
  }

  .nav {
    gap: 10px;
  }

  .nav a {
    font-size: 0.8rem;
  }

  .hero-title {
    font-size: 1.6rem;
  }

  .result-name {
    font-size: 1.15rem;
  }

  .logo-text {
    font-size: 1.1rem;
  }
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: #1E1E2F;
  padding: 14px 20px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
  animation: cookieSlideUp 0.4s ease;
}

@keyframes cookieSlideUp {
  from { transform: translateY(100%); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.cookie-banner-text {
  flex: 1;
  color: rgba(255,255,255,0.8);
  font-size: 0.85rem;
  line-height: 1.5;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.btn-cookie {
  padding: 8px 18px;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--transition);
}

.btn-cookie-reject {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
}

.btn-cookie-reject:hover {
  background: rgba(255,255,255,0.2);
  color: #FFF;
}

.btn-cookie-accept {
  background: var(--primary);
  color: #FFF;
}

.btn-cookie-accept:hover {
  background: var(--primary-dark);
}

@media (max-width: 600px) {
  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
    gap: 10px;
  }
  .cookie-banner-buttons {
    width: 100%;
    justify-content: center;
  }
}