/* Покер Правила — кастомные стили (поверх Tailwind CDN) */

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 8%;
  --card: 0 0% 100%;
  --card-foreground: 0 0% 8%;
  --primary: 0 0% 8%;
  --primary-foreground: 0 0% 100%;
  --secondary: 0 0% 96%;
  --muted: 0 0% 96%;
  --muted-foreground: 0 0% 45%;
  --accent: 0 0% 96%;
  --border: 0 0% 90%;
  --destructive: 0 84% 60%;
  --radius: 0.75rem;

  --poker-red: 0 72% 51%;
  --poker-black: 0 0% 8%;
  --poker-gold: 45 93% 47%;
  --poker-green: 142 72% 29%;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: hsl(var(--background));
  color: hsl(var(--foreground));
  -webkit-font-smoothing: antialiased;
  margin: 0;
  line-height: 1.6;
}

.container {
  width: 100%;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}
@media (min-width: 1400px) {
  .container { max-width: 1400px; }
}

/* Карточные масти */
.suit-red { color: hsl(var(--poker-red)); }
.suit-black { color: hsl(var(--poker-black)); }
.text-poker-red { color: hsl(var(--poker-red)); }
.text-poker-black { color: hsl(var(--poker-black)); }
.text-poker-gold { color: hsl(var(--poker-gold)); }
.text-poker-green { color: hsl(var(--poker-green)); }
.bg-poker-red { background-color: hsl(var(--poker-red)); }
.bg-poker-red\/5 { background-color: hsl(var(--poker-red) / 0.05); }
.bg-poker-red\/10 { background-color: hsl(var(--poker-red) / 0.1); }
.border-poker-red { border-color: hsl(var(--poker-red)); }
.border-poker-red\/30 { border-color: hsl(var(--poker-red) / 0.3); }

/* Игральная карта */
.playing-card {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 4rem;
  border: 2px solid hsl(var(--border));
  border-radius: 0.375rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: 700;
  line-height: 1;
}
.playing-card.sm { width: 2rem; height: 2.75rem; font-size: 0.75rem; }
.playing-card.lg { width: 4rem; height: 5.5rem; font-size: 1rem; }
.playing-card .rank { font-size: 0.875rem; font-weight: 700; }
.playing-card .suit { font-size: 1rem; }

/* FAQ-аккордеон (вместо <details>) */
.faq-item {
  border-bottom: 1px solid hsl(var(--border));
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 0;
  background: none;
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  color: inherit;
}
.faq-question::after {
  content: '';
  width: 0.875rem;
  height: 0.875rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.faq-item.open .faq-question::after { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease-out;
  color: hsl(var(--muted-foreground));
}
.faq-item.open .faq-answer {
  max-height: 1000px;
  padding-bottom: 1rem;
}

/* Мобильное меню */
.mobile-menu { display: none; }
.mobile-menu.open { display: block; }
@media (min-width: 1024px) {
  .mobile-menu, .mobile-toggle { display: none !important; }
  .desktop-nav { display: flex !important; }
}
.desktop-nav { display: none; }

/* Dropdown навигации (hover/focus/click) */
.nav-dropdown { position: relative; }
.nav-dropdown-content {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  display: none !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  background: hsl(var(--background));
  border: 1px solid hsl(var(--border));
  border-radius: 0.5rem;
  padding: 1rem;
  min-width: 500px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  z-index: 50;
}
.nav-dropdown:hover .nav-dropdown-content,
.nav-dropdown:focus-within .nav-dropdown-content,
.nav-dropdown.open .nav-dropdown-content { display: grid !important; }

/* Скрытие обычной разметки таблиц */
table { border-collapse: collapse; width: 100%; }
table th, table td { padding: 0.75rem; text-align: left; border: 1px solid hsl(var(--border)); }
table thead { background: hsl(var(--muted)); }

/* Утилиты */
.prose p { margin: 0.75em 0; }
.prose ul, .prose ol { padding-left: 1.5rem; }
.prose ul li, .prose ol li { margin: 0.4em 0; }
.prose strong { color: hsl(var(--foreground)); font-weight: 600; }

/* Подчёркивание-волна на акцентных словах */
.wavy-underline {
  position: relative;
  display: inline-block;
}
.wavy-underline::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 12' preserveAspectRatio='none'%3E%3Cpath d='M2 10C50 4 150 4 198 10' stroke='%23dc2626' stroke-width='5' stroke-linecap='round' fill='none'/%3E%3C/svg%3E") no-repeat;
  background-size: 100% 100%;
}

/* Линки */
a { color: inherit; text-decoration: none; }
.link-primary { color: hsl(var(--primary)); }
.link-primary:hover { text-decoration: underline; }
