/* ==========================================================
   Gravatar 头像服务页专用样式
   设计规范见项目根目录 .design-spec.md
   ========================================================== */

.ava-body {
    background: #f8fafc !important;
}

.ava-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 24px 48px;
}

/* ---------- 面板 ---------- */
.ava-panel {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
}

.ava-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.01em;
}

.ava-panel-title i {
    color: #64748b;
}

.ava-panel-sub {
    color: #64748b;
    font-size: 0.875rem;
    margin-bottom: 18px;
}

.ava-panel h3 {
    font-size: 0.98rem;
    font-weight: 650;
    color: #0f172a;
    margin: 20px 0 10px;
}

.ava-panel p {
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

/* 仅行内 code 应用此样式，代码块内 code 完全由 Prism 控制 */
.ava-panel :not(pre) > code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.8rem;
    color: #0f766e;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

/* ---------- 终端风格代码块（签名元素，对齐 prism-twilight） ---------- */
.ava-terminal {
    background: #141414;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #545454;
    margin: 12px 0;
}

.ava-terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #202020;
}

.ava-terminal-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
}

.ava-terminal-dot:nth-child(1) { background: #f87171; }
.ava-terminal-dot:nth-child(2) { background: #fbbf24; }
.ava-terminal-dot:nth-child(3) { background: #34d399; }

.ava-terminal-title {
    margin-left: 8px;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    font-size: 0.75rem;
    color: #9a9a9a;
}

.ava-terminal-body {
    padding: 14px 0;
    overflow-x: auto;
}

/* 代码块样式完全由 Prism 主题控制，不做任何覆盖 */

/* ---------- 表格 ---------- */
.ava-table-wrap {
    overflow-x: auto;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
}

.ava-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.ava-table th {
    background: #f8fafc;
    padding: 11px 16px;
    text-align: left;
    font-weight: 600;
    color: #334155;
    border-bottom: 2px solid #e2e8f0;
    white-space: nowrap;
}

.ava-table td {
    padding: 11px 16px;
    color: #475569;
    border-bottom: 1px solid #eef2f7;
    line-height: 1.6;
}

.ava-table tr:last-child td {
    border-bottom: none;
}

.ava-table tbody tr {
    transition: background 0.15s ease;
}

.ava-table tbody tr:hover {
    background: #fafefd;
}

.ava-table :not(pre) > code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.78rem;
    color: #0f766e;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

/* ---------- 步骤列表（WPOPT） ---------- */
.ava-steps {
    margin: 16px 0;
    padding: 0;
    list-style: none;
    counter-reset: ava-step;
}

.ava-steps li {
    counter-increment: ava-step;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    color: #475569;
    font-size: 0.9rem;
    line-height: 1.6;
    border-bottom: 1px solid #eef2f7;
}

.ava-steps li:last-child {
    border-bottom: none;
}

.ava-steps li::before {
    content: counter(ava-step);
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #f0fdfa;
    color: #0d9488;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ---------- 提示条 ---------- */
.ava-callout {
    border-radius: 10px;
    padding: 14px 18px;
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 16px 0;
    border: 1px solid;
}

.ava-callout--info {
    background: #f0f9ff;
    border-color: #e0f2fe;
    border-left: 4px solid #0ea5e9;
    color: #0369a1;
}

.ava-callout--warn {
    background: #fffbeb;
    border-color: #fde68a;
    border-left: 4px solid #f59e0b;
    color: #92400e;
}

/* ---------- 哈希格式卡片 ---------- */
.ava-hash-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
    margin-top: 16px;
}

.ava-hash-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 20px;
}

.ava-hash-card h4 {
    font-size: 1rem;
    font-weight: 650;
    color: #0f172a;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ava-hash-card h4 i {
    color: #64748b;
}

.ava-hash-card p {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

.ava-hash-card code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 0.75rem;
    color: #0f766e;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
    word-break: break-all;
}

/* ---------- 示例头像展示 ---------- */
.avatar-examples {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.avatar-item {
    text-align: center;
    background: #f8fafc;
    border-radius: 12px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.avatar-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(15, 23, 42, 0.08);
    background: #f8fafc;
}

.avatar-item img {
    width: 80px;
    height: 80px;
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    transition: all 0.2s ease;
}

.avatar-item .hash {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 8px;
    word-break: break-all;
    font-family: 'SF Mono', Monaco, 'Cascadia Code', Consolas, monospace;
}

.ava-demo-note {
    text-align: center;
    color: #94a3b8;
    font-size: 0.82rem;
    margin-top: 14px;
}

/* ---------- 截图 ---------- */
.ava-screenshot {
    text-align: center;
    margin: 16px 0;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #eef2f7;
    border-radius: 14px;
}

.ava-screenshot img {
    max-width: 85%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}

.ava-screenshot p {
    margin-top: 12px;
    color: #94a3b8;
    font-size: 0.82rem;
}

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
    .ava-hash-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .ava-container {
        padding: 16px 14px 40px;
    }

    .ava-head {
        align-items: flex-start;
    }

    .ava-panel {
        padding: 18px 16px;
    }

    .avatar-examples {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .avatar-item {
        padding: 12px;
    }

    .avatar-item img {
        width: 60px;
        height: 60px;
    }
}
