/* 代理站点 — 顶栏复用 portal-auth.css，以下为页面内容样式 */

.agent-site {
    --ag-primary: #667eea;
    --ag-primary-dark: #764ba2;
    --ag-text: #1a1a2e;
    --ag-muted: #888;
    --ag-bg: #f8f9fe;
    --ag-radius: 14px;
}

.agent-site .auth-navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.agent-site .auth-navbar .nav-container {
    position: relative;
    flex-wrap: wrap;
    align-items: center;
}

.agent-site .auth-navbar .nav-actions {
    flex-shrink: 0;
}

.agent-site .auth-navbar .nav-toggle {
    display: none;
}

.agent-site .auth-navbar .logo {
    min-width: 0;
    flex-shrink: 1;
    text-decoration: none;
}

.agent-site .auth-navbar .logo .logo-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agent-site .auth-navbar .ag-nav-tabs {
    flex: 1;
    justify-content: center;
    min-width: 0;
}

.agent-site .auth-navbar .nav-actions .btn-secondary {
    display: inline-flex !important;
}

.agent-site .ag-page {
    min-height: 100vh;
    padding-top: 64px;
}

/* 页面内按钮（Hero / CTA 区） */
.ag-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 22px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s;
    white-space: nowrap;
}
.ag-btn-white {
    background: #fff;
    color: var(--ag-primary);
}
.ag-btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}
.ag-btn-ghost {
    background: transparent;
    color: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.35);
}
.ag-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
}
.ag-btn-outline {
    background: #fff;
    color: var(--ag-primary);
    border: 1px solid rgba(102, 126, 234, 0.35);
}
.ag-btn-outline:hover {
    background: #f8f7ff;
}

/* Hero */
.ag-hero {
    padding: 100px 24px 80px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 55%, #f093fb 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.ag-hero::before {
    content: '';
    position: absolute;
    inset: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 50%);
    animation: heroRotate 40s linear infinite;
}
.ag-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.ag-hero h1 {
    font-size: 42px;
    color: #fff;
    font-weight: 800;
    margin-bottom: 18px;
    letter-spacing: -0.5px;
}
.ag-hero-desc {
    font-size: 17px;
    color: rgba(255, 255, 255, 0.88);
    line-height: 1.8;
    margin-bottom: 32px;
}
.ag-hero-actions {
    display: flex;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* 通用区块 */
.ag-section {
    padding: 72px 24px;
}
.ag-section-alt {
    background: var(--ag-bg);
}
.ag-section-inner {
    max-width: 1180px;
    margin: 0 auto;
}
.ag-section-head {
    text-align: center;
    margin-bottom: 44px;
}
.ag-section-head .tag {
    display: inline-block;
    padding: 4px 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    background: linear-gradient(135deg, var(--ag-primary), var(--ag-primary-dark));
    color: #fff;
    border-radius: 16px;
    margin-bottom: 12px;
}
.ag-section-head h2 {
    font-size: 30px;
    color: var(--ag-text);
    margin-bottom: 10px;
}
.ag-section-head p {
    font-size: 15px;
    color: var(--ag-muted);
}

/* 应用卡片 */
.ag-plugins-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.ag-plugin-card {
    background: #fff;
    border-radius: var(--ag-radius);
    overflow: hidden;
    border: 1px solid #f0f0f5;
    text-decoration: none;
    color: inherit;
    transition: all 0.35s;
    display: flex;
    flex-direction: column;
}
.ag-plugin-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(102, 126, 234, 0.12);
    border-color: rgba(102, 126, 234, 0.25);
}
.ag-plugin-banner {
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ag-banner-c0 { background: linear-gradient(135deg, #667eea, #764ba2); }
.ag-banner-c1 { background: linear-gradient(135deg, #f093fb, #f5576c); }
.ag-banner-c2 { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.ag-banner-c3 { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.ag-banner-c4 { background: linear-gradient(135deg, #fa709a, #fee140); }
.ag-banner-c5 { background: linear-gradient(135deg, #f6d365, #fda085); }
.ag-plugin-banner i,
.ag-plugin-banner img {
    font-size: 44px;
    color: #fff;
    max-width: 64px;
    max-height: 64px;
    object-fit: contain;
}
.ag-plugin-body {
    padding: 20px 22px 22px;
    flex: 1;
}
.ag-plugin-body h4 {
    font-size: 17px;
    color: var(--ag-text);
    margin-bottom: 8px;
}
.ag-plugin-body p {
    font-size: 13px;
    color: var(--ag-muted);
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.ag-plugin-foot {
    padding: 0 22px 18px;
    font-size: 13px;
    color: var(--ag-primary);
    font-weight: 500;
}

/* 关于 / 联系 */
.ag-about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 15px;
    color: #555;
    line-height: 2;
    text-align: center;
}
.ag-contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}
@media (min-width: 481px) and (max-width: 768px) {
    .ag-contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 769px) {
    .ag-contact-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
.ag-contact-item {
    background: #fff;
    border-radius: var(--ag-radius);
    padding: 28px 20px;
    text-align: center;
    border: 1px solid #f0f0f5;
}
.ag-contact-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
    font-size: 22px;
    color: #fff;
}
.ag-contact-icon.c-blue { background: linear-gradient(135deg, #667eea, #764ba2); }
.ag-contact-icon.c-green { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.ag-contact-icon.c-purple { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.ag-contact-icon.c-orange { background: linear-gradient(135deg, #fa709a, #fee140); }
.ag-contact-label {
    font-size: 13px;
    color: #999;
    margin-bottom: 6px;
}
.ag-contact-value {
    font-size: 15px;
    color: var(--ag-text);
    font-weight: 600;
}
.ag-contact-value a {
    color: inherit;
    text-decoration: none;
}

/* CTA */
.ag-cta {
    padding: 64px 24px;
    background: linear-gradient(135deg, #1a1a2e, #2d2b55);
    text-align: center;
}
.ag-cta h2 {
    font-size: 28px;
    color: #fff;
    margin-bottom: 12px;
}
.ag-cta p {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 28px;
}
.ag-cta-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* 应用市场页 */
.ag-page-hero {
    padding: 72px 24px 56px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    text-align: center;
}
.ag-page-hero h1 {
    font-size: 36px;
    color: #fff;
    font-weight: 800;
    margin-bottom: 12px;
}
.ag-page-hero p {
    font-size: 16px;
    color: rgba(255, 255, 255, 0.85);
}
.ag-search-bar {
    max-width: 480px;
    margin: 28px auto 0;
    position: relative;
}
.ag-search-bar i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}
.ag-search-bar input {
    width: 100%;
    padding: 12px 16px 12px 44px;
    border: none;
    border-radius: 28px;
    font-size: 14px;
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* 页脚 */
.ag-footer {
    background: #1a1a2e;
    color: rgba(255, 255, 255, 0.7);
    padding: 48px 24px 24px;
}
.ag-footer-inner {
    max-width: 1180px;
    margin: 0 auto;
}
.ag-footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 32px;
    margin-bottom: 32px;
}
.ag-footer-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 12px;
}
.ag-footer-logo img {
    height: 24px;
}
.ag-footer-brand p {
    font-size: 13px;
    line-height: 1.8;
}
.ag-footer-col h5 {
    font-size: 14px;
    color: #fff;
    margin-bottom: 14px;
}
.ag-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.ag-footer-col li {
    margin-bottom: 8px;
    font-size: 13px;
}
.ag-footer-col a {
    color: rgba(255, 255, 255, 0.65);
    text-decoration: none;
    transition: color 0.2s;
}
.ag-footer-col a:hover {
    color: #fff;
}
.ag-footer-col i {
    font-size: 12px;
    margin-right: 4px;
}
.ag-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
}
.ag-footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

/* 浮动按钮 */
.ag-back-top {
    position: fixed;
    right: 24px;
    bottom: 90px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--ag-primary), var(--ag-primary-dark));
    color: #fff;
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.35);
}
.ag-back-top.visible {
    opacity: 1;
    visibility: visible;
}
.ag-call-btn {
    position: fixed;
    right: 24px;
    bottom: 24px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    background: #22c55e;
    color: #fff;
    border-radius: 28px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    z-index: 999;
    box-shadow: 0 4px 16px rgba(34, 197, 94, 0.4);
}

.ag-empty {
    text-align: center;
    padding: 60px 20px;
    color: #bbb;
}
.ag-empty i {
    font-size: 56px;
    display: block;
    margin-bottom: 16px;
}

/* 插件详情 — 详细介绍 / 应用演示 */
.pd-detail-head { margin: 28px 0 16px; }
.pd-detail-head h3 { font-size: 18px; color: #1a1a2e; margin-top: 8px; }
.pd-detail-block {
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}
.pd-demo-card { text-align: center; }
.pd-demo-qrcode-wrap {
    display: flex;
    justify-content: center;
    margin: 16px 0 12px;
}
.pd-demo-qrcode {
    padding: 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    display: inline-block;
}
.pd-demo-qrcode img { display: block; }
.pd-demo-tip {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}
.pd-demo-preview-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    margin-bottom: 10px;
    padding: 10px 16px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: opacity .2s, transform .2s;
}
.pd-demo-preview-btn:hover {
    opacity: .92;
    transform: translateY(-1px);
}
.pd-demo-preview-btn .layui-icon { font-size: 16px; }
.pd-demo-link {
    display: block;
    width: 100%;
    font-size: 11px;
    color: #667eea;
    word-break: break-all;
    line-height: 1.6;
    padding: 8px 10px;
    background: #f8f9fe;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
    transition: background .2s, color .2s;
}
.pd-demo-link:hover { background: #eef1ff; }
.pd-demo-link.is-copied { color: #16a34a; background: #f0fdf4; }
.pd-demo-empty {
    padding: 24px 12px;
    color: #bbb;
    font-size: 14px;
}
.pd-demo-empty i { font-size: 40px; display: block; margin-bottom: 10px; }
.pd-demo-empty span { font-size: 12px; color: #ccc; }

@media (max-width: 768px) {
    .ag-hero h1 { font-size: 30px; }
    .ag-footer-grid { grid-template-columns: 1fr 1fr; }

    .agent-site .auth-navbar .nav-container {
        padding: 8px 12px 0;
        gap: 0;
    }

    .agent-site .auth-navbar .logo {
        flex: 1;
        min-width: 0;
        max-width: calc(100% - 132px);
    }

    .agent-site .auth-navbar .logo img {
        height: 28px;
        width: 28px;
        object-fit: contain;
    }

    .agent-site .auth-navbar .logo .logo-text {
        max-width: none;
        font-size: 15px;
    }

    .agent-site .auth-navbar .nav-actions {
        gap: 6px;
    }

    .agent-site .auth-navbar .nav-actions .btn {
        padding: 6px 11px;
        font-size: 12px;
        white-space: nowrap;
    }

    .agent-site .auth-navbar .ag-nav-tabs {
        display: flex !important;
        flex-direction: row;
        flex-wrap: nowrap;
        order: 3;
        width: 100%;
        flex: none;
        justify-content: flex-start;
        align-items: center;
        gap: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding: 10px 0 12px;
        margin: 8px 0 0;
        position: static;
        background: transparent;
        box-shadow: none;
        border-radius: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .agent-site .auth-navbar .ag-nav-tabs::-webkit-scrollbar {
        display: none;
    }

    .agent-site .auth-navbar .ag-nav-tabs a {
        flex-shrink: 0;
        padding: 7px 16px;
        font-size: 13px;
        font-weight: 500;
        color: #666;
        background: #f3f4f8;
        border-radius: 20px;
        white-space: nowrap;
    }

    .agent-site .auth-navbar .ag-nav-tabs a:hover,
    .agent-site .auth-navbar .ag-nav-tabs a.active {
        color: #fff;
        background: linear-gradient(135deg, var(--ag-primary), var(--ag-primary-dark));
        box-shadow: 0 2px 8px rgba(102, 126, 234, 0.28);
    }

    .agent-site .ag-page {
        padding-top: 108px;
    }
}

@media (min-width: 769px) {
    .agent-site .auth-navbar .nav-container {
        flex-wrap: nowrap;
    }

    .agent-site .auth-navbar .ag-nav-tabs {
        order: unset;
        width: auto;
        border-top: none;
        margin-top: 0;
        padding: 0;
        overflow: visible;
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .ag-footer-grid { grid-template-columns: 1fr; }

    .agent-site .auth-navbar .nav-actions .btn-secondary {
        display: none !important;
    }

    .agent-site .auth-navbar .logo {
        max-width: calc(100% - 76px);
    }
}
