/* Base */
:root{--bg:#05060a;--fg:#e6e9ef;--muted:#9aa3b2;--accent:#3d66ff;--accent-grad:linear-gradient(135deg,#2e43ff 0%,#ff214d 100%);--card:#0b0e16;--shadow:0 10px 30px rgba(0,0,0,.45)}
*{box-sizing:border-box}
html{scroll-behavior:smooth;overflow-x:hidden}
body{margin:0;font-family:Inter, Manrope, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;color:var(--fg);background:
  radial-gradient(1100px 600px at 85% -10%, rgba(62,86,255,.22), transparent 60%),
  radial-gradient(900px 520px at 8% 85%, rgba(255,46,80,.22), transparent 60%),
  radial-gradient(800px 420px at 110% 60%, rgba(0,200,255,.14), transparent 60%),
  var(--bg);overflow-x:hidden;width:100%;max-width:100%}
.container{width:min(1100px,92%);margin:0 auto;max-width:100%}

/* Header */
.header{position:fixed;top:0;left:0;right:0;background:rgba(5,6,10,.55);backdrop-filter:saturate(180%) blur(12px);z-index:50;border-bottom:1px solid rgba(255,255,255,.06)}
.header__inner{display:flex;align-items:center;justify-content:flex-end;height:64px;position:relative}
.header__burger{display:none;flex-direction:column;gap:5px;background:transparent;border:none;cursor:pointer;padding:8px;z-index:51;position:relative}
.header__burger span{width:24px;height:2px;background:var(--fg);border-radius:2px;transition:all .3s ease;display:block;transform-origin:center}
.nav__list{display:flex;gap:1.25rem;list-style:none;margin:0;padding:0}
.nav__list a{color:var(--fg);text-decoration:none;font-weight:600;opacity:.85}
.nav__list a:hover{opacity:1}

/* Hero */
.hero{min-height:100vh;display:flex;align-items:center;justify-content:center;padding-top:64px;padding-bottom:64px;position:relative;overflow:hidden}
.hero::before{content:'';position:absolute;inset:0;background:radial-gradient(circle at 50% 50%, rgba(61,102,255,.15) 0%, transparent 70%);pointer-events:none}
.hero__inner{text-align:center;position:relative;z-index:1;max-width:800px;padding:0 3rem}
.hero__title{font-size:clamp(36px,6vw,68px);line-height:1.1;margin:0 0 1rem;font-weight:800;background:linear-gradient(135deg, #e6e9ef 0%, #9aa3b2 50%, #e6e9ef 100%);background-size:200% auto;-webkit-background-clip:text;-webkit-text-fill-color:transparent;background-clip:text;animation:shimmer 3s linear infinite}
.hero__subtitle{margin:0 0 2.5rem;color:var(--muted);font-size:clamp(18px,2.8vw,24px);font-weight:400;line-height:1.6}
@keyframes shimmer{0%{background-position:0% center}100%{background-position:200% center}}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:.5rem;border-radius:14px;padding:.85rem 1.1rem;font-weight:700;text-decoration:none;cursor:pointer;transition:transform .25s ease, box-shadow .25s ease, background .25s ease}
.btn--primary{background:var(--accent-grad);color:#fff;box-shadow:0 8px 24px rgba(70,90,255,.35), 0 6px 18px rgba(255,40,80,.25)}
.btn--primary:hover{transform:translateY(-2px);filter:saturate(110%)}
.btn--ghost{background:transparent;color:var(--fg);border:1px solid rgba(255,255,255,.18)}
.btn--ghost:hover{transform:translateY(-1px);background:rgba(255,255,255,.06)}

/* Sections */
.section{padding:84px 0;position:relative}
.section__head{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1rem;margin-bottom:52px !important;text-align:center;position:relative;z-index:10}
#texts .section__head{margin-bottom:130px !important}
#shorts .section__head{margin-bottom:94px !important}
#youtube .section__head{margin-bottom:32px !important}
.section h2{margin:0;font-size:clamp(26px,3.6vw,36px);text-align:center}
.section__sub{margin:0;color:var(--muted)}

/* Carousel Base */
.carousel{perspective:1200px;position:relative;margin:0 !important;overflow:visible;display:block}
.carousel__stage{position:relative;height:480px;transform-style:preserve-3d;transition:transform .9s cubic-bezier(.2,.8,.2,1);margin:0 !important;padding:0 !important;overflow:visible}
[data-carousel="youtube"] .carousel__stage{height:580px}
[data-carousel^="youtube-"] .carousel__stage{height:580px}
.carousel__controls{position:absolute;left:50%;transform:translateX(-50%);display:flex;justify-content:center;gap:.75rem;z-index:20;margin:0 !important;pointer-events:auto}

/* Индивидуальные отступы для каждой карусели */
.carousel[data-carousel="texts"]{padding:0 0 110px 0 !important}
.carousel[data-carousel="shorts"]{padding:0 0 90px 0 !important}
.carousel[data-carousel="youtube"]{padding:0 0 20px 0 !important}
.carousel[data-carousel="texts"] .carousel__controls{bottom:23px !important}
.carousel[data-carousel="shorts"] .carousel__controls{bottom:19px !important}
.carousel[data-carousel="youtube"] .carousel__controls{bottom:8px !important}
.carousel__btn{width:42px;height:42px;border-radius:50%;border:1px solid rgba(255,255,255,.16);background:rgba(255,255,255,.06);cursor:pointer;box-shadow:0 8px 20px rgba(0,0,0,.35);color:var(--fg);transition:transform .25s ease, background .25s ease}
.carousel__btn:hover{transform:translateY(-2px);background:rgba(255,255,255,.1)}

/* Cards */
.card{position:absolute;top:50%;left:50%;transform-style:preserve-3d;transform-origin:center center;will-change:transform;z-index:1}
.card,.card *{user-select:none}
.card{width:min(320px,80vw);height:420px}
.card--image{display:block;overflow:hidden;border-radius:20px;box-shadow:var(--shadow);background:var(--card);border:1px solid rgba(255,255,255,.06)}
.card--image img{width:100%;height:100%;object-fit:cover;display:block;border-radius:20px}

/* Text Cards with Image and Button */
[data-carousel="texts"] .card-wrapper{position:absolute;top:50%;left:50%;transform-style:preserve-3d;transform-origin:center center;will-change:transform;z-index:1;width:min(320px,80vw);height:420px;overflow:visible}
[data-carousel="texts"] .card-wrapper,.card-wrapper *{user-select:none}
[data-carousel="texts"] .card-wrapper .card{position:absolute !important;top:0 !important;left:0 !important;width:100% !important;height:100% !important;transform:translateZ(0) !important;border-radius:20px !important;margin:0 !important;box-shadow:var(--shadow) !important;z-index:1;backface-visibility:hidden;overflow:hidden}
[data-carousel="texts"] .card-wrapper .card img{border-radius:20px 20px 0 0;display:block;width:100%;height:calc(100% - 60px);object-fit:cover;backface-visibility:hidden}
[data-carousel="texts"] .card-wrapper .card__open{position:absolute;bottom:0;left:0;right:0;width:100%;margin:0;border-radius:0 0 20px 20px;z-index:2;height:60px;display:flex;align-items:center;justify-content:center}
[data-carousel="texts"] .card-wrapper .card-back{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--card);border-radius:20px;transform:rotateY(180deg) translateZ(0);backface-visibility:hidden;z-index:0;pointer-events:none;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.06)}

/* Aspect adjustments */
[data-aspect="9x16"] .card{width:min(260px,70vw);height:420px}
[data-aspect="9x16"] .card-wrapper{position:absolute;top:50%;left:50%;transform-style:preserve-3d;transform-origin:center center;will-change:transform;z-index:1;width:min(260px,70vw);height:420px;overflow:visible}
[data-aspect="9x16"] .card-wrapper,.card-wrapper *{user-select:none}
[data-aspect="9x16"] .card-wrapper .card{position:absolute !important;top:0 !important;left:0 !important;width:100% !important;height:100% !important;transform:translateZ(0) !important;border-radius:20px !important;margin:0 !important;box-shadow:var(--shadow) !important;z-index:1;backface-visibility:hidden}
[data-aspect="9x16"] .card-wrapper .card img{border-radius:20px;display:block;width:100%;height:100%;object-fit:cover;backface-visibility:hidden}
[data-aspect="9x16"] .card-wrapper .card-back{position:absolute;top:0;left:0;width:100%;height:100%;background:var(--card);border-radius:20px;transform:rotateY(180deg) translateZ(0);backface-visibility:hidden;z-index:0;pointer-events:none;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.06)}
[data-aspect="16x9"] .card{width:min(420px,86vw);height:236px}

/* Card wrapper for YouTube carousel with banner */
[data-aspect="16x9"] .card-wrapper{position:absolute;top:50%;left:50%;transform-style:preserve-3d;transform-origin:center center;will-change:transform;z-index:1;width:min(420px,86vw);height:auto;display:flex;flex-direction:column;gap:12px;overflow:visible}
[data-aspect="16x9"] .card-wrapper,.card-wrapper *{user-select:none}
[data-aspect="16x9"] .card-wrapper .card{position:relative !important;top:auto !important;left:auto !important;width:100% !important;height:236px !important;transform:translateZ(0) !important;border-radius:20px !important;margin:0 !important;box-shadow:var(--shadow) !important;z-index:1;backface-visibility:hidden}
[data-aspect="16x9"] .card-wrapper .card img{border-radius:20px;display:block;width:100%;height:100%;object-fit:cover;backface-visibility:hidden}
[data-aspect="16x9"] .card-wrapper .card-banner{z-index:1;backface-visibility:hidden}
[data-aspect="16x9"] .card-wrapper .card-back{position:absolute;inset:0;transform:rotateY(180deg) translateZ(0);backface-visibility:hidden;z-index:0;pointer-events:none}
[data-aspect="16x9"] .card-wrapper .card-back::before{content:'';position:absolute;top:0;left:0;width:100%;height:236px;background:var(--card);border-radius:20px;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.06)}
[data-aspect="16x9"] .card-wrapper .card-back::after{content:'';position:absolute;top:calc(236px + 12px);left:0;width:100%;min-height:calc(236px / 3);background:var(--card);border-radius:20px;box-shadow:var(--shadow);border:1px solid rgba(255,255,255,.06)}
[data-aspect="16x9"] .card-banner{width:100%;min-height:calc(236px / 3);padding:12px 16px;border-radius:20px;background:var(--card);border:1px solid rgba(255,255,255,.06);pointer-events:none;position:relative;z-index:2;flex-shrink:0;box-shadow:var(--shadow);display:flex;align-items:center}
[data-aspect="16x9"] .card-banner__channel{display:flex;align-items:center;gap:12px;width:100%}
[data-aspect="16x9"] .card-banner__icon{width:40px;height:40px;border-radius:50%;object-fit:cover;flex-shrink:0;display:block}
[data-aspect="16x9"] .card-banner__info{flex:1;min-width:0;display:flex;flex-direction:column;gap:4px}
[data-aspect="16x9"] .card-banner__name{font-size:14px;font-weight:600;color:var(--fg);line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-aspect="16x9"] .card-banner__stats{display:flex;flex-wrap:wrap;gap:8px;font-size:12px;color:var(--muted);line-height:1.4}
[data-aspect="16x9"] .card-banner__subscribers,[data-aspect="16x9"] .card-banner__views{opacity:.85}

/* Category Buttons */
.category-buttons{display:flex;flex-wrap:wrap;gap:.75rem;justify-content:center;margin-bottom:6px;position:relative;z-index:10}
.category-btn{padding:.75rem 1.5rem;border-radius:12px;border:1px solid rgba(255,255,255,.18);background:rgba(255,255,255,.06);color:var(--fg);font-weight:600;font-size:15px;cursor:pointer;transition:all .25s ease;font-family:inherit;overflow:hidden;position:relative}
.category-btn:hover{background:rgba(255,255,255,.1);transform:translateY(-2px);border-color:rgba(255,255,255,.25)}
.category-btn.active{background:linear-gradient(135deg, #2e43ff 0%, #3d5aff 40%, #ff214d 100%);border-color:transparent;color:#fff;box-shadow:0 6px 20px rgba(70,90,255,.35), 0 4px 14px rgba(255,40,80,.25);background-clip:border-box;background-origin:border-box}

/* Category Carousels */
.category-carousels{position:relative;min-height:580px}
.category-carousel{display:none;opacity:0;transition:opacity .4s ease}
.category-carousel.active{display:block;opacity:1}

/* Contacts */
.section--contacts{padding:84px 0}
.contacts{display:flex;gap:1.5rem;justify-content:center;flex-wrap:wrap;margin-top:2rem}
.contact-btn{display:inline-flex;align-items:center;justify-content:center;gap:.75rem;padding:1rem 2rem;border-radius:16px;text-decoration:none;font-weight:700;font-size:16px;transition:all .3s cubic-bezier(.2,.8,.2,1);position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.12);min-width:180px;box-shadow:0 8px 24px rgba(0,0,0,.3)}
.contact-btn::before{content:'';position:absolute;inset:0;background:var(--accent-grad);opacity:0;transition:opacity .3s ease;z-index:0}
.contact-btn__icon{position:relative;z-index:1;transition:transform .3s ease}
.contact-btn__text{position:relative;z-index:1}
.contact-btn--telegram{background:rgba(255,255,255,.08);color:var(--fg);backdrop-filter:blur(10px)}
.contact-btn--telegram::before{background:linear-gradient(135deg, #0088cc 0%, #229ED9 100%)}
.contact-btn--telegram:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(0,136,204,.4), 0 8px 20px rgba(34,158,217,.3);border-color:rgba(0,136,204,.4)}
.contact-btn--telegram:hover::before{opacity:1}
.contact-btn--telegram:hover .contact-btn__icon{transform:scale(1.1)}
.contact-btn--telegram:hover .contact-btn__text{color:#fff}
.contact-btn--email{background:rgba(255,255,255,.08);color:var(--fg);backdrop-filter:blur(10px)}
.contact-btn--email::before{background:var(--accent-grad)}
.contact-btn--email:hover{transform:translateY(-4px);box-shadow:0 12px 32px rgba(70,90,255,.4), 0 8px 20px rgba(255,40,80,.3);border-color:rgba(61,102,255,.4)}
.contact-btn--email:hover::before{opacity:1}
.contact-btn--email:hover .contact-btn__icon{transform:scale(1.1)}
.contact-btn--email:hover .contact-btn__text{color:#fff}

/* Footer */
.footer{padding:36px 0;border-top:1px solid rgba(255,255,255,.06);color:var(--muted);text-align:center}
.footer p{margin:0}

/* Top Button */
#top{position:fixed;bottom:32px;right:32px;width:52px;height:52px;border-radius:50%;background:var(--accent-grad);border:none;color:#fff;cursor:pointer;box-shadow:0 8px 24px rgba(70,90,255,.35), 0 6px 18px rgba(255,40,80,.25);display:flex;align-items:center;justify-content:center;z-index:40;opacity:0;pointer-events:none;transition:opacity .3s ease, transform .25s ease;backdrop-filter:saturate(180%) blur(12px)}
#top.visible{opacity:1;pointer-events:auto}
#top:hover{transform:translateY(-4px);filter:saturate(110%)}
#top:active{transform:translateY(-2px)}
#top svg{width:24px;height:24px;stroke-width:2.5}


/* Responsive */
@media (max-width: 840px){
  .header__burger{display:flex;z-index:101}
  .nav__list{position:fixed;top:0;right:-100%;width:280px;height:100vh;background:rgba(5,6,10,.98);backdrop-filter:saturate(180%) blur(20px);flex-direction:column;gap:0;padding:80px 2rem 2rem;margin:0;list-style:none;transition:right .3s ease;z-index:100;border-left:1px solid rgba(255,255,255,.06);overflow-y:auto}
  .nav__list.active{right:0}
  .nav__list li{width:100%;border-bottom:1px solid rgba(255,255,255,.06)}
  .nav__list a{display:block;padding:1rem 0;font-size:18px;opacity:1;width:100%}
  .nav__list a:hover{opacity:.85}
  .header__burger.active span:nth-child(1){transform:translateY(7px) rotate(45deg)}
  .header__burger.active span:nth-child(2){opacity:0;transform:scaleX(0)}
  .header__burger.active span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}
  .section{padding:68px 0}
  .section__head{margin-bottom:44px !important}
  #texts .section__head{margin-bottom:108px !important}
  #shorts .section__head{margin-bottom:79px !important}
  #youtube .section__head{margin-bottom:0 !important}
  .category-buttons{margin-bottom:20px;margin-top:20px;gap:.6rem}
  .category-btn{padding:.65rem 1.2rem;font-size:14px}
  /* Увеличиваем высоту stage для мобильных, чтобы карточки не обрезались */
  .carousel__stage{height:480px;overflow:visible}
  [data-carousel="youtube"] .carousel__stage{height:600px}
  [data-carousel^="youtube-"] .carousel__stage{height:600px}
  /* Уменьшаем размеры карточек для мобильных устройств */
  .card{width:min(280px,85vw);height:380px}
  [data-carousel="texts"] .card-wrapper{width:min(280px,85vw);height:380px}
  [data-aspect="9x16"] .card{width:min(220px,75vw);height:380px}
  [data-aspect="9x16"] .card-wrapper{width:min(220px,75vw);height:380px}
  [data-aspect="16x9"] .card{width:min(340px,90vw);height:191px}
  [data-aspect="16x9"] .card-wrapper{width:min(340px,90vw);height:auto}
  [data-aspect="16x9"] .card-wrapper .card{height:191px !important}
  [data-aspect="16x9"] .card-wrapper .card-back::before{height:191px}
  [data-aspect="16x9"] .card-wrapper .card-back::after{top:calc(191px + 12px);min-height:calc(191px / 3)}
  [data-aspect="16x9"] .card-banner{min-height:calc(191px / 3);padding:10px 12px}
  [data-aspect="16x9"] .card-banner__icon{width:36px;height:36px}
  [data-aspect="16x9"] .card-banner__name{font-size:13px}
  [data-aspect="16x9"] .card-banner__stats{font-size:11px;gap:6px}
  /* Индивидуальные отступы для мобильных устройств */
  .carousel[data-carousel="texts"]{padding-bottom:100px !important}
  .carousel[data-carousel="shorts"]{padding-bottom:80px !important}
  .carousel[data-carousel="youtube"]{padding-bottom:17px !important}
  .carousel[data-carousel="texts"] .carousel__controls{bottom:19px !important}
  .carousel[data-carousel="shorts"] .carousel__controls{bottom:17px !important}
  .carousel[data-carousel="youtube"] .carousel__controls{bottom:6px !important}
  .header__inner{height:60px}
  .hero{min-height:100vh;padding-top:80px;padding-bottom:40px}
  .hero__inner{padding:0 1.5rem}
  #top{bottom:24px;right:24px;width:48px;height:48px}
  #top svg{width:20px;height:20px}
  .contacts{flex-direction:column;align-items:stretch;gap:1rem}
  .contact-btn{min-width:auto;width:100%;max-width:280px;margin:0 auto}
  /* Исправление горизонтального скролла */
  .carousel{max-width:100%;overflow:visible}
  .carousel__stage{max-width:100%;overflow:visible}
  .card-wrapper{max-width:100%;overflow:visible}
  .card{max-width:100%}
  .container{width:min(1100px,92%);padding:0 1rem;max-width:100%}
}

@keyframes floaty{
  0%{transform:translateY(0)}
  50%{transform:translateY(-6px)}
  100%{transform:translateY(0)}
}
.hero__cta{animation:floaty 4.5s ease-in-out infinite}


