/* ========== 3D圆柱切换系统 ========== */
:root {
    --cyan: #00f0ff;
    --purple: #9d4edd;
    --pink: #ff006e;
    --gold: #ffd60a;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: 'Noto Sans SC', sans-serif;
    background: #000;
    color: #fff;
}

/* ========== 背景层 ========== */
.particles-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse, #0a0025 0%, #000 100%);
    z-index: 0;
}

.dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bg-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(5px) brightness(0.35);
    transform: scale(1.1);
}

.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center,
            rgba(0, 0, 0, 0.6) 0%,
            rgba(0, 0, 0, 0.85) 60%,
            rgba(0, 0, 0, 0.95) 100%);
}

/* ========== 主容器 ========== */
.app-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* ========== Logo ========== */
.header-bar {
    text-align: center;
    margin-bottom: 0.5rem;
}

.brand-logo {
    height: 45px;
    filter: drop-shadow(0 0 20px var(--cyan)) brightness(1.1);
    animation: logoGlow 2s ease-in-out infinite;
}

@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 20px var(--cyan)) brightness(1.1);
    }

    50% {
        filter: drop-shadow(0 0 30px var(--cyan)) brightness(1.2);
    }
}

/* ========== 兑换统计横幅 ========== */
.stats-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    margin-bottom: 0.75rem;
}

.stat-item {
    text-align: center;
}

.stat-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 0.15rem;
}

.stat-value {
    font-size: 1.25rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--gold));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: statGlow 2s ease-in-out infinite;
}

@keyframes statGlow {

    0%,
    100% {
        filter: brightness(1);
    }

    50% {
        filter: brightness(1.3);
    }
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(0, 240, 255, 0.3);
}

/* ========== 3D展示区 ========== */
.carousel-3d-zone {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.zone-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.title-icon {
    font-size: 1.25rem;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.15);
    }
}

.zone-title h2 {
    font-size: 1rem;
    color: var(--cyan);
    text-shadow: 0 0 10px var(--cyan);
}

.count-display {
    background: rgba(255, 214, 10, 0.15);
    border: 2px solid var(--gold);
    padding: 0.15rem 0.6rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--gold);
    box-shadow: 0 0 15px rgba(255, 214, 10, 0.4);
}

/* ========== 3D舞台 ========== */
.stage-wrapper {
    flex: 1;
    position: relative;
    perspective: 1400px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
}

.stage-3d {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========== 3D卡片 - 自适应 ========== */
.card-3d {
    position: absolute;
    left: 50%;
    top: 50%;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid rgba(0, 240, 255, 0.35);
    border-radius: 16px;
    overflow: hidden;
    backface-visibility: visible;
    transition: all 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 人物卡片 - 高瘦 */
.card-3d.type-character {
    width: 180px;
    height: 320px;
    margin-left: -90px;
    margin-top: -160px;
}

/* 载具卡片 - 宽扁 */
.card-3d.type-vehicle {
    width: 240px;
    height: 180px;
    margin-left: -120px;
    margin-top: -90px;
}

/* 枪械卡片 - 中等 */
.card-3d.type-weapon {
    width: 240px;
    height: 200px;
    margin-left: -120px;
    margin-top: -100px;
}

.card-3d.active {
    border-color: var(--cyan);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.9),
        0 20px 60px rgba(0, 0, 0, 0.9);
    z-index: 100;
}

.card-inner {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.75), rgba(10, 0, 30, 0.9));
}

.card-image {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.card-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 15px rgba(0, 240, 255, 0.5));
    transition: all 0.3s;
}

.card-3d.active .card-image img {
    filter: drop-shadow(0 0 25px rgba(0, 240, 255, 0.8)) drop-shadow(0 8px 20px rgba(0, 0, 0, 0.8));
    transform: scale(1.05);
}

/* ========== 旋转控制 ========== */
.rotation-controls {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-top: 0.75rem;
}

.rotate-btn {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
    transition: all 0.3s;
}

.rotate-btn:active {
    transform: scale(0.9);
    box-shadow: 0 0 30px rgba(0, 240, 255, 0.8);
}

/* ========== 成功兑换滚动 ========== */
.success-ticker {
    background: rgba(0, 240, 255, 0.05);
    border: 1px solid rgba(0, 240, 255, 0.25);
    border-radius: 10px;
    padding: 0.4rem 0.6rem;
    margin-top: 0.75rem;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.ticker-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold);
    white-space: nowrap;
    flex-shrink: 0;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 18px;
}

.ticker-scroll {
    display: flex;
    gap: 2rem;
    animation: tickerScroll 30s linear infinite;
    white-space: nowrap;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.8);
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.ticker-user {
    color: var(--cyan);
    font-weight: 600;
}

.ticker-skin {
    color: var(--gold);
}

/* ========== 分类选项卡 ========== */
.category-tabs {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tab-item {
    flex: 1;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid rgba(0, 240, 255, 0.25);
    border-radius: 12px;
    padding: 0.5rem 0.3rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-item.active {
    background: rgba(0, 240, 255, 0.15);
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.5);
}

.tab-icon {
    font-size: 1.5rem;
    margin-bottom: 0.15rem;
}

.tab-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--cyan);
    margin-bottom: 0.15rem;
}

.tab-count {
    font-size: 0.65rem;
    color: var(--gold);
    font-weight: 600;
}

/* ========== CDK兑换 ========== */
.redeem-section {
    margin-top: 0.75rem;
}

.redeem-box {
    display: flex;
    gap: 0.5rem;
    background: rgba(0, 240, 255, 0.05);
    border: 2px solid rgba(0, 240, 255, 0.3);
    border-radius: 12px;
    padding: 0.5rem;
}

.cdk-input {
    flex: 1;
    padding: 0.7rem;
    font-size: 0.85rem;
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 8px;
    color: #fff;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-transform: uppercase;
}

.cdk-input:focus {
    outline: none;
    border-color: var(--cyan);
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.5);
}

.cdk-input::placeholder {
    color: rgba(255, 255, 255, 0.3);
    font-family: 'Noto Sans SC', sans-serif;
    text-transform: none;
}

.redeem-button {
    padding: 0.7rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    box-shadow: 0 0 15px rgba(0, 240, 255, 0.5);
    transition: all 0.3s;
    white-space: nowrap;
}

.redeem-button:active {
    transform: scale(0.95);
}

/* ========== 弹窗 ========== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}

.modal-container {
    position: relative;
    max-width: 90%;
    width: 350px;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(10, 0, 30, 0.98));
    border: 2px solid var(--cyan);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.7);
    animation: modalShow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes modalShow {
    from {
        opacity: 0;
        transform: scale(0.85) translateY(30px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-icon {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.modal-title {
    font-size: 1.6rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.modal-text {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.modal-time {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 1rem;
}

.modal-desc {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.modal-confirm {
    width: 100%;
    padding: 0.95rem;
    font-size: 1.05rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    border: none;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.modal-confirm:active {
    transform: scale(0.95);
}