.gate-body .topbar {
    left: 0;
    overflow: visible;
}

.gate-body .main {
    margin-left: 0;
}

.gate-body.welcome-on .gate-main {
    opacity: 0;
    pointer-events: none;
}

.gate-frost {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 880;
    overflow: hidden;
    pointer-events: none;
    background: #050505;
}

.gate-body.welcome-on .gate-frost {
    display: block;
}

.gate-frost-scale {
    position: absolute;
    width: 26%;
    height: 26%;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%) scale(4);
    filter: blur(4px);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 2px;
}

.gate-frost-scale img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gate-top .topbar-left {
    min-width: 0;
    flex: 1;
}

.gate-top .topbar-right {
    flex-shrink: 0;
    gap: 8px;
}

.gate-top .gate-brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 34px;
    min-width: 0;
}

.gate-top .gate-brand .brand-mark {
    height: 34px;
    width: auto;
    max-width: 170px;
}

.gate-auth,
.gate-reg {
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    font-size: 12px !important;
    font-weight: 700;
    line-height: 1;
    padding: 7px 12px !important;
}

.gate-auth span,
.gate-reg span {
    display: inline !important;
    font-size: 12px !important;
}

.gate-auth i,
.gate-reg i {
    font-size: 12px !important;
}

.gate-body .videos-grid .video-card {
    contain: layout style;
}

.gate-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 28px;
}

.gate-page {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border: 1px solid var(--bd);
    border-radius: 4px;
    color: var(--mt);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    background: var(--s1);
}

.gate-page.dots {
    border: none;
    background: transparent;
    min-width: 18px;
    padding: 0 2px;
    color: var(--mt);
}

.gate-page.on {
    background: var(--p);
    border-color: var(--p);
    color: #fff;
}

.gate-page.next {
    color: var(--pl);
}

.gate-info {
    margin-top: 28px;
    margin-bottom: 8px;
    padding: 20px 16px 18px;
    background: #101010;
    border: 1px solid var(--bd);
    border-radius: 4px;
}

.gate-info-kicker {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: var(--mt);
    margin-bottom: 6px;
}

.gate-info h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--tx);
    margin: 0 0 6px;
}

.gate-info-lead {
    font-size: 13px;
    color: var(--mt);
    line-height: 1.5;
    margin: 0 0 14px;
}

.gate-info-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.gate-link {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-height: 92px;
    padding: 14px 12px;
    background: var(--s2);
    border: 1px solid var(--bd);
    border-radius: 4px;
    color: var(--tx);
    text-decoration: none;
    font-family: Outfit, sans-serif;
    cursor: pointer;
    text-align: left;
}

.gate-link i {
    color: var(--pl);
    font-size: 16px;
    margin-bottom: 4px;
}

.gate-link strong {
    font-size: 13px;
    font-weight: 800;
}

.gate-link span {
    font-size: 11px;
    color: var(--mt);
    font-weight: 600;
}

.gate-link:hover {
    border-color: var(--bdh);
    background: rgba(225, 6, 0, 0.1);
}

.gate-onion {
    margin-top: 14px;
    padding: 12px 14px;
    background: #050505;
    border: 1px solid var(--bd);
    border-radius: 4px;
}

.gate-onion-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--pl);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gate-onion-label i {
    font-size: 7px;
    color: #4ade80;
}

.gate-onion-text {
    display: block;
    font-size: 12px;
    color: #ffb3b3;
    font-family: ui-monospace, monospace;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    user-select: text;
    -webkit-user-select: text;
    margin-bottom: 10px;
    line-height: 1.45;
}

.gate-onion-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gate-onion .copy-btn,
.gate-tor-btn {
    align-self: flex-start;
    background: var(--p);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    font-family: Outfit, sans-serif;
    padding: 10px 14px;
    min-height: 40px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.gate-tor-btn {
    background: var(--s2);
    border: 1px solid var(--bd);
    color: var(--tx);
}

.gate-tor-btn:hover { border-color: var(--bdh); color: var(--pl); }
.copy-btn:hover { background: var(--pl); }
.copy-btn.copied { background: #16a34a; }
.copy-btn i, .copy-btn span { pointer-events: none; }

.gate-onion-overlay {
    display: none !important;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom));
    overflow: hidden;
}

.gate-onion-overlay.open {
    display: flex !important;
}

.gate-tor-modal {
    background: var(--s1);
    border: 1px solid var(--bd);
    border-radius: 4px;
    width: 100%;
    max-width: 480px;
    max-height: 90dvh;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.gate-tor-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--bd);
}

.gate-tor-head-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.gate-tor-head-left svg {
    width: 28px !important;
    height: 28px !important;
    max-width: 28px;
    max-height: 28px;
    flex: 0 0 28px;
    overflow: hidden;
    display: block;
}
.gate-tor-title { font-size: 15px; font-weight: 700; color: var(--tx); }
.gate-tor-sub { font-size: 11px; color: var(--mt); margin-top: 2px; }

.gate-tor-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--bd);
    border-radius: 6px;
    color: var(--mt);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}

.gate-tor-body { padding: 20px 22px 24px; }

.gate-tor-modal .onion-link-box {
    background: #050505;
    border: 1px solid var(--bd);
    border-radius: 4px;
    padding: 12px 14px;
    margin-bottom: 20px;
}

.gate-tor-modal .onion-link-label {
    font-size: 9px;
    font-weight: 700;
    color: var(--pl);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.gate-tor-modal .onion-link-row { display: flex; flex-direction: column; gap: 8px; }

.gate-tor-modal .onion-link-text {
    font-size: 12px;
    color: #ffb3b3;
    font-family: ui-monospace, monospace;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-all;
    width: 100%;
    user-select: text;
    -webkit-user-select: text;
    line-height: 1.45;
}

.gate-tor-modal .copy-btn {
    align-self: flex-start;
    background: var(--p);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    font-family: Outfit, sans-serif;
    padding: 10px 14px;
    min-height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.gate-tor-modal .tutorial-section { margin-bottom: 18px; }

.gate-tor-modal .tutorial-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--pl);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.gate-tor-modal .step {
    display: flex;
    gap: 12px;
    margin-bottom: 10px;
    align-items: flex-start;
}

.gate-tor-modal .step-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--p);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 1px;
}

.gate-tor-modal .step-text { font-size: 12px; color: var(--tx); line-height: 1.5; }
.gate-tor-modal .step-text a { color: var(--pl); text-decoration: none; font-weight: 600; }
.gate-tor-modal .step-text a:hover { color: #fff; text-decoration: underline; }
.gate-tor-modal .step-text strong { color: #ffb3b3; }

.gate-tor-modal .platform-tabs { display: flex; gap: 6px; margin-bottom: 14px; }

.gate-tor-modal .ptab {
    flex: 1;
    min-height: 40px;
    padding: 8px 6px;
    background: var(--s2);
    border: 1px solid var(--bd);
    border-radius: 4px;
    color: var(--mt);
    font-size: 10px;
    font-weight: 600;
    font-family: Outfit, sans-serif;
    cursor: pointer;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gate-tor-modal .ptab i { margin-right: 4px; }

.gate-tor-modal .ptab.active {
    background: rgba(225, 6, 0, 0.18);
    border-color: var(--p);
    color: var(--pl);
}

.gate-tor-modal .platform-content { display: none; }
.gate-tor-modal .platform-content.active { display: block; }

.gate-tor-modal .info-note {
    background: rgba(225, 6, 0, 0.08);
    border: 1px solid var(--bd);
    border-radius: 4px;
    padding: 10px 12px;
    font-size: 11px;
    color: var(--mt);
    line-height: 1.5;
    margin-top: 14px;
}

.gate-tor-modal .info-note i { color: var(--pl); margin-right: 5px; }

.gate-modal {
    background: rgba(5, 5, 5, 0.42);
}

.gate-modal .welcome-card {
    max-width: 460px;
}

.gate-modal .welcome-skip {
    background: transparent;
    border: 1px solid var(--bd);
    color: var(--mt);
}

.gate-modal .welcome-skip:hover {
    background: rgba(225, 6, 0, 0.12);
    color: var(--pl);
}

@media (max-width: 1024px) {
    .gate-body .topbar,
    .gate-top {
        left: 0;
        padding: 0 10px;
    }
    .gate-body .main { margin-left: 0; }
    .gate-top .topbar-title { display: none; }
    .gate-top .gate-brand .brand-mark {
        height: 28px;
        max-width: min(132px, 38vw);
    }
    .gate-auth,
    .gate-reg {
        font-size: 12px !important;
        padding: 8px 10px !important;
    }
    .gate-auth span,
    .gate-reg span {
        display: inline !important;
        font-size: 12px !important;
    }
}

@media (max-width: 768px) {
    .gate-body .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .gate-info-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .gate-body .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }
    .gate-auth,
    .gate-reg {
        padding: 8px 9px !important;
        gap: 5px;
    }
}
