/* ---- Base ---- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #1e1e1e;
    --bg2: #2a2a2a;
    --border: #070807;
    --text: #eaeaea;
    --text2: #a0a0a0;
    --text3: #757575;
    --accent: #ffffff;
    --accent-dim: #333333;
    --cyan: #eaeaea;
    --green: #ffffff;
    --radius: 8px;
    --font: 'Inter', system-ui, sans-serif;
    --mono: 'JetBrains Mono', monospace;
}

html {
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

::selection {
    background: rgba(167, 139, 250, 0.3);
}

::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 3px;
}

/* ---- Header ---- */
header {
    position: sticky;
    top: 16px;
    z-index: 50;
    margin: 0 auto;
    width: calc(100% - 32px);
    max-width: 1500px;
    background: var(--bg2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.header-inner {
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.h-link {
    font-size: 0.8rem;
    color: var(--text3);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    background: transparent;
    padding: 8px 14px;
    border-radius: 8px;
    border: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.h-link:hover,
.h-link.active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.06);
}

.h-divider {
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 4px;
}

.h-icon {
    padding: 8px !important;
    display: flex;
    align-items: center;
    justify-content: center;
}



.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.15rem;
    color: var(--text);
    text-decoration: none;
    letter-spacing: -0.03em;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

.brand-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15));
}

.plugin-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text2);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3px 8px;
    border-radius: 12px;
    font-family: var(--mono);
}

/* ---- Stats Strip (index.html only) ---- */
.stats-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 14px 20px;
    margin-bottom: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
}

.stat-item {
    display: flex;
    align-items: baseline;
    gap: 6px;
    white-space: nowrap;
}

.stat-num {
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    font-family: var(--mono);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

.stat-lbl {
    color: var(--text3);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.sep {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    margin: 0 2px;
}

/* ---- Main ---- */
main {
    margin: 0 auto;
    padding: 48px 24px 64px;
}

/* ---- Toolbar ---- */
.toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-wrap {
    position: relative;
    flex: 1;
    min-width: 180px;
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text3);
    pointer-events: none;
}

#search,
#author-search {
    width: 100%;
    padding: 9px 12px 9px 36px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font);
    font-size: 0.85rem;
    outline: none;
    transition: border-color 0.15s;
}

#search:focus,
#author-search:focus {
    border-color: #444;
}

#search::placeholder,
#author-search::placeholder {
    color: var(--text3);
}

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dl-all-btn {
    display: flex;
    align-items: center;
    padding: 7px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    outline: none;
}

.dl-all-btn:hover {
    color: var(--text);
    border-color: var(--accent);
    background: var(--accent-dim);
}

.dl-all-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.filter-group {
    display: flex;
    gap: 2px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2px;
}

.filter-btn {
    padding: 6px 14px;
    border: none;
    background: none;
    color: var(--text2);
    font-family: var(--font);
    font-size: 0.8rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
}

.filter-btn:hover {
    color: var(--text);
}

.filter-btn.active {
    background: #2a2a2a;
    color: var(--text);
}

#sort,
#author-sort {
    padding: 8px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text2);
    font-family: var(--font);
    font-size: 0.8rem;
    cursor: pointer;
    outline: none;
}

#sort option,
#author-sort option {
    background: var(--bg2);
    color: var(--text);
}

/* ---- Grid ---- */
.grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

/* ---- Card ---- */
.card {
    background: #333333;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.card:hover {
    border-color: #515151;
    background: #424242;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.card:hover::before {
    opacity: 1;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.card-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: var(--bg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-avatar-ph {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    background: #515151;
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05), 0 4px 10px rgba(0, 0, 0, 0.3);
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}

.card-author {
    font-size: 0.82rem;
    color: #a1a1aa;
}

.card-date {
    font-size: 0.72rem;
    color: var(--text3);
    white-space: nowrap;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 4px;
}

.card-desc {
    font-size: 0.9rem;
    color: #cbd5e1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.6;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.card-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.card-share {
    background: none;
    border: 1px solid var(--border);
    border-radius: 0;
    color: var(--text);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    transition: background 0.15s;
    flex-shrink: 0;
}

.card-share:hover {
    background: #222;
}

.tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.tag-file {
    background: #1e1b2e;
    color: var(--accent);
}

.tag-code {
    background: #0f2b2b;
    color: var(--cyan);
}

.tag-link {
    background: #1a2520;
    color: var(--green);
}

.tag-obfuscated {
    background: #2d1215;
    color: #f87171;
}

.tag-loadstring {
    background: #2d2012;
    color: #fbbf24;
}

/* Loadstring links in modal */
.loadstring-link {
    display: block;
    font-size: 0.82rem;
    color: #fbbf24;
    word-break: break-all;
    margin-bottom: 6px;
    padding: 8px 12px;
    background: #1a1708;
    border: 1px solid #78350f;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.15s;
}

.loadstring-link:hover {
    background: #2d2012;
    color: #fde68a;
}

.author-click {
    cursor: pointer;
    transition: opacity 0.15s, color 0.15s;
}

.author-click:hover {
    opacity: 0.8;
}

span.author-click:hover,
.card-author.author-click:hover {
    color: var(--accent);
    text-decoration: underline;
}



/* ---- Status ---- */
.status {
    text-align: center;
    padding: 48px 0;
    color: var(--text3);
    font-size: 0.9rem;
}

/* ---- Modal ---- */
.overlay {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, 0.75);
}

.overlay.hidden {
    display: none;
}

.modal {
    width: 90%;
    max-width: 680px;
    height: auto;
    max-height: 90%;
    background: #333333;
    border: 1px solid var(--border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.modal-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border);
    background: #333333;
    gap: 12px;
}

.modal-head {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 0;
}

.m-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
}

.m-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.m-avatar-ph {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--accent);
}

.m-meta {
    flex: 1;
    min-width: 0;
    overflow: hidden;
}

.m-meta h2 {
    font-size: 1.3rem;
    font-weight: 700;
    word-break: break-word;
    line-height: 1.3;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.m-info {
    font-size: 0.78rem;
    color: var(--text3);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.m-info .sep {
    margin: 0 2px;
}

.m-info span:first-child {
    color: var(--accent);
    font-weight: 500;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: none;
    color: var(--text2);
    font-size: 1.4rem;
    cursor: pointer;
    border-radius: 6px;
    flex-shrink: 0;
}

.close-btn:hover {
    background: #2a2a2a;
    color: var(--text);
}

.msg-btn {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    padding: 3px 8px;
    background: rgb(0, 0, 0);
    border: 1px solid rgb(0, 0, 0);
    border-radius: 4px;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    text-decoration: none;
    letter-spacing: 0.04em;
    transition: all 0.15s;
}

.msg-btn:hover {
    background: rgb(0, 0, 0);
    border-color: rgb(255, 255, 255);
    color: #fff;
}

.msg-btn.hidden {
    display: none !important;
}

/* ---- Embeds ---- */
.embed-card {
    display: flex;
    margin: 12px 0;
    max-width: 520px;
    background: #111214;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s;
}

.embed-card:hover {
    border-color: rgba(255, 255, 255, 0.12);
}

.embed-border {
    width: 4px;
    flex-shrink: 0;
    border-radius: 8px 0 0 8px;
}

.embed-inner {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.embed-grid {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    align-items: start;
}

.embed-text {
    min-width: 0;
}

.embed-provider {
    font-size: 0.7rem;
    color: var(--text3);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}

.embed-author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    text-decoration: none;
    margin-bottom: 4px;
    transition: opacity 0.15s;
}

.embed-author:hover {
    opacity: 0.8;
}

.embed-author-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.embed-title {
    font-size: 1rem;
    font-weight: 700;
    color: #58a6ff;
    text-decoration: none;
    line-height: 1.35;
    display: block;
    margin-bottom: 6px;
    transition: color 0.15s;
}

.embed-title:hover {
    color: #79bbff;
}

.embed-description {
    font-size: 0.84rem;
    color: #b5b9be;
    line-height: 1.5;
    white-space: pre-wrap;
}

.embed-thumbnail {
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.embed-image {
    margin-top: 8px;
    border-radius: 6px;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.embed-video-wrap {
    margin-top: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #000;
    position: relative;
    aspect-ratio: 16 / 9;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.embed-video {
    width: 100%;
    height: 100%;
    border: none;
}

.modal-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    flex: 1;
    min-width: 0;
}

@media (max-width: 768px) {
    .modal-body {
        padding: 16px 18px 20px;
    }
}

.section {
    margin-bottom: 20px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text3);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.section-text {
    font-size: 0.88rem;
    color: var(--text2);
    word-break: break-word;
    overflow-wrap: anywhere;
    line-height: 1.7;
    min-width: 0;
}

.section-text p {
    margin: 0 0 10px;
}

.section-text p:last-child {
    margin-bottom: 0;
}

.section-text p:empty {
    display: none;
}

/* Discord Markdown Elements */
.section-text h3,
.section-text h4,
.section-text h5 {
    margin: 16px 0 6px;
    color: #fff;
    font-weight: 600;
    line-height: 1.3;
}

.section-text>h3:first-child,
.section-text>h4:first-child,
.section-text>h5:first-child {
    margin-top: 0;
}

.section-text h3 {
    font-size: 1.15em;
}

.section-text h4 {
    font-size: 1.05em;
}

.section-text h5 {
    font-size: 1em;
}

.section-text strong {
    font-weight: 700;
    color: #fff;
}

.section-text em {
    font-style: italic;
}

.section-text u {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.section-text s {
    text-decoration: line-through;
    color: var(--text3);
}

.inline-code {
    background: #1e1f22;
    padding: 3px 6px;
    border-radius: 4px;
    font-family: var(--mono);
    font-size: 0.85em;
    color: var(--text);
}

.spoiler {
    background: #1e1f22;
    color: transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.1s;
    user-select: none;
}

.spoiler.revealed {
    color: inherit;
    background: #2b2d31;
    user-select: auto;
}

.code-wrap {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #161616;
    border-bottom: 1px solid var(--border);
}

.code-lang {
    font-size: 0.68rem;
    color: var(--text3);
    text-transform: uppercase;
    font-weight: 500;
}

.copy-btn {
    padding: 3px 10px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text2);
    font-size: 0.7rem;
    font-family: var(--font);
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover {
    background: #222;
    color: var(--text);
}

.copy-btn.copied {
    border-color: #34d399;
    color: #34d399;
}

.code-block {
    padding: 14px;
    font-family: var(--mono);
    font-size: 0.78rem;
    line-height: 1.65;
    color: var(--text2);
    overflow-y: auto;
    overflow-x: auto;
    white-space: pre;
    word-break: normal;
    max-height: 450px;
}

@media (max-width: 768px) {
    .code-block {
        max-height: 300px;
        font-size: 0.72rem;
        padding: 10px;
    }
}

.att-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #1c1c1c;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 8px;
    gap: 12px;
    transition: border-color 0.15s;
}

.att-row:hover {
    border-color: #333;
}

.media-preview {
    margin: 0 0 16px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #0a0a0a;
}

.media-preview img,
.media-preview video {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 480px;
    margin: 0 auto;
}

.att-name {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text);
    word-break: break-all;
    overflow-wrap: anywhere;
    flex: 1;
    min-width: 0;
}

.att-size {
    font-size: 0.72rem;
    color: var(--text3);
    white-space: nowrap;
}

.att-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.att-prev-btn {
    padding: 5px 14px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 5px;
    color: var(--text2);
    font-size: 0.75rem;
    font-family: var(--font);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.att-prev-btn:hover {
    background: #222;
    color: var(--text);
}

.file-preview {
    margin: 6px 0 16px;
}

.att-dl {
    padding: 5px 14px;
    background: #2a2a2a;
    border: none;
    border-radius: 5px;
    color: var(--text);
    font-size: 0.75rem;
    font-family: var(--font);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s;
    white-space: nowrap;
}

.att-dl:hover {
    background: #333;
}

.link-item {
    display: block;
    font-size: 0.82rem;
    color: var(--accent);
    word-break: break-all;
    margin-bottom: 4px;
    text-decoration: none;
}

.link-item:hover {
    text-decoration: underline;
}

/* ---- Tutorials ---- */
.tutor-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 60px 24px 100px;
}

.tutor-hero {
    text-align: center;
    margin-bottom: 56px;
}

.tutor-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, #fff 0%, #000000 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.tutor-hero p {
    color: var(--text2);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.tutor-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.tutor-card {
    background: #0f1113;
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.tutor-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent);
}

.tutor-video-wrap {
    aspect-ratio: 16/9;
    background: #000;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.tutor-video-wrap video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.tutor-info {
    padding: 28px;
}

.tutor-type {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: 12px;
}

.tutor-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--text);
}

.tutor-desc {
    font-size: 0.88rem;
    line-height: 1.65;
    color: var(--text2);
}

/* ---- FAQ Section ---- */
.faq-section {
    margin-top: 60px;
    padding-top: 60px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.faq-section h2 {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 40px;
    text-align: center;
    letter-spacing: -0.03em;
    color: #fff;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 450px), 1fr));
    gap: 32px;
}

.faq-item {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

.faq-question {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    line-height: 1.4;
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-question::before {
    content: "Q";
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--accent);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    font-size: 0.75rem;
    flex-shrink: 0;
}

.faq-answer {
    font-size: 0.95rem;
    color: var(--text2);
    line-height: 1.7;
}

.faq-answer p {
    margin-bottom: 14px;
}

.faq-answer p:last-child {
    margin-bottom: 0;
}

.faq-answer ul {
    margin: 12px 0;
    padding-left: 20px;
    list-style: none;
}

.faq-answer li {
    margin-bottom: 8px;
    padding-left: 18px;
    position: relative;
}

.faq-answer li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
    opacity: 0.5;
}

.faq-answer a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
    transition: opacity 0.2s;
}

.faq-share {
    position: absolute;
    top: 24px;
    right: 24px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: var(--text3);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 5;
}

.faq-share:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: var(--accent);
    transform: scale(1.05);
}

.faq-share.copied {
    background: var(--accent);
    color: #000;
    border-color: var(--accent);
}

.faq-answer a:hover {
    opacity: 0.8;
}

.faq-answer strong {
    color: #fff;
    font-weight: 600;
}

/* ---- Shared Code Blocks ---- */
.api-code {
    background: #0a0a0a;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    margin: 16px 0;
}

.api-code-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 14px;
    background: #161616;
    border-bottom: 1px solid var(--border);
}

.api-code-lang {
    font-size: 0.68rem;
    color: var(--text3);
    text-transform: uppercase;
    font-weight: 500;
}

.api-code pre {
    padding: 20px 24px;
    font-family: var(--mono);
    font-size: 0.8rem;
    line-height: 1.5;
    color: #f8f8f2;
    background: #0a0a0a;
    overflow-x: auto;
    white-space: pre;
    margin: 0;
}

.copy-btn {
    padding: 4px 10px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.05);
    color: var(--text2);
    font-size: 0.7rem;
    font-family: var(--font);
    font-weight: 500;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.copy-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

.copy-btn.copied {
    border-color: var(--accent);
    color: var(--accent);
}

/* ---- Hero Links ---- */
.hero-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.h-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    background: var(--accent);
    color: #000;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
}

.h-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.2);
    opacity: 0.9;
}

.h-btn.btn-alt {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.h-btn.btn-alt:hover {
    background: rgba(255, 255, 255, 0.1);
    box-shadow: none;
}

/* ---- Executor List ---- */
.executor-list {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-top: 12px;
    max-height: 280px;
    overflow-y: auto;
}

.executor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.executor-item:last-child {
    border-bottom: none;
}

.executor-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.executor-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: color 0.15s;
}

.executor-name:hover {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.executor-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

.executor-platform {
    font-size: 0.7rem;
    color: var(--text3);
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 6px;
    border-radius: 4px;
}

.status-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 20px;
    letter-spacing: 0.02em;
}

.status-updated {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

.status-outdated {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.price-badge {
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.price-free {
    background: rgba(52, 211, 153, 0.05);
    border-color: rgba(52, 211, 153, 0.2);
    color: #34d399;
}

.price-paid {
    background: rgba(251, 191, 36, 0.05);
    border-color: rgba(251, 191, 36, 0.2);
    color: #fbbf24;
}

.status-outdated {
    background: rgba(248, 113, 113, 0.1);
    color: #f87171;
}

.executor-loading,
.executor-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px;
    gap: 12px;
    text-align: center;
}

.executor-error span {
    color: var(--text3);
    font-size: 0.85rem;
}

.spinner {
    width: 24px;
    height: 24px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .faq-grid {
        grid-template-columns: 1fr;
    }

    .faq-item {
        padding: 24px;
    }
}



/* ---- Responsive ---- */
@media (max-width: 850px) {
    .tutor-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1000px) {

    header {
        top: 8px;
        width: calc(100% - 16px);
        border-radius: 12px;
    }

    .header-inner {
        padding: 8px 12px;
        height: auto;
        flex-wrap: wrap;
        justify-content: space-between;
        gap: 12px;
    }

    .logo {
        width: auto;
    }

    .stats-strip {
        display: none !important;
    }

    .h-link {
        text-align: left;
        padding: 10px 14px;
        font-size: 0.85rem;
        border-radius: 8px;
        transition: background 0.15s, color 0.15s;
    }

    .h-link:hover {
        background: rgba(255, 255, 255, 0.08);
    }

    main {
        padding: 16px 16px 48px;
    }

    .toolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .search-wrap {
        width: 100%;
    }

    .toolbar-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .dl-all-btn,
    #sort {
        width: 100%;
        justify-content: center;
    }

    .overlay {
        padding: 0;
        align-items: flex-end;
    }

    .modal {
        width: 100%;
        max-width: 100%;
        max-height: 85vh;
        height: auto;
        margin: 0;
        border-radius: 16px 16px 0 0;
        border: none;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.5);
    }

    .modal::before {
        content: '';
        display: block;
        width: 36px;
        height: 4px;
        background: rgba(255, 255, 255, 0.2);
        border-radius: 2px;
        margin: 10px auto 0;
    }

    .modal-top {
        padding: 10px 16px 12px;
        flex-direction: row;
        align-items: center;
        gap: 12px;
        background: transparent;
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }

    .modal-head {
        gap: 10px;
    }

    .m-avatar {
        width: 36px;
        height: 36px;
    }

    .m-avatar-ph {
        font-size: 1rem;
    }

    .m-meta h2 {
        font-size: 1rem;
        margin-bottom: 1px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .m-info {
        font-size: 0.7rem;
        gap: 4px;
        margin-top: 2px;
    }

    .msg-btn {
        font-size: 0.6rem;
        padding: 2px 6px;
        margin-left: 4px;
    }

    .close-btn {
        position: static;
        width: 32px;
        height: 32px;
        background: rgba(255, 255, 255, 0.06);
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        font-size: 1.1rem;
        flex-shrink: 0;
    }

    .modal-body {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .section {
        margin-bottom: 16px;
    }

    .section-label {
        font-size: 0.7rem;
        margin-bottom: 10px;
        padding-bottom: 6px;
    }

    .section-text {
        font-size: 0.84rem;
        line-height: 1.6;
    }

    .att-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 10px 14px;
    }

    .att-actions {
        width: 100%;
        justify-content: stretch;
        display: flex;
        gap: 8px;
    }

    .att-prev-btn,
    .att-dl {
        flex: 1;
        text-align: center;
        padding: 8px 14px;
    }

    .embed-card {
        max-width: 100%;
    }

    .embed-grid {
        grid-template-columns: 1fr;
    }

    .embed-thumbnail {
        width: 100%;
        height: auto;
        max-height: 160px;
    }
}

/* ---- Authors Page ---- */
.authors-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.authors-hero {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 28px;
    border-bottom: 1px solid var(--border);
}

.authors-hero h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.authors-hero p {
    color: var(--text2);
    font-size: 0.95rem;
}

.authors-toolbar {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.authors-toolbar .search-wrap {
    flex: 1;
}

.authors-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.author-card {
    background: #333333;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 28px 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    text-align: center;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.author-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    background: #111216;
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.author-card:hover::before {
    opacity: 1;
}

.author-card-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 16px;
    display: block;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    background: var(--bg);
}

.author-card-avatar-ph {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, #2a2a35, #1e1e24);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05), 0 6px 16px rgba(0, 0, 0, 0.4);
}

.author-card-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.author-card-username {
    font-size: 0.78rem;
    color: var(--text3);
    margin-bottom: 12px;
    font-family: var(--mono);
}

.author-card-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.author-card-stat {
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.author-card-stat-num {
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    font-family: var(--mono);
    white-space: nowrap;
}

.author-card-stat-lbl {
    font-size: 0.68rem;
    color: var(--text3);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.author-card-share {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--text3);
    cursor: pointer;
    padding: 4px 8px;
    transition: all 0.15s;
    opacity: 0;
}

.author-card:hover .author-card-share {
    opacity: 1;
}

.author-card-share:hover {
    background: #222;
    color: var(--text);
}

/* Author Modal Overrides */
.author-modal-body {
    padding: 24px 28px 28px;
    overflow-y: auto;
    flex: 1;
    min-width: 0;
}

.author-modal-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.author-modal-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.author-modal-avatar-ph {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
    background: linear-gradient(135deg, #2a2a35, #1e1e24);
    box-shadow: inset 0 2px 4px rgba(255, 255, 255, 0.05), 0 4px 12px rgba(0, 0, 0, 0.3);
}

.author-modal-info h2 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 4px;
    letter-spacing: -0.01em;
}

.author-modal-info .author-modal-username {
    font-size: 0.8rem;
    color: var(--text3);
    font-family: var(--mono);
    margin-bottom: 6px;
}

.author-modal-stats {
    display: flex;
    gap: 16px;
    font-size: 0.78rem;
    color: var(--text2);
}

.author-modal-stats strong {
    color: #fff;
    font-weight: 700;
    margin-right: 3px;
}

.author-plugins-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text3);
    margin-bottom: 14px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.author-plugin-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.author-plugin-item:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.author-plugin-name {
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.author-plugin-date {
    font-size: 0.72rem;
    color: var(--text3);
    white-space: nowrap;
    flex-shrink: 0;
}

.author-plugin-tags {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.authors-empty {
    text-align: center;
    padding: 48px 0;
    color: var(--text3);
    font-size: 0.9rem;
}

.author-modal-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text2);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    font-family: var(--font);
}

.author-modal-share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text);
    border-color: rgba(255, 255, 255, 0.2);
}

@media (max-width: 1000px) {
    .authors-container {
        padding: 16px 16px 48px;
    }

    .authors-hero {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .authors-hero h1 {
        font-size: 1.5rem;
    }

    .authors-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .author-modal-profile {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }

    .author-modal-stats {
        justify-content: center;
    }
}

.hidden {
    display: none !important;
}

/* ---- Maintenance ---- */
.maintenance-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

.maintenance-content {
    max-width: 440px;
    animation: maintenanceFade 0.8s ease-out;
}

@keyframes maintenanceFade {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.maintenance-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 32px;
    opacity: 0.8;
    filter: grayscale(1) brightness(2);
}

.maintenance-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 16px;
    letter-spacing: -0.03em;
    color: #fff;
}

.maintenance-text {
    color: #888;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 48px;
}

.maintenance-footer {
    font-size: 0.75rem;
    color: #444;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}