﻿/* ===== ОСНОВНЫЕ ЦВЕТА ===== */
    :root {
      --bg-dark: #0A0A0A;
      --bg-light: #ffffff;
      --card-bg: #ffffff;
      --text-light: #f0f0f0;
      --text-muted-dark: #b0b0b0;
      --gold: #c9a86b;
      --gold-light: #e0c28c;
      --gold-dark: #a8864a;
      --border-dark: #333333;
      --border-light: #e0e0e0;
      --bg-velvet: #1A0A0A;
      --text-dim: #AAAAAA;
      --border-gold: rgba(197, 165, 114, 0.3);

      --ease-slow: cubic-bezier(0.7, 0, 0.3, 1);
      --container-padding: 4vw;
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    html {
      scroll-behavior: smooth;
    }

    body {
      font-family: 'Inter', sans-serif;
      background-color: var(--bg-dark);
      color: var(--text-light);
      line-height: 1.6;
      overflow-x: hidden;
    }

    h1, h2, h3, h4, .logo {
      font-family: 'Cormorant Garamond', serif;
      font-weight: 500;
      letter-spacing: 0.02em;
      line-height: 1.1;
    }

    h1 {
      font-size: clamp(3rem, 8vw, 6rem);
      font-weight: 300;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--gold);
    }

    h2 {
      font-size: clamp(2rem, 5vw, 3.5rem);
      position: relative;
      margin-bottom: 2rem;
      color: var(--gold);
    }

    h2:after {
      content: '';
      position: absolute;
      bottom: -10px;
      left: 0;
      width: 80px;
      height: 2px;
      background: var(--gold);
    }

    p {
      font-size: clamp(0.9rem, 1.1vw, 1.1rem);
      color: var(--text-muted-dark);
      line-height: 1.8;
    }

    .lead {
      font-size: clamp(1.1rem, 1.5vw, 1.4rem);
      color: var(--text-light);
    }

    /* ===== ШАПКА (тёмная) ===== */
    header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      z-index: 1000;
      padding: 1.5rem var(--container-padding);
      background: rgb(10 10 10);
      backdrop-filter: blur(10px);
      border-bottom: 1px solid var(--border-dark);
      transition: all 0.4s var(--ease-slow);
    }

    header.scrolled {
      padding: 1rem var(--container-padding);
      background: rgba(18, 18, 18, 0.95);
    }

    .nav-container {
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .logo {
      font-size: 2rem;
      color: var(--gold);
      letter-spacing: 0.3em;
      text-transform: uppercase;
      text-decoration: none;
      padding: 0.5rem 0;
      position: relative;
    }

    .logo:after {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 100%;
      height: 1px;
      background: var(--gold);
      transform: scaleX(0);
      transition: transform 0.6s var(--ease-slow);
    }

    .logo:hover:after {
      transform: scaleX(1);
    }

    .nav-links {
      display: flex;
      gap: 2.5rem;
      list-style: none;
    }

    .nav-links a {
      color: var(--text-light);
      text-decoration: none;
      font-size: 0.9rem;
      letter-spacing: 0.1em;
      text-transform: uppercase;
      position: relative;
      padding: 0.5rem 0;
      transition: color 0.3s ease;
    }

    .nav-links a:before {
      content: '';
      position: absolute;
      bottom: 0;
      left: 0;
      width: 0;
      height: 1px;
      background: var(--gold);
      transition: width 0.4s var(--ease-slow);
    }

    .nav-links a:hover {
      color: var(--gold-light);
    }

    .nav-links a:hover:before {
      width: 100%;
    }

    .nav-toggle {
      display: none;
      background: none;
      border: none;
      color: var(--gold);
      font-size: 1.5rem;
      cursor: pointer;
      z-index: 1001;
    }

    /* ===== МОБИЛЬНОЕ МЕНЮ ===== */
    .mobile-menu {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100vh;
      background: var(--bg-dark);
      z-index: 9999;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      transform: translateX(-100%);
      transition: transform 0.6s var(--ease-slow);
      border-right: 1px solid var(--border-dark);
      padding: 2rem;
    }

    .mobile-menu.active {
      transform: translateX(0);
    }

    .mobile-menu .nav-links {
      display: flex;
      flex-direction: column;
      gap: 2.5rem;
      text-align: center;
      width: 100%;
    }

    .mobile-menu .nav-links a {
      font-size: 1.5rem;
      color: var(--gold);
      padding: 1rem;
      display: block;
      text-decoration: none;
    }

    .mobile-menu .nav-links a:hover {
      background: rgba(201, 168, 107, 0.15);
    }

    .menu-close {
      position: absolute;
      top: 2rem;
      right: 2rem;
      background: none;
      border: none;
      color: var(--gold);
      font-size: 1.5rem;
      cursor: pointer;
      width: 40px;
      height: 40px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* ===== ГЕРОЙ АФИШИ (красный занавес) ===== */
    .afisha-hero {
      position: relative;
      min-height: 60vh;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      overflow: hidden;
      padding: 120px var(--container-padding) 60px;
      isolation: isolate;
      background: linear-gradient(177deg, #251313de 0%, #0F0505 100%);
    }

    .afisha-hero-bg {
      position: absolute;
      inset: 0;
      z-index: 0;
      background-size: cover;
      background-position: center center;
      background-repeat: no-repeat;
      background-color: #1a0808;
      background-image: linear-gradient(rgba(35, 8, 8, 0.38), rgba(12, 4, 4, 0.9)),
        url('https://images.unsplash.com/photo-1514306191717-452ec28c7814?auto=format&fit=crop&w=1280&q=75');
    }

    body.admin-mode .afisha-hero-bg {
      cursor: pointer;
    }

    .hero-content {
      position: relative;
      z-index: 1;
      max-width: 1200px;
      width: 100%;
    }

    .afisha-hero .hero-content h1 {
      font-family: 'Cormorant Garamond', serif;
      font-size: clamp(3rem, 8vw, 6rem);
      font-weight: 300;
      color: var(--gold);
      text-transform: uppercase;
      letter-spacing: 0.1em;
      line-height: 1.05;
      margin-bottom: 0.5rem;
    }

    .afisha-hero .lead {
      font-size: clamp(1.1rem, 1.5vw, 1.4rem);
      color: var(--text-light);
      line-height: 1.75;
      max-width: 720px;
      margin: 0 auto;
      font-weight: 300;
    }

    /* ===== СЕКЦИЯ ПОИСКА ===== */
    .search-section {
      padding: 3rem var(--container-padding);
      background: linear-gradient(122deg, #100606 0%, #0F0505 100%);
    }

    .search-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.5rem;
      max-width: 1200px;
      margin: 0 auto;
    }

    .search-item {
      display: flex;
      flex-direction: column;
      gap: 0.5rem;
      text-align: left;
    }

    .search-item label {
      font-size: 0.9rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--gold-light);
      font-weight: 500;
    }

    .search-item input {
      padding: 0.9rem 1.2rem;
      background: linear-gradient(135deg, var(--bg-velvet) 0%, #0F0505 100%);
      border: 1px solid var(--border-gold);
      font-size: 1rem;
      color: var(--text-light);
      transition: border 0.3s, background 0.3s;
      border-radius: 4px;
    }

    .search-item input::placeholder {
      color: rgba(255, 255, 255, 0.5);
    }

    .search-item input:focus {
      outline: none;
      border-color: var(--gold);
      background: rgb(26 10 10 / 55%);
    }

    /* ===== СЕТКА СПЕКТАКЛЕЙ ===== */
    .afisha-section {
      padding: 4rem var(--container-padding) 6rem;
      background: #FDF5E6;
    }

    .plays-grid {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
      gap: 2.5rem;
      max-width: 1400px;
      margin: 0 auto;
    }

    .play-card {
      background: #ffffff;
      border: 1px solid #777;
      border-radius: 4px;
      overflow: hidden;
      transition: all 0.3s var(--ease-slow);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
      display: flex;
      flex-direction: column;
      position: relative;
      height: 100%;
    }

    .play-card:hover {
      transform: translateY(-6px);
      border-color: var(--gold);
      box-shadow: 0 16px 32px rgba(0, 0, 0, 0.15);
    }
    .play-card.dragging {
      opacity: 0.55;
    }
    .play-card.drag-over {
      border-color: var(--gold);
      box-shadow: 0 0 0 2px rgba(201, 168, 107, 0.35);
    }
    .play-card.card-hidden {
      opacity: 0.45;
      border-style: dashed;
    }
    .play-card.card-hidden:hover {
      opacity: 0.75;
    }

    .play-card-image {
      height: 220px;
      overflow: hidden;
      position: relative;
      cursor: pointer;
    }

    .play-card-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      transition: transform 0.6s;
    }

    .play-card:hover .play-card-image img {
      transform: scale(1.05);
    }

    .play-card-content {
      padding: 1.8rem;
      display: flex;
      flex-direction: column;
      flex: 1;
    }

    .play-title {
      font-size: 2.2rem;
      color: #111;
      margin-bottom: 0.8rem;
      line-height: 1.2;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .play-genre {
      font-size: 0.95rem;
      color: var(--gold-dark);
      margin-bottom: 0.5rem;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .play-director {
      font-size: 0.95rem;
      color: #222;
      margin-bottom: 1rem;
      font-style: italic;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .play-description {
      font-size: 1.05rem;
      color: #222;
      margin-bottom: 1.2rem;
      line-height: 1.7;
      min-height: calc(1.7em * 3);
      display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical;
      overflow: hidden;
    }

    .play-location {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.95rem;
      color: #222;
      margin-bottom: 0.7rem;
    }

    .play-location i {
      color: var(--gold-dark);
      width: 18px;
    }

    .play-date {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 0.95rem;
      color: #222;
      margin-bottom: 0.7rem;
    }

    .play-date i {
      color: var(--gold-dark);
      width: 18px;
    }

    .play-price {
      display: flex;
      align-items: center;
      gap: 0.5rem;
      font-size: 1.2rem;
      font-weight: 600;
      color: var(--gold-dark);
      margin: 1rem 0 1.2rem;
    }

    .play-price i {
      color: var(--gold-dark);
    }

    body.admin-mode .play-price .fa-ticket-alt {
      cursor: pointer;
      box-shadow: 0 0 0 2px rgba(197, 165, 114, 0.35);
      border-radius: 4px;
      padding: 2px;
    }

    .play-details-link {
      display: block;
      width: 100%;
      padding: 1rem;
      background: var(--gold);
      border: none;
      color: #1a1a1a;
      font-size: 0.9rem;
      letter-spacing: 0.15em;
      text-transform: uppercase;
      text-align: center;
      text-decoration: none;
      font-weight: 600;
      transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
      border-radius: 2px;
      margin-top: auto;
      box-shadow: 0 4px 15px rgba(197, 165, 114, 0.25);
    }

    .play-details-link:hover {
      background: var(--gold-light);
      color: #000;
      transform: translateY(-2px);
      box-shadow: 0 8px 22px rgba(197, 165, 114, 0.4);
    }

    /* Page-level ticket bar (standalone afisha / legacy afisha2 look) */
    .buy-tickets-wrapper {
      text-align: center;
      padding: 3rem var(--container-padding);
      background: rgba(0,0,0,0.5);
      border-top: 1px solid var(--border-gold);
      border-bottom: 1px solid var(--border-gold);
    }
    .btn-buy-tickets {
      display: inline-block;
      padding: 1.2rem 4rem;
      border: 2px solid var(--gold);
      background: var(--gold);
      color: var(--bg-dark);
      font-size: 1.2rem;
      font-weight: 600;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      text-decoration: none;
      transition: all 0.4s var(--ease-slow);
      border-radius: 2px;
      box-shadow: 0 4px 15px rgba(197, 165, 114, 0.3);
    }
    .btn-buy-tickets:hover {
      background: transparent;
      color: var(--gold);
      transform: translateY(-3px);
      box-shadow: 0 10px 25px rgba(197, 165, 114, 0.5);
    }

    .card-delete-btn,
    .card-hide-btn {
      position: absolute;
      top: 10px;
      z-index: 20;
      background: rgba(0,0,0,0.7);
      color: #ff6b6b;
      border: none;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      cursor: pointer;
      display: none;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      font-size: 1rem;
    }
    .card-delete-btn { right: 10px; }
    .card-hide-btn {
      right: 48px;
      color: var(--gold);
    }
    .card-delete-btn:hover {
      background: #ff6b6b;
      color: white;
      transform: scale(1.05);
    }
    .card-hide-btn:hover {
      background: var(--gold);
      color: #111;
      transform: scale(1.05);
    }
    body.admin-mode .card-delete-btn,
    body.admin-mode .card-hide-btn {
      display: flex;
    }

    .add-card-btn {
      position: fixed;
      bottom: 20px;
      right: 20px;
      z-index: 15002;
      background: #d4af37;
      color: #000;
      border: none;
      padding: 12px 24px;
      font-weight: bold;
      border-radius: 4px;
      cursor: pointer;
      font-size: 1rem;
      transition: all 0.2s;
      display: none;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      gap: 8px;
      align-items: center;
    }
    .add-card-btn:hover {
      background: #e5c158;
      transform: scale(1.02);
    }
    body.admin-mode .add-card-btn {
      display: flex;
    }
    body.admin-mode #edit-ticket-url-btn {
      bottom: 76px;
      max-width: min(320px, calc(100vw - 40px));
    }

    /* ===== СКЕЛЕТОН (заглушка) ===== */
    @keyframes pulse {
      0% { opacity: 0.6; }
      50% { opacity: 0.3; }
      100% { opacity: 0.6; }
    }
    .skeleton .play-card-image,
    .skeleton .play-card-content div {
      animation: pulse 1.2s infinite;
      background: #333;
      border-radius: 4px;
    }
    .skeleton .play-card-image {
      background: #2a2a2a;
    }

    /* ===== ФУТЕР ===== */
    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;
    }
    .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;
    }

    /* Legal/contact modals: styles/site-footer.css (single source, homepage look) */


    /* ===== УВЕДОМЛЕНИЯ ===== */
    .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;
    }
    .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; }

    /* ===== АДМИН-ПАНЕЛЬ ===== */
    #admin-save-bottom {
      position: fixed;
      bottom: 20px;
      left: 20px;
      z-index: 15001;
      background: #d4af37;
      color: #000;
      border: none;
      padding: 12px 24px;
      font-weight: bold;
      border-radius: 4px;
      cursor: pointer;
      display: none;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    }
    body.admin-mode #admin-save-bottom { display: block; }
    .inline-editor {
      position: fixed;
      background: #2a2a2a;
      border: 2px solid #d4af37;
      border-radius: 8px;
      padding: 12px;
      z-index: 20000;
      display: none;
      flex-direction: column;
      gap: 12px;
      min-width: 200px;
    }
    [data-editable] { cursor: pointer; transition: outline 0.1s ease; }
    [data-editable].editing-active { outline: 2px solid var(--gold); background-color: rgba(197, 165, 114, 0.1); }
    #admin-login-overlay {
      position: fixed;
      top: 0; left: 0; width: 100%; height: 100%;
      background: rgba(0,0,0,0.9);
      display: none;
      justify-content: center;
      align-items: center;
      z-index: 20001;
    }
    #admin-login-box {
      background: #1a1a1a;
      border: 2px solid #d4af37;
      padding: 2rem;
      max-width: 400px;
      width: 90%;
      border-radius: 8px;
      text-align: center;
    }
    #admin-login-box h3 { color: #d4af37; margin-bottom: 1.5rem; }
    #admin-login-box input { width: 100%; padding: 0.8rem; background: #2a1a1a; border: 1px solid #d4af37; color: #fff; margin-bottom: 1rem; border-radius: 4px; }
    #admin-login-box button { background: #d4af37; color: #000; border: none; padding: 0.8rem 2rem; cursor: pointer; border-radius: 4px; font-weight: 600; }
    #admin-login-error { color: #ff6b6b; margin-top: 0.5rem; }

    /* ===== АДАПТАЦИЯ ===== */
    @media (max-width: 1024px) { .search-grid { grid-template-columns: repeat(2, 1fr); } }
    @media (max-width: 768px) {
      .nav-links { display: none; }
      .nav-toggle { display: block; }
      .search-grid { grid-template-columns: 1fr; }
      .afisha-hero { min-height: 50vh; padding: 100px var(--container-padding) 40px; }
      .footer-grid { grid-template-columns: 1fr; gap: 4rem; }
    }
    @media (max-width: 480px) {
      .afisha-hero { min-height: 40vh; padding: 80px var(--container-padding) 30px; }
      .footer-logo { font-size: 2.2rem; }
    }
    .fade-in { animation: fadeIn 0.8s ease forwards; }
    @keyframes fadeIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
