/* ============================================================
   SINGLE SCRIPT PAGE — COMPLETE RESPONSIVE STYLES
   Matches xenoscripts.com layout exactly.
   ============================================================ */

/* ── Root layout ── */
.ss-page,
main.ss-page {
    max-width: 1100px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    margin-top: 0 !important;
    padding-top: 69px !important; /* Exactly 5px spacer below 64px fixed header */
    padding-bottom: 15px;
    padding-left: 8px !important; /* Reduced side space on mobile to extend card width */
    padding-right: 8px !important; /* Reduced side space on mobile to extend card width */
    box-sizing: border-box;
}
@media (min-width: 768px) {
.ss-page,
    main.ss-page {
        padding-top: 69px !important; /* Exactly 5px spacer below 64px fixed header on desktop */
        padding-bottom: 15px;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
}
/* WP Admin Bar clearances: exactly 5px spacer below admin bar + navbar */
body.admin-bar .ss-page,
body.admin-bar main.ss-page {
    margin-top: 0 !important;
    padding-top: 101px !important; /* 32px admin bar + 64px navbar + 5px spacer */
}
@media screen and (max-width: 782px) {
body.admin-bar .ss-page,
    body.admin-bar main.ss-page {
        margin-top: 0 !important;
        padding-top: 115px !important; /* 46px mobile admin bar + 64px navbar + 5px spacer */
    }
}
/* ── Centered Single Column Layout ── */
.ss-layout {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    margin-top: 0 !important;
    margin-left: auto;
    margin-right: auto;
    gap: 15px;
}
/* ── Cards ── */
.ss-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    margin-top: 0 !important;
    box-sizing: border-box;
}
/* ── Hero card inner layout: Mobile-first (Image on top, Title below image) ── */
.ss-hero-inner {
    display: flex;
    flex-direction: column;
}
.ss-hero-media {
    order: 1;
    width: 100%;
}
.ss-hero-header {
    order: 2;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 16px 10px;
    flex-wrap: wrap;
}
.ss-actions {
    order: 3;
    padding: 0 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
/* ── Desktop view (>= 640px): Title at top, Thumbnail on left, Actions on right ── */
@media (min-width: 640px) {
    .ss-hero-inner {
        display: grid;
        grid-template-areas:
            "header header"
            "media actions";
        grid-template-columns: 1fr 340px;
        gap: 0;
    }

    .ss-hero-header {
        grid-area: header;
        order: unset;
        padding: 20px 20px 16px;
    }

    .ss-hero-media {
        grid-area: media;
        order: unset;
        padding: 0 0 20px 20px;
    }

    .ss-hero-media .ss-thumb-wrap {
        border-radius: 10px;
    }

    .ss-actions {
        grid-area: actions;
        order: unset;
        padding: 0 20px 20px 16px;
        min-width: 340px;
        width: 340px;
        box-sizing: border-box;
    }
}
@media (min-width: 900px) {
.ss-hero-inner {
        grid-template-columns: 1fr 350px;
    }
.ss-actions {
        min-width: 350px;
        width: 350px;
    }
}
@media (min-width: 1200px) {
.ss-hero-inner {
        grid-template-columns: 1fr 350px;
    }
.ss-actions {
        min-width: 350px;
        width: 350px;
    }
}
.ss-title-row {
    min-width: 0;
    flex: 1;
    width: 100%;
}
.ss-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin: 0 0 6px;
    word-break: break-word;
    display: block;
    width: 100%;
}
@media (min-width: 640px) {
.ss-title { font-size: 1.65rem; }
}
.ss-author-link {
    cursor: pointer;
    text-decoration: none;
    transition: opacity 0.15s ease;
}
.ss-author-link:hover {
    opacity: 0.85;
}
.ss-author-link:hover .ss-author-name { font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
}
.ss-game-tag {
    background: #eff6ff;
    color: #2563eb;
    padding: 3px 10px;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.15s;
}
.ss-game-tag:hover { background: #dbeafe; }
/* ── Thumbnail: strict 16:9 ── */
.ss-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f1f5f9;
    flex-shrink: 0;
}
.ss-thumb-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.ss-thumb-badge-views {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 9px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.ss-thumb-badge-type {
    position: absolute;
    bottom: 10px;
    left: 10px;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(4px);
    color: #fff;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    letter-spacing: .02em;
}
.ss-thumb-badge-type.keysystem {
    background: #eab308;
    color: #0f172a;
}
.ss-thumb-badge-type.keyless {
    background: #10b981;
    color: #fff;
}
/* Author row (Matches Image 2 & 4) */
.ss-author-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
    width: 100%;
}
.ss-author-left {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    flex: 1;
}
.ss-author-info {
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
    min-width: 0;
}
.ss-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}
.ss-author-name { font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (min-width: 640px) {
.ss-author-name { font-size: 16px; font-weight: 800; color: #0f172a; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}
.ss-follow-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #0ea5e9;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.ss-follow-btn:hover {
    background: #0284c7;
    transform: translateY(-1px);
}
.ss-follow-btn.following {
    background: #e2e8f0;
    color: #475569;
}
/* Vote + Social Actions Row (Matches Image 3 & 4 - Like/Dislike on left, Bookmark/Share/Flag on right) */
.ss-vote-actions-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
    width: 100%;
}
.ss-vote-bar {
    display: flex;
    align-items: center;
    border-radius: 9999px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    height: 38px;
    padding: 2px 4px;
    overflow: hidden;
}
.ss-vote-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 700;
    font-size: 12px;
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 12px;
    height: 100%;
    transition: color 0.15s, background-color 0.15s;
    border-radius: 9999px;
}
.ss-vote-btn:hover { color: #0284c7; }
.ss-vote-btn + .ss-vote-btn {
    border-left: 1px solid #cbd5e1;
}
.ss-vote-btn + .ss-vote-btn:hover { color: #ef4444; }
.ss-icon-btns {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}
.ss-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #94a3b8;
    padding: 8px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background-color 0.15s;
}
.ss-icon-btn:hover { background: #f1f5f9; color: #0284c7; }
.ss-icon-btn.favorite-btn:hover { color: #f59e0b; }
.ss-icon-btn.report:hover { color: #ef4444; }
.ss-section-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid #f1f5f9;
}
/* ── Description ── */
.ss-description {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
    line-height: 1.75;
    margin-bottom: 28px;
}
.ss-description h1, .ss-description h2, .ss-description h3,
.ss-description h4, .ss-description h5, .ss-description h6 {
    color: #0f172a; font-weight: 800; margin: 1.5rem 0 .75rem; line-height: 1.25;
}
.ss-description h1 { font-size: 1.6rem; }
.ss-description h2 { font-size: 1.35rem; }
.ss-description h3 { font-size: 1.15rem; }
.ss-description p { margin-bottom: 1rem; }
.ss-description ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 0 0 1.25rem 0;
}
.ss-description ul > li {
    position: relative;
    padding-left: 1.35rem;
    margin-bottom: 0.45rem;
    line-height: 1.6;
}
.ss-description ul > li::before {
    content: "+";
    position: absolute;
    left: 0;
    top: 0;
    color: #0284c7;
    font-weight: 800;
    font-size: 15px;
    line-height: 1.5;
}
.ss-description ol { list-style: decimal; margin: 0 0 1rem 1.5rem; }
.ss-description ol > li { margin-bottom: .4rem; }
.ss-description a { color: #2563eb; text-decoration: underline; }
.ss-description strong { color: #1e293b; font-weight: 700; }
.ss-description blockquote {
    border-left: 3px solid #e2e8f0;
    padding-left: 1rem;
    font-style: italic;
    color: #94a3b8;
    margin-bottom: 1rem;
}
.ss-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.ss-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.ss-tag-feature {
    background: #f1f5f9;
    color: #475569;
}
.ss-tag-feature:hover { background: #2563eb; color: #fff; }
/* ── Sub-actions Row (Google, YouTube, Discord, Key) ── */
/* Mobile (< 768px): 2 buttons per row */
.ss-code-sub-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    margin-top: 4px !important;
    margin-bottom: 15px !important;
    box-sizing: border-box !important;
}
.ss-sub-btn {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 7px 10px !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
    text-decoration: none !important;
    transition: all 0.15s ease !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
}
.ss-sub-btn-icon {
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}
/* Desktop (>= 768px): All buttons in ONE single row with auto width (Matches Image 2) */
@media (min-width: 768px) {
    .ss-code-sub-actions {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
        justify-content: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
        overflow-x: auto !important;
    }
    .ss-sub-btn {
        display: inline-flex !important;
        width: auto !important;
        flex: 0 0 auto !important;
        padding: 6px 14px !important;
        white-space: nowrap !important;
    }
}
/* ── How to Use This Script (Delta Executor Guide) ── */
.ss-how-to-card {
    margin-bottom: 20px;
}
.ss-how-to-header {
    padding: 18px 24px;
    border-bottom: 1px solid #f1f5f9;
}
@media (min-width: 640px) {
.ss-how-to-header { padding: 20px 32px; }
}
.ss-how-to-main-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
    letter-spacing: -0.01em;
}
.ss-how-to-body {
    padding: 20px 18px;
}
@media (min-width: 640px) {
.ss-how-to-body { padding: 24px 28px; }
}
.ss-how-to-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}
@media (min-width: 640px) {
.ss-how-to-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }
}
.ss-how-to-step {
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 16px;
    padding: 32px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.ss-how-to-step:hover {
    transform: translateY(-2px);
    border-color: #cbd5e1;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.04);
}
.ss-step-badge {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f59e0b;
    color: #0f172a;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25);
    flex-shrink: 0;
}
.ss-step-title {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 8px 0;
}
.ss-step-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #64748b;
    margin: 0;
    max-width: 250px;
}
/* ── YouTube embed ── */
.ss-yt-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    background: #f1f5f9;
}
.ss-yt-wrap iframe,
.ss-yt-wrap > div {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}
.ss-comment-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    flex-shrink: 0;
}
.ss-comment-author {
    font-size: 13px;
    font-weight: 700;
    color: #1e293b;
}
.ss-comment-date {
    font-size: 11px;
    color: #94a3b8;
    font-weight: 500;
    margin-left: 6px;
}
.ss-comment-text {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-top: 3px;
}
.ss-comment-form {
    display: flex;
    gap: 12px;
    border-top: 1px solid #f1f5f9;
    padding-top: 20px;
    margin-top: 6px;
}
.ss-comment-input {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 13px;
    color: #1e293b;
    resize: vertical;
    min-height: 90px;
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
}
.ss-comment-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}
.ss-comment-post-btn {
    background: #0f172a;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 8px 20px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    align-self: flex-end;
    white-space: nowrap;
}
.ss-comment-post-btn:hover { background: #1e293b; }
/* ── Script Stats Grid ── */
.ss-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
@media (min-width: 540px) {
.ss-stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.ss-stat-box {
    background: #ffffff;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 14px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}
.ss-stat-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.ss-stat-value {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.2;
}
/* ── Script Preview Box ── */
.ss-preview-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 14px;
    overflow: hidden;
}
.ss-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e8edf2;
    flex-wrap: wrap;
    gap: 12px;
}
.ss-preview-title-row {
    display: flex;
    align-items: center;
    gap: 10px;
}
.ss-preview-icon {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.ss-preview-heading {
    font-size: 14px;
    font-weight: 800;
    color: #0f172a;
    margin: 0;
}
.ss-preview-meta {
    font-size: 11px;
    font-weight: 600;
    color: #94a3b8;
}
.ss-preview-tools {
    display: flex;
    align-items: center;
    gap: 8px;
}
.ss-preview-tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f1f5f9;
    color: #475569;
    border: none;
    border-radius: 8px;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.ss-preview-tool-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}
.ss-preview-tool-btn.primary {
    background: #2563eb;
    color: #fff;
}
.ss-preview-tool-btn.primary:hover {
    background: #1d4ed8;
}
.ss-preview-code-wrap {
    background: #f8fafc;
    border-top: 1px solid #e8edf2;
    padding: 18px 20px;
    overflow-x: auto;
    border-radius: 0 0 14px 14px;
}
.ss-preview-code-wrap pre {
    margin: 0;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #0369a1;
    white-space: pre;
    word-break: normal;
}
.ss-comments-card {
    background: #fff;
    border: 1px solid #e8edf2;
    border-radius: 14px;
    padding: 24px;
}
.ss-comment-box {
    background: #f8fafc;
    border: 1px solid #e8edf2;
    border-radius: 12px;
    padding: 14px 16px;
    margin-bottom: 12px;
}
.ss-comment-box:last-child {
    margin-bottom: 0;
}
