/* ==========================================================================
   AJAX Airdrop Directory - Neo-Dark Tech Theme
   ========================================================================== */

.ajd-directory,
.ajd-detail-shell {
    --ajd-bg: #ffffff;
    --ajd-soft-bg: #ffffff;
    --ajd-card: #ffffff;
    --ajd-border: #e5e7eb;
    --ajd-ink: #162032;
    --ajd-muted: #6b7280;
    --ajd-blue: #38bdf8;
    --ajd-blue-soft: rgba(56, 189, 248, 0.1);
    --ajd-green-soft: rgba(16, 185, 129, 0.1);
    --ajd-shadow: 0 2px 4px rgba(0,0,0,0.05);
    
    background: var(--ajd-bg);
    color: var(--ajd-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.ajd-directory *,
.ajd-detail-shell * {
    box-sizing: border-box;
}

.ajd-directory {
    border: 1px solid var(--ajd-border);
    border-radius: 16px;
    padding: clamp(24px, 4vw, 48px);
    background: #ffffff;
}

.ajd-directory-header {
    align-items: end;
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 36px;
}

.ajd-kicker {
    color: var(--ajd-blue);
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.1em;
    line-height: 1;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.ajd-directory-header h2 {
    color: #38bdf8;
    font-size: clamp(28px, 4vw, 44px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    letter-spacing: -0.02em;
}

.ajd-directory-header p {
    color: var(--ajd-muted);
    font-size: 15px;
    line-height: 1.6;
    margin: 12px 0 0;
    max-width: 760px;
}

/* 统计卡片设计 */
.ajd-count {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 12px;
    min-width: 120px;
    padding: 18px;
    text-align: center;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.ajd-count strong {
    color: var(--ajd-blue);
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.ajd-count span {
    color: var(--ajd-muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-top: 6px;
    text-transform: uppercase;
}

/* 网格与项目卡片 */
.ajd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 0;
    background: transparent;
}

.ajd-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

.ajd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.ajd-card:hover {
    transform: translateY(-5px);
    border-color: rgba(56, 189, 248, 0.4);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(56, 189, 248, 0.1);
}

.ajd-card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ajd-card-link:focus-visible,
.ajd-back-link:focus-visible,
.ajd-official-links a:focus-visible,
.ajd-page-link .page-numbers:focus-visible {
    outline: 2px solid var(--ajd-blue);
    outline-offset: 2px;
}

.ajd-card-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 12px 20px;
}

.ajd-card-logo,
.ajd-detail-logo {
    align-items: center;
    background: #0f172a;
    border: 1px solid var(--ajd-border);
    border-radius: 10px;
    display: inline-flex;
    justify-content: center;
    overflow: hidden;
}

.ajd-card-logo {
    height: 52px;
    width: 52px;
}

.ajd-detail-logo {
    height: 80px;
    width: 80px;
}

.ajd-card-logo img {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    object-fit: contain;
}

.ajd-card- logo b,
.ajd-detail-logo b {
    color: var(--ajd-blue);
    font-size: 22px;
    font-weight: 800;
    text-transform: uppercase;
}

/* 状态药丸标签 */
.ajd-status {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--ajd-muted);
    border: 1px solid var(--ajd-border);
}

.ajd-status:not(:empty) {
    background-color: var(--ajd-blue-soft);
    color: var(--ajd-blue);
    border-color: rgba(56, 189, 248, 0.2);
}

.ajd-card-body {
    padding: 0 20px 20px 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.ajd-card-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ajd-ink);
    margin: 0 0 10px 0;
}

.ajd-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 12px;
}

.ajd-card-tags span {
    font-size: 0.7rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--ajd-border);
    color: var(--ajd-muted);
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
}

.ajd-card-body p {
    font-size: 0.85rem;
    color: var(--ajd-muted);
    line-height: 1.6;
    margin: 0 0 16px 0;
    flex-grow: 1;
}

.ajd-updated {
    font-size: 0.7rem;
    color: #64748b;
    margin-bottom: 12px;
}

.ajd-card-action {
    font-size: 0.825rem;
    color: var(--ajd-blue);
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: gap 0.2s ease;
}

.ajd-card-link:hover .ajd-card-action {
    gap: 8px;
}

/* 空状态 */
.ajd-empty {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 12px;
    color: var(--ajd-muted);
    margin: 0;
    padding: 24px;
    text-align: center;
}

/* 分页组件 */
.ajd-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 40px;
}

.ajd-page-link .page-numbers {
    align-items: center;
    background: var(--ajd-card);
    border: 1px solid var(--ajd-border);
    border-radius: 10px;
    color: var(--ajd-ink);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 38px;
    min-width: 38px;
    padding: 8px 12px;
    text-decoration: none;
    transition: all 0.2s;
}

.ajd-page-link .page-numbers.current,
.ajd-page-link .page-numbers:hover {
    background: var(--ajd-blue);
    border-color: var(--ajd-blue);
    color: #0b0f19;
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
}

/* 详情页布局 (Detail Shell) */
.ajd-detail-shell {
    padding: 40px 20px 80px;
}

.ajd-detail-wrap {
    margin: 0 auto;
    max-width: 1180px;
}

.ajd-back-link {
    color: var(--ajd-blue);
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 20px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.ajd-back-link:hover {
    opacity: 0.8;
}

.ajd-detail-hero {
    align-items: center;
    background: var(--ajd-card);
    border: 1px solid var(--ajd-border);
    border-radius: 16px;
    box-shadow: var(--ajd-shadow);
    display: grid;
    gap: 24px;
    grid-template-columns: auto minmax(0, 1fr);
    padding: clamp(24px, 4vw, 40px);
}

.ajd-detail-copy h1 {
    color: var(--ajd-ink);
    font-size: clamp(30px, 4.5vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
}

.ajd-detail-copy > p {
    color: var(--ajd-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 12px 0 0;
    max-width: 820px;
}

.ajd-hero-chips {
    margin-top: 16px;
}

.ajd-detail-grid {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) 320px;
    margin-top: 24px;
}

.ajd-detail-main,
.ajd-detail-side {
    display: grid;
    gap: 20px;
}

.ajd-article,
.ajd-panel {
    background: var(--ajd-card);
    border: 1px solid var(--ajd-border);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
}

.ajd-article {
    color: var(--ajd-muted);
    font-size: 16px;
    line-height: 1.8;
    padding: clamp(24px, 4vw, 40px);
}

.ajd-article > *:first-child {
    margin-top: 0;
}

.ajd-article > *:last-child {
    margin-bottom: 0;
}

.ajd-article h2,
.ajd-article h3,
.ajd-panel h2 {
    color: var(--ajd-ink);
    font-weight: 800;
    line-height: 1.2;
}

.ajd-article h2 {
    font-size: 24px;
    margin: 32px 0 12px;
}

.ajd-article h3 {
    font-size: 19px;
    margin: 24px 0 8px;
}

.ajd-article ul,
.ajd-article ol {
    padding-left: 20px;
}

.ajd-panel {
    padding: 24px;
}

.ajd-panel h2 {
    font-size: 18px;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}

.ajd-facts {
    display: grid;
    gap: 12px;
    margin: 0;
}

.ajd-facts dt {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.05em;
    margin-top: 10px;
    text-transform: uppercase;
}

.ajd-facts dt:first-child {
    margin-top: 0;
}

.ajd-facts dd {
    color: var(--ajd-ink);
    font-size: 15px;
    font-weight: 700;
    margin: 0;
}

.ajd-note-list,
.ajd-step-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
}

.ajd-note-list {
    list-style: none;
}

.ajd-note-list li {
    color: var(--ajd-muted);
    font-size: 14px;
    line-height: 1.6;
    padding-left: 18px;
    position: relative;
}

.ajd-note-list li::before {
    background: var(--ajd-blue);
    border-radius: 999px;
    content: "";
    height: 6px;
    left: 0;
    position: absolute;
    top: 0.6em;
    width: 6px;
    box-shadow: 0 0 8px var(--ajd-blue);
}

.ajd-step-list {
    list-style: none;
}

.ajd-step-list li {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 10px;
    display: grid;
    gap: 12px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 12px;
}

.ajd-step-list span {
    align-items: center;
    background: var(--ajd-blue-soft);
    border: 1px solid rgba(56, 189, 248, 0.3);
    border-radius: 8px;
    color: var(--ajd-blue);
    display: inline-flex;
    font-size: 12px;
    font-weight: 800;
    height: 28px;
    justify-content: center;
    width: 28px;
}

.ajd-step-list p {
    color: var(--ajd-muted);
    font-size: 13.5px;
    line-height: 1.55;
    margin: 2px 0 0;
}

.ajd-official-links {
    display: grid;
    gap: 10px;
}

.ajd-official-links a {
    background: var(--ajd-soft-bg);
    border: 1px solid var(--ajd-border);
    border-radius: 10px;
    color: var(--ajd-blue);
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 14px;
    transition: all 0.2s;
    display: block;
    text-decoration: none!important;
}

.ajd-official-links a:hover {
    background: var(--ajd-blue-soft);
    border-color: rgba(56, 189, 248, 0.4);
}

@media (prefers-reduced-motion: reduce) {
    .ajd-card {
        transition: none;
    }
    .ajd-card:hover {
        transform: none;
    }
}

@media (max-width: 900px) {
    .ajd-directory-header,
    .ajd-detail-hero,
    .ajd-detail-grid {
        grid-template-columns: 1fr;
    }

    .ajd-count {
        justify-self: start;
    }

    .ajd-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ajd-detail-logo-wrap {
        order: -1;
    }
}

@media (max-width: 620px) {
    .ajd-directory {
        padding: 16px;
    }

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

    .ajd-card-top,
    .ajd-card-body {
        padding: 16px;
    }

    .ajd-detail-shell {
        padding: 20px 12px 60px;
    }
}