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

    html { scroll-behavior: smooth; }

    body {
        background: #0a0a0a;
        background-image:
            radial-gradient(circle at 10% 5%, rgba(255, 0, 85, 0.08) 0%, transparent 40%),
            radial-gradient(circle at 90% 95%, rgba(0, 229, 255, 0.08) 0%, transparent 40%);
        color: #fff;
        font-family: 'Impact', 'Arial Black', sans-serif;
        padding: 0;
        line-height: 1;
        overflow-x: hidden;
        cursor: url("/assets/img/friends/vargreka/cursor.svg") 16 16, auto;
    }

    /* ============================================
       БЕГУЩАЯ СТРОКА СВЕРХУ
       ============================================ */
    .ticker {
        background: #ff0055;
        color: #fff;
        padding: 10px 0;
        overflow: hidden;
        white-space: nowrap;
        font-size: 26px;
        letter-spacing: 3px;
        border-bottom: 5px solid #ffeb3b;
        border-top: 5px solid #ffeb3b;
        transform: rotate(-0.5deg) scale(1.02);
        z-index: 100;
        position: relative;
        box-shadow: 0 0 40px rgba(255, 0, 85, 0.4);
    }

    .ticker-track {
        display: inline-block;
        animation: tick 18s linear infinite;
    }

    @keyframes tick {
        0% { transform: translateX(0); }
        100% { transform: translateX(-50%); }
    }

    /* ============================================
       ОБЁРТКА
       ============================================ */
    .wrap {
        max-width: 720px;
        margin: 0 auto;
        padding: 30px 16px 80px;
        position: relative;
    }

    /* ============================================
       HERO — ЗАГОЛОВОК В СТИЛЕ "IMPACT MEME"
       ============================================ */
    .hero {
        text-align: center;
        margin-bottom: 40px;
        position: relative;
    }

    .hero-kicker {
        display: inline-block;
        background: #ffeb3b;
        color: #000;
        padding: 6px 20px;
        font-size: 18px;
        letter-spacing: 4px;
        transform: rotate(-3deg);
        margin-bottom: 20px;
        font-family: 'JetBrains Mono', monospace;
        box-shadow: 4px 4px 0 #ff0055;
    }

    .hero-title {
        font-size: clamp(72px, 22vw, 200px);
        color: #fff;
        -webkit-text-stroke: 4px #000;
        text-shadow:
            8px 8px 0 #000,
            8px 8px 0 #ff0055,
            -4px -4px 0 #00e5ff;
        line-height: 0.8;
        letter-spacing: 2px;
        margin-bottom: 8px;
        text-transform: uppercase;
        animation: shake 3s infinite;
    }

    @keyframes shake {
        0%, 92%, 100% { transform: translate(0,0) rotate(0deg); }
        93% { transform: translate(-3px,2px) rotate(-2deg); }
        95% { transform: translate(3px,-2px) rotate(2deg); }
        97% { transform: translate(-2px,-1px) rotate(-1deg); }
    }

    .hero-sub {
        display: inline-block;
        background: #ffeb3b;
        color: #000;
        padding: 10px 24px;
        font-size: clamp(20px, 4vw, 32px);
        letter-spacing: 2px;
        transform: rotate(2deg);
        border: 4px solid #000;
        box-shadow: 6px 6px 0 #ff0055;
        margin-top: 14px;
    }

    .circle-around {
        position: relative;
        display: inline-block;
        padding: 4px 16px;
    }

    .circle-around::before {
        content: '';
        position: absolute;
        inset: -8px -12px;
        border: 4px solid #ff0055;
        border-radius: 60% 40% 55% 45%;
        transform: rotate(-4deg);
    }

    /* ============================================
       MEME-КАРТОЧКА
       ============================================ */
    .meme {
        background: #141414;
        border: 5px solid #ff0055;
        padding: 26px 22px;
        margin-bottom: 30px;
        position: relative;
        box-shadow: 10px 10px 0 #000, 10px 10px 0 5px #ffeb3b;
        transform: rotate(-0.6deg);
        transition: all 0.15s ease;
    }

    .meme:nth-child(even) {
        transform: rotate(0.8deg);
        box-shadow: -10px 10px 0 #000, -10px 10px 0 5px #00e5ff;
    }

    .meme:hover {
        transform: rotate(0) scale(1.02);
        z-index: 10;
    }

    /* цветные границы-варианты */
    .meme.b-y   { border-color: #ffeb3b; }
    .meme.b-c   { border-color: #00e5ff; }
    .meme.b-p   { border-color: #ff8fc7; }
    .meme.b-l   { border-color: #b8ff4d; }
    .meme.b-o   { border-color: #ffab40; }
    .meme.b-pur { border-color: #d98fff; }
    .meme.b-d   { background: #000; border-color: #fff; }

    .meme-tag {
        position: absolute;
        top: -18px;
        left: 18px;
        background: #fff;
        color: #000;
        padding: 4px 14px;
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        letter-spacing: 2px;
        transform: rotate(-2deg);
        box-shadow: 3px 3px 0 #ff0055;
    }

    .meme-emoji {
        position: absolute;
        top: -30px;
        right: -20px;
        font-size: 64px;
        transform: rotate(20deg);
        filter: drop-shadow(4px 4px 0 #ff0055);
        z-index: 2;
    }

    .meme-title {
        font-size: clamp(28px, 6vw, 48px);
        color: #fff;
        -webkit-text-stroke: 2px #000;
        text-shadow: 4px 4px 0 #ff0055;
        letter-spacing: 1px;
        line-height: 0.95;
        margin-bottom: 18px;
        text-transform: uppercase;
        text-align: center;
    }

    .meme.b-y .meme-title { text-shadow: 4px 4px 0 #ffeb3b; }
    .meme.b-c .meme-title { text-shadow: 4px 4px 0 #00e5ff; }
    .meme.b-p .meme-title { text-shadow: 4px 4px 0 #ff8fc7; }
    .meme.b-l .meme-title { text-shadow: 4px 4px 0 #b8ff4d; }
    .meme.b-o .meme-title { text-shadow: 4px 4px 0 #ffab40; }

    .meme-text {
        font-family: 'Inter', sans-serif;
        font-weight: 700;
        font-size: 16px;
        line-height: 1.55;
        color: #ccc;
        margin-bottom: 14px;
    }

    .meme.b-d .meme-text { color: #999; }

    .meme-text strong {
        background: #ffeb3b;
        color: #000;
        padding: 2px 8px;
        display: inline-block;
        transform: rotate(-1deg);
    }

    /* эмодзи-полка */
    .emoji-shelf {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        font-size: 34px;
        justify-content: center;
        margin-top: 16px;
        padding-top: 16px;
        border-top: 3px dashed #333;
    }

    .emoji-shelf span {
        transition: transform 0.15s;
        cursor: default;
        display: inline-block;
    }

    .emoji-shelf span:hover {
        transform: scale(1.4) rotate(-15deg);
    }

    /* ============================================
       POV БЛОК
       ============================================ */
    .pov {
        background: #000;
        color: #fff;
        padding: 40px 26px;
        margin-bottom: 30px;
        border: 5px solid #ff0055;
        box-shadow: 10px 10px 0 #ffeb3b;
        transform: rotate(1deg);
        position: relative;
    }

    .pov::before {
        content: 'POV:';
        position: absolute;
        top: -22px;
        left: 20px;
        background: #ff0055;
        color: #fff;
        padding: 6px 18px;
        font-size: 22px;
        letter-spacing: 3px;
        transform: rotate(-3deg);
        box-shadow: 4px 4px 0 #000;
    }

    .pov-title {
        font-size: clamp(34px, 7vw, 64px);
        color: #ffeb3b;
        -webkit-text-stroke: 2px #000;
        text-shadow: 4px 4px 0 #ff0055;
        line-height: 0.95;
        margin-bottom: 20px;
        letter-spacing: 1px;
        text-transform: uppercase;
    }

    .pov-text {
        font-family: 'Inter', sans-serif;
        font-weight: 700;
        font-size: 16px;
        line-height: 1.6;
        color: #ddd;
        max-width: 560px;
    }

    .pov-text strong {
        background: #ffeb3b;
        color: #000;
        padding: 2px 6px;
    }

    /* ============================================
       СКРИНШОТ-КАРТОЧКА С КОДОМ
       ============================================ */
    .screenshot {
        background: #111;
        border: 5px solid #00e5ff;
        padding: 30px 24px;
        margin-bottom: 30px;
        position: relative;
        transform: rotate(-1.2deg);
        box-shadow: 10px 10px 0 #000, 10px 10px 0 5px #ff0055;
        font-family: 'JetBrains Mono', monospace;
    }

    .screenshot::before {
        content: '⬅';
        position: absolute;
        top: 20px;
        right: 20px;
        font-size: 60px;
        color: #ff0055;
        transform: rotate(-20deg);
        -webkit-text-stroke: 1px #000;
    }

    .screenshot-title {
        font-family: 'Impact', sans-serif;
        font-size: clamp(24px, 5vw, 38px);
        color: #fff;
        -webkit-text-stroke: 2px #000;
        text-shadow: 3px 3px 0 #00e5ff;
        line-height: 1;
        margin-bottom: 16px;
        text-transform: uppercase;
    }

    .screenshot-text {
        font-size: 13px;
        line-height: 1.7;
        color: #aaa;
    }

    .screenshot-text .kw { color: #ff8fc7; font-weight: 700; }
    .screenshot-text .str { color: #b8ff4d; }
    .screenshot-text .fn { color: #00e5ff; }

    /* ============================================
       ГИГА-СМАЙЛИК-СТЕНА
       ============================================ */
    .smiley-wall {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
        gap: 8px;
        margin: 30px 0;
        padding: 20px;
        background: #ff0055;
        border: 5px solid #ffeb3b;
        box-shadow: 10px 10px 0 #000;
    }

    .smiley-wall span {
        aspect-ratio: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 44px;
        background: #0a0a0a;
        border: 3px solid #000;
        transition: all 0.15s;
        cursor: default;
    }

    .smiley-wall span:nth-child(4n) { background: #1a1a2e; }
    .smiley-wall span:nth-child(4n+2) { background: #2a1a1a; }
    .smiley-wall span:nth-child(4n+3) { background: #1a2a1a; }

    .smiley-wall span:hover {
        transform: scale(1.15) rotate(15deg);
        z-index: 2;
        background: #ffeb3b;
    }

    /* ============================================
       ФИНАЛ
       ============================================ */
    .final {
        text-align: center;
        padding: 50px 20px;
        position: relative;
    }

    .final-title {
        font-size: clamp(60px, 14vw, 140px);
        color: #fff;
        -webkit-text-stroke: 4px #000;
        text-shadow: 8px 8px 0 #ff0055, -4px -4px 0 #ffeb3b;
        line-height: 0.85;
        letter-spacing: 2px;
        text-transform: uppercase;
        margin-bottom: 14px;
    }

    .final-sub {
        font-family: 'JetBrains Mono', monospace;
        font-size: 14px;
        letter-spacing: 4px;
        color: #666;
        text-transform: uppercase;
    }

    /* ============================================
       ПОДВАЛ
       ============================================ */
    .footer {
        background: #000;
        color: #ffeb3b;
        padding: 16px 24px;
        text-align: center;
        font-family: 'JetBrains Mono', monospace;
        font-size: 12px;
        letter-spacing: 4px;
        text-transform: uppercase;
        transform: rotate(-0.4deg) scale(1.02);
        border-top: 5px solid #ff0055;
        border-bottom: 5px solid #ff0055;
        margin-top: 30px;
    }

    .footer span {
        display: inline-block;
        padding: 0 12px;
    }

    /* ============================================
       ПЛАВАЮЩИЕ ЗВЁЗДЫ
       ============================================ */
    .star {
        position: absolute;
        font-size: 40px;
        pointer-events: none;
        animation: float 4s ease-in-out infinite;
        opacity: 0.7;
    }

    .star.s1 { top: 5%; left: -5%; transform: rotate(-20deg); animation-delay: 0s; }
    .star.s2 { top: 30%; right: -5%; transform: rotate(15deg); animation-delay: 1s; }
    .star.s3 { bottom: 20%; left: -3%; transform: rotate(25deg); animation-delay: 2s; }
    .star.s4 { bottom: 5%; right: -8%; transform: rotate(-15deg); animation-delay: 1.5s; }

    @keyframes float {
        0%, 100% { transform: translateY(0) rotate(-20deg); }
        50% { transform: translateY(-14px) rotate(20deg); }
    }

    /* ============================================
       АДАПТИВ
       ============================================ */
    @media (max-width: 520px) {
        .meme-emoji { font-size: 48px; top: -22px; right: -10px; }
        .meme-title { -webkit-text-stroke: 1.5px #000; }
        .star { display: none; }
    }


/* Refinement: preserve meme-chaos, remove layout chaos. */
.site-back {
    width: min(720px, calc(100% - 32px)); margin: 18px auto 0; position: relative; z-index: 150;
    font-family: 'JetBrains Mono', monospace;
}
.site-back a {
    display: inline-flex; align-items: center; min-height: 40px; padding: 8px 13px;
    background: #000; color: #fff; border: 3px solid #ff0055; box-shadow: 4px 4px 0 #ffeb3b;
    text-decoration: none; font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
}
.site-back a:hover { transform: translate(-1px,-1px); }
.site-back a:focus-visible { outline: 3px solid #00e5ff; outline-offset: 4px; }
.hero-title, .meme-title, .final-title { overflow-wrap: anywhere; text-wrap: balance; }
.meme-text, .pov-text { overflow-wrap: anywhere; }
.screenshot { overflow: hidden; }
.screenshot-text { overflow-x: auto; overscroll-behavior-inline: contain; }
@media (max-width: 520px) {
    .ticker { font-size: 20px; border-width: 4px; }
    .wrap { padding-inline: 12px; }
    .hero-kicker { font-size: 14px; letter-spacing: 2px; }
    .hero-title { font-size: clamp(64px, 25vw, 110px); }
    .hero-sub { font-size: clamp(18px, 7vw, 26px); }
    .meme { padding: 24px 16px; box-shadow: 6px 7px 0 #000; }
    .meme:nth-child(even) { box-shadow: -6px 7px 0 #000; }
    .meme-tag { left: 10px; font-size: 10px; letter-spacing: 1px; }
    .meme-title { font-size: clamp(25px, 10vw, 40px); }
    .meme-text { font-size: 15px; }
    .emoji-shelf { font-size: 28px; }
    .pov, .screenshot { padding-inline: 17px; }
    .footer { font-size: 15px; gap: 8px; }
}
@media (max-width: 350px) {
    .site-back { width: calc(100% - 20px); }
    .wrap { padding-inline: 9px; }
    .meme { border-width: 4px; }
    .meme-emoji { display: none; }
}
@media (pointer: coarse) { body { cursor: auto; } }

/* v3: channel-first structure */
.channel-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 34px;
    padding: 22px 24px;
    background: #0b0b0b;
    border: 4px solid #00e5ff;
    box-shadow: 8px 8px 0 #ff0055;
    transform: rotate(.4deg);
    font-family: 'JetBrains Mono', monospace;
}
.channel-cta-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
.channel-cta-kicker {
    color: #777;
    font-size: 10px;
    letter-spacing: 3px;
}
.channel-cta-copy strong {
    color: #fff;
    font-size: clamp(20px, 4vw, 30px);
    overflow-wrap: anywhere;
}
.channel-cta-copy > span:last-child {
    color: #aaa;
    font-size: 11px;
    letter-spacing: 1px;
}
.channel-cta a {
    flex: 0 0 auto;
    padding: 13px 16px;
    background: #ffeb3b;
    color: #000;
    border: 3px solid #000;
    box-shadow: 4px 4px 0 #ff0055;
    text-decoration: none;
    font-weight: 900;
    font-size: 12px;
    letter-spacing: 1px;
    transition: transform .15s ease;
}
.channel-cta a:hover,
.channel-cta a:focus-visible {
    transform: translate(-2px, -2px);
    outline: 3px solid #00e5ff;
    outline-offset: 3px;
}
.meme-text + .meme-text { margin-top: 10px; }
@media (max-width: 620px) {
    .channel-cta {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }
    .channel-cta a {
        text-align: center;
    }
}


/* v6: media cards without commentary */
.compact-copy { padding-block: 24px !important; }

.compact-copy .meme-text {
    max-width: 610px;
    margin-inline: auto;
    line-height: 1.68;
}

.media-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 0 0 34px;
}

.media-card {
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    border: 4px solid #000;
    box-shadow: 8px 8px 0 #ff0055;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        filter .18s ease;
    transform: rotate(-.35deg);
}

.media-card:nth-child(2) {
    box-shadow: 8px 8px 0 #00e5ff;
    transform: rotate(.4deg);
}

.media-card:nth-child(3) {
    box-shadow: 8px 8px 0 #ffeb3b;
    transform: rotate(-.2deg);
}

.media-card::after {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 0 28px rgba(0,0,0,.18);
    transition: box-shadow .18s ease;
}

.media-card video,
.media-card .media-loop {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
    background: #000;
    transition:
        transform .22s ease,
        filter .22s ease;
}

.media-card:hover,
.media-card:focus-within {
    z-index: 3;
    transform: translateY(-6px) rotate(0deg) scale(1.025);
    box-shadow: 12px 14px 0 #ff0055;
}

.media-card:nth-child(2):hover,
.media-card:nth-child(2):focus-within {
    box-shadow: 12px 14px 0 #00e5ff;
}

.media-card:nth-child(3):hover,
.media-card:nth-child(3):focus-within {
    box-shadow: 12px 14px 0 #ffeb3b;
}

.media-card:hover video,
.media-card:focus-within video,
.media-card:hover .media-loop,
.media-card:focus-within .media-loop {
    transform: scale(1.035);
    filter: contrast(1.04) saturate(1.04);
}

.media-card:hover::after,
.media-card:focus-within::after {
    box-shadow: inset 0 0 18px rgba(0,0,0,.08);
}

.compact-cta {
    margin-bottom: 34px;
}

@media (max-width: 720px) {
    .media-cards {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .media-card {
        aspect-ratio: 16 / 10;
    }
}


/* v9: emoji-only interactive ticker */
.ticker {
    overflow: hidden;
    white-space: nowrap;
}

.ticker-track {
    display: flex !important;
    width: max-content;
    align-items: center;
    animation: ticker-emoji-scroll 30s linear infinite !important;
    will-change: transform;
}

.ticker-set {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
    padding-right: 8px;
}

.ticker-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    font-size: 27px;
    line-height: 1;
    transform: translateZ(0);
    transform-origin: center;
    transition:
        transform .14s ease,
        filter .14s ease;
    cursor: default;
    user-select: none;
}

.ticker-emoji:nth-child(3n) { transform: rotate(-4deg); }
.ticker-emoji:nth-child(4n) { transform: rotate(5deg); }
.ticker-emoji:nth-child(7n) { transform: rotate(-8deg) scale(.94); }

.ticker-emoji:hover {
    position: relative;
    z-index: 5;
    transform: translateY(-5px) rotate(-10deg) scale(1.45) !important;
    filter: drop-shadow(3px 4px 0 rgba(0,0,0,.45));
}

.ticker-emoji:nth-child(even):hover {
    transform: translateY(-5px) rotate(11deg) scale(1.45) !important;
}

@keyframes ticker-emoji-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}

@media (max-width: 620px) {
    .ticker-track {
        animation-duration: 24s !important;
    }

    .ticker-set {
        gap: 5px;
        padding-right: 5px;
    }

    .ticker-emoji {
        min-width: 32px;
        height: 34px;
        font-size: 23px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .001ms !important; animation-duration: .001ms !important; animation-iteration-count: 1 !important; }
}


/* v8: footer pinned to the bottom on short pages */
html,
body {
    min-height: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.wrap {
    flex: 1 0 auto;
    width: 100%;
}

.footer {
    flex: 0 0 auto;
    margin-top: auto !important;
}


.media-loop{display:block;width:100%;height:100%;object-fit:cover;}

/* 0.8.2.1 mobile layout hotfix */
@media (max-width: 620px) {
  .hero-title { font-size: clamp(58px, 22vw, 92px) !important; }
  .media-cards { gap: 20px; }
  .media-card {
    width: min(330px, calc(100% - 18px));
    margin-inline: auto;
    aspect-ratio: 4 / 3;
    box-shadow: 6px 7px 0 #ff0055;
  }
  .media-card:nth-child(2) { box-shadow: 6px 7px 0 #00e5ff; }
  .media-card:nth-child(3) { box-shadow: 6px 7px 0 #ffeb3b; }
  .media-card .media-loop { object-fit: contain !important; }
  .channel-cta { width: calc(100% - 8px); margin-inline: auto; }
}

/* 0.8.2.1 mobile layout hotfix */
@media (max-width: 620px) {
  .hero-title { font-size: clamp(58px, 22vw, 92px) !important; }
  .media-cards { gap: 20px; }
  .media-card {
    width: min(330px, calc(100% - 18px));
    margin-inline: auto;
    aspect-ratio: 4 / 3;
    box-shadow: 6px 7px 0 #ff0055;
  }
  .media-card:nth-child(2) { box-shadow: 6px 7px 0 #00e5ff; }
  .media-card:nth-child(3) { box-shadow: 6px 7px 0 #ffeb3b; }
  .media-card .media-loop { object-fit: contain !important; }
  .channel-cta { width: calc(100% - 8px); margin-inline: auto; }
}
