/* Advanced Gacha Engine · 三大卡機分頁 & 結果覆蓋層 */

.machine-pool-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0 0 12px;
    padding: 6px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(0, 255, 255, 0.2);
    box-shadow: inset 0 0 24px rgba(127, 0, 255, 0.15);
}

.machine-pool-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: linear-gradient(160deg, rgba(24, 12, 48, 0.9), rgba(8, 6, 20, 0.95));
    color: rgba(220, 210, 255, 0.85);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.25s, border-color 0.2s, background 0.2s;
    font-family: inherit;
    overflow: visible;
}

.machine-pool-tab:hover {
    transform: translateY(-2px);
    border-color: rgba(0, 255, 255, 0.45);
    box-shadow: 0 0 18px rgba(127, 0, 255, 0.4);
}

.machine-pool-tab.is-active {
    border-color: rgba(255, 215, 0, 0.75);
    background: linear-gradient(160deg, rgba(60, 20, 90, 0.95), rgba(20, 8, 40, 0.98));
    box-shadow:
        0 0 22px rgba(255, 0, 180, 0.35),
        0 0 32px rgba(127, 0, 255, 0.25),
        inset 0 0 16px rgba(255, 215, 0, 0.12);
    color: #fff;
    transform: translateY(-1px);
}

.machine-pool-tab__emoji {
    font-size: 22px;
    line-height: 1;
}

.machine-pool-tab__coin {
    display: block;
    margin: 0 auto 4px;
}

.machine-pool-tab__name {
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.machine-pool-tab__sub {
    font-size: 9px;
    opacity: 0.75;
    letter-spacing: 0.06em;
}

.gacha-machine-wrap.pool-limited .machine-pool-tab[data-pool-id="pool_limited"].is-active,
.machine-pool-tab[data-pool-id="pool_limited"].is-active {
    border-color: rgba(255, 0, 128, 0.7);
    box-shadow: 0 0 24px rgba(255, 0, 128, 0.4);
}

.machine-pool-tab[data-pool-id="pool_normal"].is-active {
    border-color: rgba(255, 215, 0, 0.65);
    box-shadow: 0 0 22px rgba(255, 200, 80, 0.4);
}

.machine-pool-tab[data-pool-id="pool_silver"].is-active {
    border-color: rgba(100, 180, 255, 0.7);
    box-shadow: 0 0 22px rgba(80, 160, 255, 0.45);
}

.gacha-view .machine-pity-strip .pity-chip.tier-mr {
    color: #ff9ed8;
    border: 1px solid rgba(255, 100, 180, 0.5);
    box-shadow: 0 0 12px rgba(255, 80, 160, 0.35);
}

.gacha-view .machine-pity-strip .pity-chip.tier-ssr {
    color: #ffb080;
    border: 1px solid rgba(255, 120, 40, 0.5);
}

.gacha-view .rate-bar-fill.tier-mr {
    background: linear-gradient(90deg, #ff3366, #ff99cc) !important;
    box-shadow: 0 0 10px rgba(255, 80, 140, 0.5);
}

.pool-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(127, 0, 255, 0.35);
}

.pool-switch-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(20, 10, 40, 0.9);
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.pool-switch-btn:hover {
    background: rgba(127, 0, 255, 0.45);
    box-shadow: 0 0 16px rgba(127, 0, 255, 0.4);
}

.pool-switch-center {
    flex: 1;
    min-width: 0;
    text-align: center;
}

.pool-switch-emoji {
    font-size: 28px;
    display: block;
    margin-bottom: 4px;
}

.pool-switch-name {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #fff;
}

.pool-switch-sub {
    margin: 2px 0 0;
    font-size: 11px;
    color: rgba(200, 180, 255, 0.8);
    letter-spacing: 0.08em;
}

.pool-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 8px;
}

.pool-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.pool-dot.active {
    background: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.7);
}

.gacha-cur.friendship {
    color: #ff9ed8;
    border-color: rgba(255, 120, 200, 0.45);
}

.btn-summon__bonus--ssr {
    font-size: 9px;
    color: #ffb080;
}

/* 貨幣不足 */
#gacha-insufficient-modal {
    position: fixed;
    inset: 0;
    z-index: 950;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 2, 12, 0.82);
    backdrop-filter: blur(6px);
}

#gacha-insufficient-modal.hidden {
    display: none;
}

.gacha-insufficient-inner {
    max-width: 360px;
    width: 100%;
    padding: 28px 24px;
    text-align: center;
    border-radius: 20px;
    border: 1px solid rgba(255, 80, 120, 0.5);
    background: linear-gradient(160deg, rgba(40, 8, 24, 0.98), rgba(12, 8, 32, 0.98));
    box-shadow: 0 0 48px rgba(255, 50, 100, 0.25);
}

.gacha-insufficient-inner h3 {
    margin: 0 0 10px;
    font-size: 20px;
    color: #ff88aa;
}

.gacha-insufficient-inner p {
    margin: 0 0 20px;
    font-size: 14px;
    color: rgba(255, 220, 240, 0.85);
    line-height: 1.5;
}

.gacha-insufficient-inner button {
    padding: 12px 28px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #ff3366, #7f00ff);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
}

/* 璀璨抽卡結果覆蓋層 */
#gacha-age-overlay {
    position: fixed;
    inset: 0;
    z-index: 920;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background:
        radial-gradient(ellipse at 50% 30%, rgba(127, 0, 255, 0.25), transparent 55%),
        rgba(2, 0, 10, 0.92);
    backdrop-filter: blur(8px);
    overflow-x: hidden;
    overflow-y: auto;
}

#gacha-age-overlay.hidden {
    display: none;
}

body.gacha-age-open {
    overflow: hidden;
}

.gacha-age-panel {
    width: min(1240px, 98vw);
    max-height: min(94vh, 900px);
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    border: 1px solid rgba(192, 132, 252, 0.45);
    background: linear-gradient(165deg, rgba(12, 6, 28, 0.98), rgba(6, 4, 14, 0.99));
    box-shadow: 0 0 80px rgba(127, 0, 255, 0.35), inset 0 0 40px rgba(255, 215, 0, 0.04);
    overflow: hidden;
}

.gacha-age-panel:has(.gacha-age-mount--eleven) {
    width: min(1320px, 98vw);
}

.gacha-age-head {
    padding: 20px 20px 12px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.gacha-age-head h2 {
    margin: 0;
    font-size: 22px;
    letter-spacing: 0.12em;
    background: linear-gradient(90deg, #fff, #ffd700, #c4a0ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gacha-age-subtitle {
    margin: 12px 0 0;
    text-align: center;
}

.gacha-age-subtitle[hidden] {
    display: none;
}

.gacha-age-pool-tag {
    display: inline-block;
    font-family: Orbitron, 'Noto Sans TC', sans-serif;
    font-size: clamp(14px, 2.2vw, 18px);
    font-weight: 900;
    letter-spacing: 0.28em;
    text-indent: 0.28em;
    line-height: 1.3;
    background: linear-gradient(
        105deg,
        #fff 0%,
        #ffd700 18%,
        #ff6ec7 38%,
        #00ffff 58%,
        #c4a0ff 78%,
        #ffd700 100%
    );
    background-size: 220% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    filter: drop-shadow(0 0 14px rgba(255, 215, 0, 0.45)) drop-shadow(0 0 22px rgba(168, 85, 247, 0.35));
    animation: gachaAgePoolShine 3.2s linear infinite;
}

@keyframes gachaAgePoolShine {
    to {
        background-position: 220% center;
    }
}

.gacha-age-mount {
    flex: 1;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 20px;
    scrollbar-gutter: stable;
}

.gacha-age-mount--single {
    display: flex;
    align-items: center;
    justify-content: center;
}

.gacha-age-mount--reveal {
    padding: 16px 20px 24px;
}

/* —— 單抽大卡展示 + 抽出特效 —— */
.gacha-age-reveal {
    position: relative;
    width: min(920px, 100%);
    animation: gachaAgeRevealIn 0.65s cubic-bezier(0.34, 1.35, 0.64, 1) backwards;
}

@keyframes gachaAgeRevealIn {
    from {
        opacity: 0;
        transform: scale(0.88) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.gacha-age-reveal__fx {
    position: absolute;
    inset: -12%;
    pointer-events: none;
    z-index: 0;
}

.gacha-age-reveal__burst {
    position: absolute;
    left: 28%;
    top: 20%;
    width: 44%;
    height: 50%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 200, 80, 0.55), transparent 68%);
    animation: gachaAgeBurst 1.2s ease-out infinite;
}

.gacha-age-reveal__ring {
    position: absolute;
    left: 22%;
    top: 12%;
    width: 56%;
    height: 62%;
    border: 2px solid rgba(255, 215, 0, 0.45);
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(255, 140, 0, 0.35);
    animation: gachaAgeRingSpin 4s linear infinite;
}

.gacha-age-reveal__sparks {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.9), transparent),
        radial-gradient(2px 2px at 70% 20%, rgba(255, 200, 0, 0.85), transparent),
        radial-gradient(2px 2px at 50% 70%, rgba(200, 100, 255, 0.8), transparent);
    animation: gachaAgeSpark 2.4s ease-in-out infinite;
}

@keyframes gachaAgeBurst {
    0%, 100% { opacity: 0.35; transform: scale(0.95); }
    50% { opacity: 0.85; transform: scale(1.08); }
}

@keyframes gachaAgeRingSpin {
    to { transform: rotate(360deg); }
}

@keyframes gachaAgeSpark {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}

.gacha-age-reveal__body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 20px 24px;
}

.gacha-age-reveal__card {
    flex: 0 1 auto;
    width: min(380px, 52vw);
    padding: 4px;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 0 36px rgba(255, 140, 0, 0.35);
}

.gacha-age-reveal[data-rarity='ssr'] .gacha-age-reveal__card,
.gacha-age-reveal[data-rarity='ur'] .gacha-age-reveal__card,
.gacha-age-reveal[data-rarity='lr'] .gacha-age-reveal__card,
.gacha-age-reveal[data-rarity='sec'] .gacha-age-reveal__card,
.gacha-age-reveal[data-rarity='mr'] .gacha-age-reveal__card {
    animation: ageNeonShift 2.5s linear infinite;
}

.gacha-age-card-slot {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: #06040c;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.gacha-age-card-slot .card-3d-wrap {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0 !important;
}

.gacha-age-card-slot .card-3d,
.gacha-age-card-slot .card-face {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.gacha-age-card-slot .card-art {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.gacha-age-card-slot .card-art-img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center top !important;
}

.gacha-age-meta {
    flex: 1 1 260px;
    min-width: min(320px, 100%);
    max-width: 420px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: left;
    animation: gachaAgeMetaIn 0.5s ease 0.2s backwards;
}

@keyframes gachaAgeMetaIn {
    from {
        opacity: 0;
        transform: translateX(16px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gacha-age-meta__rarity {
    display: inline-block;
    font-family: Orbitron, "Segoe UI", sans-serif;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.18em;
    padding: 0;
    margin-bottom: 10px;
    border: none;
    background: none;
    color: var(--age-rarity-color, #ffcc66);
    text-shadow: 0 0 12px color-mix(in srgb, var(--age-rarity-color, #fff) 60%, transparent);
}

.gacha-age-meta__name {
    margin: 0 0 6px;
    font-size: clamp(22px, 4vw, 28px);
    font-weight: 900;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.8);
}

.gacha-age-meta__no {
    margin: 0 0 12px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.65);
}

.gacha-age-meta__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin-bottom: 14px;
}

.gacha-age-meta__stat {
    font-size: 16px;
    font-weight: 700;
    color: #b8f0d0;
}

.gacha-age-meta__stat strong {
    font-size: 20px;
    color: #fff;
}

.gacha-age-meta__skill {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: rgba(230, 220, 255, 0.92);
    max-height: 8.5em;
    overflow-y: auto;
}

.gacha-age-meta__skill strong {
    color: #ffd700;
    font-size: 15px;
}

#gacha-age-overlay[data-reveal-tier='ssr'] .gacha-age-panel,
#gacha-age-overlay[data-reveal-tier='ur'] .gacha-age-panel,
#gacha-age-overlay[data-reveal-tier='mr'] .gacha-age-panel,
#gacha-age-overlay[data-reveal-tier='lr'] .gacha-age-panel,
#gacha-age-overlay[data-reveal-tier='sec'] .gacha-age-panel,
#gacha-age-overlay.gacha-age-overlay--rare-open .gacha-age-panel {
    animation: gachaPanelFlash 0.5s ease;
}

@keyframes gachaPanelFlash {
    0% { box-shadow: 0 0 0 rgba(255, 200, 0, 0); }
    40% { box-shadow: 0 0 100px rgba(255, 160, 0, 0.55); }
    100% { box-shadow: 0 0 80px rgba(127, 0, 255, 0.35); }
}

@media (max-width: 720px) {
    #gacha-age-overlay {
        padding: max(8px, env(safe-area-inset-top, 0px)) 8px max(8px, env(safe-area-inset-bottom, 0px));
        z-index: 980;
    }

    .gacha-age-panel {
        width: min(100%, 96vw);
        max-height: min(92dvh, calc(100dvh - var(--void-mobile-nav-h, 54px) - 16px));
    }

    .gacha-age-mount {
        padding: 12px 10px 16px;
    }

    .gacha-age-reveal__body {
        flex-direction: column;
        align-items: center;
    }

    .gacha-age-reveal__card {
        width: min(300px, 90vw);
    }

    .gacha-age-meta {
        max-width: 100%;
    }

    .gacha-age-mount--grid,
    .gacha-age-mount--grid.gacha-age-mount--eleven {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px 8px;
    }
}

.gacha-age-mount--grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px 12px;
    padding: 4px 0 8px;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    overflow-x: hidden;
}

.gacha-age-mount--grid.gacha-age-mount--eleven {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.gacha-age-reveal__label {
    position: relative;
    z-index: 6;
    margin: 0 0 10px;
    font-family: Orbitron, sans-serif;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.35em;
    color: rgba(0, 255, 255, 0.85);
    text-align: center;
}

.gacha-age-grid-card-slot {
    width: 100%;
    height: 100%;
    min-height: 100%;
}

.gacha-age-grid-card-slot .card-3d-wrap,
.gacha-age-grid-card-slot .void-card-tile {
    width: 100% !important;
    height: 100% !important;
    max-width: none;
}

@media (max-width: 900px) {
    .gacha-age-mount--grid,
    .gacha-age-mount--grid.gacha-age-mount--eleven {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .gacha-age-mount--grid,
    .gacha-age-mount--grid.gacha-age-mount--eleven {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 8px;
    }
}

@media (max-width: 400px) {
    .gacha-age-mount--grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.gacha-age-mount--grid > .age-result-tile {
    min-width: 0;
}

.age-result-tile {
    position: relative;
    border-radius: 14px;
    padding: 4px;
    overflow: hidden;
    min-width: 0;
    animation: ageTileIn 0.45s ease backwards;
}

.age-result-tile--zoom {
    cursor: zoom-in;
}

.age-result-tile--zoom:hover {
    z-index: 3;
}

.age-result-tile--zoom:hover .age-tile-inner {
    transform: scale(1.03);
}

.age-result-tile--zoom:focus-visible {
    outline: 2px solid rgba(255, 215, 0, 0.55);
    outline-offset: 2px;
}

.age-result-tile--hero {
    width: min(380px, 92vw);
    animation: ageHeroIn 0.6s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.age-result-tile--hero .age-tile-name {
    font-size: 16px;
}

.age-result-tile--hero .age-tile-stats {
    font-size: 13px;
}

@keyframes ageTileIn {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes ageHeroIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.age-result-tile:nth-child(1) { animation-delay: 0.02s; }
.age-result-tile:nth-child(2) { animation-delay: 0.05s; }
.age-result-tile:nth-child(3) { animation-delay: 0.08s; }
.age-result-tile:nth-child(4) { animation-delay: 0.11s; }
.age-result-tile:nth-child(5) { animation-delay: 0.14s; }
.age-result-tile:nth-child(6) { animation-delay: 0.17s; }
.age-result-tile:nth-child(7) { animation-delay: 0.2s; }
.age-result-tile:nth-child(8) { animation-delay: 0.23s; }
.age-result-tile:nth-child(9) { animation-delay: 0.26s; }
.age-result-tile:nth-child(10) { animation-delay: 0.29s; }
.age-result-tile:nth-child(11) { animation-delay: 0.32s; }

.age-tile-glow {
    position: absolute;
    inset: -20%;
    opacity: 0.5;
    pointer-events: none;
    animation: ageGlowPulse 2s ease-in-out infinite;
}

@keyframes ageGlowPulse {
    0%, 100% { opacity: 0.35; }
    50% { opacity: 0.7; }
}

.age-tile-inner {
    position: relative;
    z-index: 1;
    border-radius: 11px;
    padding: 8px 8px 8px;
    background: rgba(8, 6, 18, 0.92);
    text-align: center;
    transition: transform 0.2s ease;
}

.age-tile-artwrap {
    width: 100%;
    aspect-ratio: 2 / 3;
    min-height: clamp(150px, 11vw, 260px);
    max-height: none;
    display: flex;
    align-items: stretch;
    justify-content: center;
    margin-bottom: 6px;
    border-radius: 8px;
    overflow: hidden;
    background: var(--void-card-bg, #06040c);
}

.age-result-tile--top .age-tile-artwrap {
    box-shadow: 0 0 18px rgba(255, 215, 0, 0.35);
}

.age-frame-mr .age-tile-artwrap,
.age-frame-sec .age-tile-artwrap {
    animation: ageTileArtPulse 2s ease-in-out infinite;
}

@keyframes ageTileArtPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.12) saturate(1.1); }
}

.age-result-tile--hero .age-tile-artwrap {
    max-height: min(58vh, 520px);
    aspect-ratio: 2 / 3;
}

.age-tile-art {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.age-tile-emoji {
    font-size: 36px;
}

.age-tile-rarity {
    display: block;
    margin-bottom: 6px;
    padding: 0;
    border: none;
    background: none;
    font-family: Orbitron, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: 0.18em;
    line-height: 1;
    color: var(--age-rarity-color, #e8ecff);
    text-shadow:
        0 0 12px color-mix(in srgb, var(--age-rarity-color, #fff) 65%, transparent),
        0 1px 2px rgba(0, 0, 0, 0.9);
}

.age-tile-rarity.rarity-N { --age-rarity-color: #8b93a8; }
.age-tile-rarity.rarity-R { --age-rarity-color: #4da3ff; }
.age-tile-rarity.rarity-SR { --age-rarity-color: #7eb8ff; }
.age-tile-rarity.rarity-SSR { --age-rarity-color: #ff9a3c; }
.age-tile-rarity.rarity-UR { --age-rarity-color: #ffd700; }
.age-tile-rarity.rarity-LR { --age-rarity-color: #ffb347; }
.age-tile-rarity.rarity-MR { --age-rarity-color: #ff4d8d; }
.age-tile-rarity.rarity-SEC { --age-rarity-color: #e879f9; }

/* 結果格內嵌卡面：隱藏卡內中文稀有度，僅保留上方英文標籤 */
#gacha-age-overlay .card-unified-rarity,
#gacha-age-overlay .card-unified-rarity__sub,
#gacha-age-overlay .prem-legend-badge,
#gacha-age-overlay .rarity-pill,
#gacha-age-overlay .rarity-emblem {
    display: none !important;
}

.age-tile-no {
    font-size: 9px;
    color: rgba(255, 255, 255, 0.55);
}

.age-tile-name {
    margin: 4px 0 2px;
    font-size: 11px;
    line-height: 1.25;
    color: #fff;
}

.age-result-tile--hero .age-tile-name {
    font-size: 15px;
}

.age-tile-stats {
    margin: 0;
    font-size: 10px;
    color: #7dffb8;
}

.age-pity-tag {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 2;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    background: #ff3366;
    color: #fff;
}

/* 稀有度邊框 */
.age-frame-n {
    background: linear-gradient(135deg, #888, #ccc);
}
.age-frame-r {
    background: linear-gradient(135deg, #2060c0, #60a0ff);
    box-shadow: 0 0 12px rgba(80, 140, 255, 0.4);
}
.age-frame-sr {
    background: linear-gradient(135deg, #6020a0, #c080ff);
    box-shadow: 0 0 14px rgba(160, 80, 255, 0.45);
}
.age-frame-ssr {
    background: linear-gradient(135deg, #c05000, #ffaa44);
    box-shadow: 0 0 18px rgba(255, 140, 40, 0.55);
}
.age-frame-ur {
    background: linear-gradient(135deg, #ffd700, #ff00aa, #7f00ff);
    box-shadow: 0 0 22px rgba(255, 215, 0, 0.6);
    animation: ageNeonShift 2.5s linear infinite;
}
.age-frame-sec {
    background: linear-gradient(135deg, #a855f7, #ffd700, #00ffff, #ff0055);
    background-size: 300% 300%;
    box-shadow: 0 0 24px rgba(168, 85, 247, 0.7);
    animation: ageNeonShift 1.8s linear infinite;
}

.age-frame-ur .age-tile-glow,
.age-frame-sec .age-tile-glow {
    background: radial-gradient(circle, rgba(255, 215, 0, 0.35), transparent 70%);
}

@keyframes ageNeonShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gacha-age-foot {
    padding: 16px 20px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
}

.gacha-age-hint {
    margin: 0 0 10px;
    font-family: Orbitron, 'Noto Sans TC', sans-serif;
    font-size: 11px;
    letter-spacing: 0.1em;
    color: rgba(0, 255, 255, 0.55);
}

.gacha-age-hint.hidden {
    display: none;
}

.btn-gacha-age-confirm {
    min-width: 220px;
    padding: 14px 32px;
    border: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: 0.2em;
    color: #0a0614;
    background: linear-gradient(135deg, #ffd700, #ff88cc, #a855f7);
    cursor: pointer;
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.45);
    transition: transform 0.15s;
}

.btn-gacha-age-confirm:hover {
    transform: scale(1.04);
}

.pool-mythic .machine-summon-badge { color: #ffd700; }
.pool-rare .machine-summon-badge { color: #c4a0ff; }
.pool-silver .machine-summon-badge { color: #a8d4ff; }
.pool-friendship .machine-summon-badge { color: #ff9ed8; }
