/* Shared footer & legal modals — ALWAYS match index.html (home) look */
/* Hardcoded homepage tokens: page :root (--bg-velvet/#2a1a1a, --gold/#c9a86b) cannot override */
:root {
  --modal-bg: #1A0A0A;
  --modal-gold: #C5A572;
  --modal-gold-light: #D4AF37;
  --modal-gold-dark: #8B7355;
  --modal-text: #F5F5F5;
  --modal-border-gold: rgba(197, 165, 114, 0.3);
  --ease-slow: cubic-bezier(0.7, 0, 0.3, 1);
}
/* =====================================================
   МОДАЛЬНЫЕ ОКНА (оферта / политика / реквизиты = index)
===================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 10, 0.95);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.4s var(--ease-slow);
  padding: 2rem;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.play-modal {
  background: #0A0A0A !important;
  border: 1px solid #C5A572 !important;
  border-radius: 4px;
  max-width: 900px !important;
  width: 100%;
  max-height: 90vh !important;
  overflow-y: auto;
  position: relative;
  transform: translateY(30px);
  transition: transform 0.5s var(--ease-slow);
  opacity: 0;
  color: #F5F5F5 !important;
  font-family: 'Inter', sans-serif !important;
}
.modal-overlay.active .play-modal {
  transform: translateY(0);
  opacity: 1;
}
/* Legal docs: sizes EXACTLY like index.css */
.play-modal.docs-modal-content {
  max-width: 900px !important;
  max-height: 90vh !important;
  padding: 2.5rem !important;
  background: #0A0A0A !important;
  border-color: #C5A572 !important;
  color: #F5F5F5 !important;
  font-family: 'Inter', sans-serif !important;
}
.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #C5A572 !important;
  font-size: 1.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  border-radius: 2px;
  font-family: 'Inter', sans-serif !important;
}
.modal-close:hover {
  background: rgba(197, 165, 114, 0.1);
}
.docs-modal-content {
  padding: 2.5rem !important;
}
.docs-list {
  margin: 2rem 0;
  background: rgba(0,0,0,0.3);
  border-radius: 8px;
  padding: 1.5rem;
}
.doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--modal-border-gold);
  flex-wrap: wrap;
  gap: 0.5rem;
}
.doc-item:last-child {
  border-bottom: none;
}
.doc-label {
  font-family: 'Cormorant Garamond', serif !important;
  color: #C5A572 !important;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  min-width: 100px;
}
.doc-value {
  font-family: 'Inter', monospace !important;
  color: #F5F5F5 !important;
  word-break: break-word;
  flex: 1;
  font-size: 0.95rem;
}
.copy-btn {
  background: transparent;
  border: 1px solid #C5A572 !important;
  color: #C5A572 !important;
  padding: 0.4rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85rem;
  transition: all 0.3s;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif !important;
}
.copy-btn:hover {
  background: #C5A572 !important;
  color: #0A0A0A !important;
}
.copy-all-btn {
  margin-top: 1.5rem;
  width: 100%;
  padding: 0.8rem;
  background: #C5A572 !important;
  color: #0A0A0A !important;
  border: none;
  font-weight: 600;
  letter-spacing: 0.1em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  cursor: pointer;
  font-family: 'Inter', sans-serif !important;
}
.copy-all-btn:hover {
  background: #D4AF37 !important;
}

/* ===== АДАПТАЦИЯ — как index.css ===== */
@media (max-width: 768px) {
  .modal-overlay {
    padding: 1rem;
  }
  .docs-modal-content,
  .play-modal.docs-modal-content {
    padding: 1.5rem !important;
  }
  .docs-modal-content h2 {
    font-size: 1.6rem !important;
    margin-bottom: 1rem;
  }
  .docs-list {
    padding: 1rem;
    margin: 1rem 0;
  }
  .doc-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 1rem 0;
  }
  .doc-label {
    min-width: auto;
    font-size: 1rem;
  }
  .doc-value {
    font-size: 0.9rem;
    width: 100%;
    word-break: break-word;
  }
  .copy-btn {
    align-self: flex-end;
    margin-top: 0.2rem;
    font-size: 0.8rem;
    padding: 0.3rem 0.8rem;
  }
  .copy-all-btn {
    font-size: 0.9rem;
    padding: 0.7rem;
  }
}
@media (max-width: 480px) {
  .docs-modal-content,
  .play-modal.docs-modal-content {
    padding: 1rem !important;
  }
  .docs-modal-content h2 {
    font-size: 1.4rem !important;
  }
  .doc-label {
    font-size: 0.9rem;
  }
  .doc-value {
    font-size: 0.85rem;
  }
  .copy-btn {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
  }
  .copy-all-btn {
    font-size: 0.85rem;
    padding: 0.6rem;
  }
  .docs-list {
    padding: 0.8rem;
  }
}

/* ===== ОФОРМЛЕНИЕ ДЛИННЫХ ТЕКСТОВ — как на главной (index.css) ===== */
.docs-modal-content {
  font-family: 'Inter', sans-serif !important;
  line-height: 1.7;
  color: #F5F5F5 !important;
}
.docs-modal-content h2,
.docs-modal-content h3,
.docs-modal-content h4 {
  font-family: 'Cormorant Garamond', serif !important;
  color: #C5A572 !important;
  margin-top: 1.5em;
  margin-bottom: 0.75em;
  font-weight: 500;
}
.docs-modal-content h2 {
  font-size: 2rem !important;
  border-left: 4px solid #C5A572 !important;
  padding-left: 1rem !important;
  margin-top: 0;
}
.docs-modal-content h3 {
  font-size: 1.6rem !important;
  border-bottom: 1px solid rgba(197, 165, 114, 0.3) !important;
  padding-bottom: 0.5rem;
}
.docs-modal-content h4 {
  font-size: 1.3rem !important;
  margin-top: 1.2em;
}
.docs-modal-content p {
  margin-bottom: 1em;
  line-height: 1.7;
  font-family: 'Inter', sans-serif !important;
  color: #F5F5F5 !important;
}
.docs-modal-content ul, 
.docs-modal-content ol {
  margin: 1em 0 1em 1.8rem;
  padding-left: 0;
}
.docs-modal-content li {
  margin-bottom: 0.5em;
  line-height: 1.6;
  font-family: 'Inter', sans-serif !important;
  color: #F5F5F5 !important;
}
.docs-modal-content a {
  color: #D4AF37 !important;
  text-decoration: none;
  border-bottom: 1px dotted #C5A572 !important;
  transition: all 0.2s;
}
.docs-modal-content a:hover {
  color: #C5A572 !important;
  border-bottom-color: #D4AF37 !important;
}
.docs-modal-content strong, 
.docs-modal-content b {
  color: #D4AF37 !important;
  font-weight: 600;
}
.docs-modal-content hr {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, #C5A572, transparent) !important;
  margin: 2rem 0;
}
.play-modal {
  scrollbar-width: thin;
  scrollbar-color: #C5A572 #0A0A0A;
}
.play-modal::-webkit-scrollbar {
  width: 8px;
}
.play-modal::-webkit-scrollbar-track {
  background: #0A0A0A !important;
  border-radius: 4px;
}
.play-modal::-webkit-scrollbar-thumb {
  background: #C5A572 !important;
  border-radius: 4px;
}
/* partner link-edit keeps narrower width */
.link-edit-modal .play-modal {
  max-width: 500px !important;
}

/* ========== ФОРМА ОБРАТНОЙ СВЯЗИ ========== */
.play-modal.contact-form-modal {
  max-width: 560px !important;
  width: 100%;
  background: #0A0A0A !important;
  border: 1px solid rgba(197, 165, 114, 0.3) !important;
  border-radius: 16px;
  padding: 2rem;
}
.contact-form-modal h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-align: center;
  color: #C5A572 !important;
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 400;
  letter-spacing: 0.05em;
}
.contact-form-modal .form-group {
  margin-bottom: 1.2rem;
}
.contact-form-modal label {
  display: block;
  margin-bottom: 0.4rem;
  color: #aaa;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 400;
}
.contact-form-modal input,
.contact-form-modal textarea {
  width: 100%;
  padding: 0.7rem 0;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(197, 165, 114, 0.4);
  color: #F5F5F5 !important;
  font-size: 1rem;
  font-family: 'Inter', sans-serif !important;
  transition: all 0.2s;
  border-radius: 0;
}
.contact-form-modal input:focus,
.contact-form-modal textarea:focus {
  outline: none;
  border-bottom-color: #C5A572 !important;
}
.contact-form-modal textarea {
  min-height: 80px;
  resize: vertical;
}
.contact-form-modal .row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.contact-form-modal button[type="submit"] {
  width: 100%;
  padding: 0.9rem;
  background: #C5A572 !important;
  color: #111 !important;
  border: none;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
  border-radius: 40px;
  margin-top: 1rem;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif !important;
}
.contact-form-modal button[type="submit"]:hover {
  background: #D4AF37 !important;
  transform: translateY(-2px);
}
@media (max-width: 560px) {
  .contact-form-modal .row-2col {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .contact-form-modal {
    padding: 1.5rem;
  }
}

/* =====================================================
   УВЕДОМЛЕНИЯ (TOAST)
===================================================== */
.toast {
  position: fixed;
  bottom: 30px;
  left: 30px;
  background: #1a1a1a;
  border: 1px solid var(--gold);
  padding: 12px 24px;
  border-radius: 8px;
  z-index: 15000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  backdrop-filter: blur(10px);
}
.toast.active {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.toast-content {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.toast-close {
  background: none;
  border: none;
  color: var(--gold);
  font-size: 1.2rem;
  cursor: pointer;
  margin-left: auto;
  pointer-events: auto;
}

/* =====================================================
   ФУТЕР
===================================================== */
footer {
  background: rgb(26 10 10 / 50%);
  padding: 6rem var(--container-padding) 3rem;
  border-top: 1px solid var(--border-gold);
  position: relative;
}
footer:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 5rem;
  margin-bottom: 4rem;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
}
.footer-logo {
  font-size: 2.5rem;
  color: var(--gold);
  letter-spacing: 0.3em;
  margin-bottom: 2rem;
  display: inline-block;
  text-decoration: none;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  text-transform: uppercase;
  transition: color 0.3s;
}
.footer-logo:hover {
  color: var(--gold-light);
}
.footer-grid > div > p {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
  color: #dddddd;
  max-width: 350px;
}
.footer-grid h4 {
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 2rem;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  letter-spacing: 0.05em;
  position: relative;
  padding-bottom: 0.8rem;
}
.footer-grid h4::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50px;
  height: 2px;
  background: var(--gold);
  transition: width 0.3s ease;
}
.footer-grid h4:hover::after {
  width: 80px;
}
.footer-links {
  list-style: none;
}
.footer-links li {
  margin-bottom: 1.2rem;
}
.footer-links a {
  color: #cccccc;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
}
.footer-links a:hover {
  color: var(--gold);
  transform: translateX(8px);
  border-bottom-color: var(--gold);
}
.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}
.social-link {
  width: 48px;
  height: 48px;
  border: 1px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  text-decoration: none;
  transition: all 0.4s ease;
  border-radius: 50%;
  font-size: 1.3rem;
  background: rgba(26, 10, 10, 0.6);
}
.social-link:hover {
  background: var(--gold);
  color: var(--bg-dark);
  transform: translateY(-5px) scale(1.1);
  box-shadow: 0 10px 20px rgba(197, 165, 114, 0.3);
}
.footer-docs-link {
  color: var(--gold);
  cursor: pointer;
  font-size: 1.2rem;
  border-bottom: 1px dashed var(--gold);
  padding-bottom: 2px;
  transition: all 0.3s;
  display: inline-block;
  margin-top: 0.5rem;
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(197, 165, 114, 0.25);
}
.footer-docs-link:hover {
  color: var(--gold-light);
  border-bottom-color: var(--gold-light);
}
.footer-bottom {
  text-align: center;
  padding-top: 3rem;
  border-top: 1px solid var(--border-gold);
  color: #aaa;
  font-size: 1rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.02em;
}
.footer-bottom p:first-child {
  margin-bottom: 0.5rem;
  color: #ccc;
}

/* ===== АДАПТАЦИЯ ФУТЕРА ===== */
@media (max-width: 1200px) {
  .footer-grid { gap: 3rem; grid-template-columns: 1.5fr 1fr 1fr; }
}
@media (max-width: 992px) {
  .footer-grid { grid-template-columns: 1fr; gap: 4rem; text-align: left; max-width: 600px; margin-left: 0; }
  .footer-grid > div > p { max-width: 100%; font-size: 1.1rem; }
  .social-links { justify-content: flex-start; }
  .footer-bottom { text-align: left; }
  .footer-grid h4::after { left: 0; transform: none; }
  .footer-links a { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  footer { padding: 4rem 2rem 2rem; }
  .footer-logo { font-size: 2.5rem; }
  .footer-grid h4 { font-size: 1.5rem; }
  .footer-links a { font-size: 1.1rem; }
}
@media (max-width: 480px) {
  footer { padding: 3rem 1.5rem 2rem; }
  .footer-logo { font-size: 2.2rem; letter-spacing: 0.15em; }
  .footer-grid { text-align: left; }
  .footer-grid h4 { text-align: left; letter-spacing: 0.02em; }
  .footer-grid h4::after { left: 0; transform: none; }
  .social-links { justify-content: flex-start; }
  .footer-docs-link { font-size: 1.3rem; }
  .social-link, .social-link-main { width: 40px; height: 40px; font-size: 1.1rem; }
}

/* Афиша / постановки: :root на странице не должен осветлять оферту и политику */
body #agreementModal .play-modal,
body #privacyModal .play-modal,
body #docsModal .play-modal,
body .modal-overlay .play-modal.docs-modal-content {
  background: #0A0A0A !important;
  background-color: #0A0A0A !important;
  color: #F5F5F5 !important;
}
