/* ═══════════════════════════════════════════════════════
   新卡列表 — 模态框样式
   ═══════════════════════════════════════════════════════ */

/* ── 触发按钮 ──────────────────────────────────────────── */
.new-cards-trigger {
    position: absolute;
    top: 24px;
    right: 24px;
    background: var(--dark-gray, #1a1a1a);
    color: var(--light-gold, #F0E68C);
    border: 2px solid var(--red, #D81E44);
    border-radius: 14px;
    padding: 10px 20px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}
.new-cards-trigger:hover {
    border-color: var(--gold, #D4AF37);
    box-shadow: 0 0 14px rgba(212, 175, 55, 0.4);
    transform: translateY(-1px);
}

/* ── 遮罩层 ────────────────────────────────────────────── */
.new-cards-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: overlayFadeIn 0.25s ease;
}
@keyframes overlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── 模态框本体 ────────────────────────────────────────── */
.new-cards-modal {
    width: 92vw;
    max-width: 1400px;
    height: 90vh;
    background: #121212;
    border: 2px solid var(--red, #D81E44);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── 顶部栏 ────────────────────────────────────────────── */
.new-cards-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(216, 30, 68, 0.3);
    flex-shrink: 0;
}
.new-cards-topbar-left {
    display: flex;
    align-items: center;
    gap: 14px;
}
.new-cards-date-dropdown {
    position: relative;
    user-select: none;
}
.new-cards-date-trigger {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #222;
    color: var(--light-gold, #F0E68C);
    border: 1px solid var(--red, #D81E44);
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 14px;
    cursor: pointer;
    min-width: 130px;
    transition: border-color 0.2s;
}
.new-cards-date-trigger:hover {
    border-color: var(--gold, #D4AF37);
}
.new-cards-date-arrow {
    font-size: 10px;
    transition: transform 0.25s ease;
    margin-left: auto;
}
.new-cards-date-dropdown.open .new-cards-date-arrow {
    transform: rotate(180deg);
}

.new-cards-date-panel {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    min-width: 130px;
    background: #1a1a1a;
    border: 1px solid var(--red, #D81E44);
    border-radius: 8px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    z-index: 10;
}
.new-cards-date-option {
    padding: 9px 16px;
    font-size: 14px;
    color: #ccc;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.new-cards-date-option:hover {
    background: #2a2a2a;
    color: var(--light-gold, #F0E68C);
}
.new-cards-date-option.active {
    background: var(--red, #D81E44);
    color: #fff;
    font-weight: bold;
}

.new-cards-card-count {
    color: #999;
    font-size: 13px;
    margin-left: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* ── 关闭按钮 ──────────────────────────────────────────── */
.new-cards-close {
    width: 38px;
    height: 38px;
    background: none;
    border: 1px solid var(--red, #D81E44);
    border-radius: 50%;
    color: var(--light-gold, #F0E68C);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.new-cards-close:hover {
    background: var(--red, #D81E44);
    color: #fff;
}

/* ── 卡片网格（可滚动区域） ────────────────────────────── */
.new-cards-grid {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px 30px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
    align-content: start;
}

/* 复用卡池列表的卡片样式 */
.new-cards-grid .card-item {
    display: flex;
    background: #1a1a1a;
    border: 2px solid var(--red, #D81E44);
    border-radius: 18px;
    padding: 20px;
    gap: 20px;
    align-items: flex-start;
    transition: all 0.3s ease;
}
.new-cards-grid .card-item:hover {
    transform: translateY(-5px);
    border-color: var(--light-gold, #F0E68C);
}
.new-cards-grid .card-image {
    width: 200px;
    height: 290px;
    object-fit: cover;
    border-radius: 10px;
    background: #222;
    flex-shrink: 0;
}
.new-cards-grid .card-name {
    font-size: clamp(18px, 3vw, 20px);
    font-weight: bold;
    color: var(--light-gold, #F0E68C);
    text-shadow: 0 0 8px var(--gold, #D4AF37);
}
.new-cards-grid .card-id {
    font-size: 14px;
    color: #999;
}
.new-cards-grid .card-desc {
    font-size: 14px;
    color: #ccc;
    line-height: 1.6;
}
.new-cards-grid .card-author {
    text-align: center;
    margin-top: 8px;
    font-size: 14px;
    color: var(--light-gold, #F0E68C);
    font-weight: bold;
}
.new-cards-grid .card-info > div {
    margin: 3px 0;
    color: #bbb;
    font-size: 14px;
}
.new-cards-grid .card-info > div:first-child {
    margin-top: 0;
}

.new-cards-grid .empty-tip {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    font-size: 18px;
    color: #888;
}

/* ── 滚动条 ────────────────────────────────────────────── */
.new-cards-grid::-webkit-scrollbar {
    width: 6px;
}
.new-cards-grid::-webkit-scrollbar-track {
    background: transparent;
}
.new-cards-grid::-webkit-scrollbar-thumb {
    background: var(--red, #D81E44);
    border-radius: 3px;
}
.new-cards-grid {
    scrollbar-width: thin;
    scrollbar-color: var(--red, #D81E44) transparent;
}

/* ── 响应式 ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .new-cards-trigger {
        top: 20px;
        right: 76px;
        padding: 8px 12px;
        font-size: 12px;
        position: fixed;
        z-index: 998;
        border-radius: 12px;
    }
    .new-cards-modal {
        width: 96vw;
        height: 92vh;
        border-radius: 14px;
    }
    .new-cards-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    .new-cards-topbar {
        flex-wrap: wrap;
        gap: 10px;
        padding: 12px 16px;
    }
    .new-cards-topbar-left {
        flex-wrap: wrap;
    }

    /* 卡片网格 */
    .new-cards-grid {
        grid-template-columns: 1fr;
        padding: 10px 12px;
        gap: 8px;
    }

    /* 卡片横排：左图右文 */
    .new-cards-grid .card-item {
        flex-direction: row;
        align-items: flex-start;
        text-align: left;
        padding: 8px;
        gap: 8px;
        border-radius: 8px;
        border-width: 1px;
        transition: none;
    }
    .new-cards-grid .card-item:hover {
        transform: none;
    }

    /* 缩略图 */
    .new-cards-grid .card-image {
        width: 72px;
        height: 104px;
        border-radius: 6px;
        flex-shrink: 0;
    }

    /* 紧凑字体 */
    .new-cards-grid .card-name {
        font-size: 12px;
        text-shadow: none;
    }
    .new-cards-grid .card-id {
        font-size: 10px;
    }
    .new-cards-grid .card-desc {
        font-size: 11px;
        line-height: 1.35;
    }
    .new-cards-grid .card-author {
        font-size: 10px;
        margin-top: 2px;
        text-align: left;
    }
    .new-cards-grid .card-info > div {
        font-size: 11px;
        line-height: 1.3;
        margin: 1px 0;
    }
}

/* ── 新版卡图标记 ────────────────────────────────────────── */
.new-cards-grid .card-image-inner {
    position: relative;
    line-height: 0;
}
.new-cards-grid .new-card-badge {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    z-index: 2;
}
/* 灵摆卡图 artwork 偏上，logo 同步上移 */
.new-cards-grid .new-card-badge.pendulum-badge {
    top: -8%;
}
