* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    min-height: 100vh;
    color: #e0e0e0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.header {
    text-align: center;
    padding: 30px 0;
    background: rgba(255,255,255,0.05);
    border-radius: 16px;
    margin-bottom: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

.header h1 {
    font-size: 2rem;
    color: #ffd700;
    text-shadow: 0 0 20px rgba(255,215,0,0.3);
    margin-bottom: 10px;
}

.header p {
    color: #a0a0a0;
    font-size: 1rem;
}

.promo-banner {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.bottom-promo {
    margin-top: 30px;
    margin-bottom: 0;
}

.promo-item {
    flex: 1;
    min-width: 200px;
    background: rgba(255,255,255,0.08);
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    transition: transform 0.3s;
    border: 1px solid rgba(255,255,255,0.1);
}

.promo-item:hover {
    transform: translateY(-2px);
}

.promo-item img {
    width: 100%;
    height: 80px;
    object-fit: cover;
}

.promo-text {
    padding: 20px;
    text-align: center;
    color: #ffd700;
    font-weight: bold;
}

/* 推广轮播 */
.promo-carousel {
    position: relative;
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
}

.promo-carousel.bottom-promo {
    margin-top: 30px;
    margin-bottom: 0;
}

.promo-carousel-track {
    position: relative;
    width: 100%;
    height: 80px;
    overflow: hidden;
}

.promo-carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: transform 0.5s ease, opacity 0.5s ease;
    text-decoration: none;
    display: block;
}

.promo-carousel-item.active {
    opacity: 1;
    transform: translateX(0);
}

.promo-carousel-item.prev {
    transform: translateX(-100%);
}

.promo-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

@media (max-width: 768px) {
    .promo-carousel-track {
        height: 60px;
    }
}

@media (max-width: 480px) {
    .promo-carousel-track {
        height: 50px;
    }
}

.promo-carousel-item .promo-text {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(255,255,255,0.08);
}

.promo-carousel-dots {
    position: absolute;
    right: 10px;
    bottom: 8px;
    display: flex;
    gap: 6px;
    z-index: 10;
}

.promo-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s;
}

.promo-dot.active {
    background: #ffd700;
    width: 18px;
    border-radius: 3px;
}

.promo-dot:hover {
    background: #ccc;
}

.wuxue-selector {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
}

.selector-label {
    display: block;
    color: #ffd700;
    font-size: 1.1rem;
    margin-bottom: 15px;
    font-weight: bold;
}

.selector-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

.selector-faction-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.15);
}

.selector-wuxue-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: rgba(0,0,0,0.3);
    border: 2px solid rgba(255,255,255,0.15);
}

.custom-select-wrapper {
    flex: 1;
    max-width: 400px;
    position: relative;
}

.custom-select {
    position: relative;
    text-align: left;
}

.select-trigger {
    background: rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    padding: 14px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.select-trigger:hover {
    border-color: #ffd700;
}

.select-trigger.active {
    border-color: #ffd700;
    border-radius: 12px 12px 0 0;
}

.select-trigger .placeholder {
    color: #a0a0a0;
    font-size: 1.5rem;
    font-weight: bold;
    flex: 1;
    text-align: center;
}

.select-trigger .selected-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.select-trigger .selected-content img {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.select-trigger .selected-content span {
    color: #fff;
    font-size: 1rem;
    font-weight: bold;
}

.select-trigger::after {
    content: '▼';
    color: #a0a0a0;
    font-size: 0.8rem;
    transition: transform 0.3s;
    position: absolute;
    right: 20px;
}

.select-trigger.active::after {
    transform: rotate(180deg);
}

.select-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1a3e;
    border: 1px solid rgba(255,255,255,0.2);
    border-top: none;
    border-radius: 0 0 12px 12px;
    max-height: 320px;
    overflow-y: auto;
    z-index: 100;
    display: none;
}

.select-options.open {
    display: block;
}

.option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.option:last-child {
    border-bottom: none;
}

.option:hover {
    background: rgba(255,215,0,0.1);
}

.option .wuxue-name {
    color: #e0e0e0;
    font-size: 0.95rem;
    text-align: center;
}

.calculator-section {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.calculator-section h2 {
    color: #ffd700;
    margin-bottom: 20px;
    text-align: center;
}

.selected-info {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    justify-content: center;
}

.selected-info strong {
    color: #ffd700;
    font-size: 1.1rem;
}

.selected-info span {
    color: #a0a0a0;
    font-size: 0.9rem;
}

.selected-info.no-selection {
    background: rgba(255,255,255,0.05);
    border: 1px dashed rgba(255,255,255,0.15);
}

.selected-info.no-selection span {
    color: #888;
}

.calc-form {
    display: flex;
    gap: 20px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.9rem;
    color: #a0a0a0;
    text-align: center;
}

.form-group select {
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    background: rgba(0,0,0,0.3);
    color: #fff;
    font-size: 1rem;
    min-width: 120px;
    cursor: pointer;
    text-align: center;
    text-align-last: center;
}

.form-group select:focus {
    outline: none;
    border-color: #ffd700;
}

.calc-btn {
    padding: 12px 40px;
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.calc-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.3);
}

.result-section {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-section h3 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    font-weight: normal;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.result-item {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.result-item img {
    width: 48px;
    height: 48px;
    border-radius: 10px;
}

.result-icon {
    font-size: 2rem;
}

.result-label {
    font-size: 0.85rem;
    color: #a0a0a0;
}

.result-value {
    font-size: 1.5rem;
    color: #ffd700;
    font-weight: bold;
}

.package-section {
    margin-top: 30px;
}

.package-section h3 {
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
    font-weight: normal;
}

.package-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.package-card {
    background: rgba(0,0,0,0.2);
    border-radius: 16px;
    padding: 25px;
    border: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
}

.package-card .package-info-spacer {
    flex: 1;
}

.package-card .package-header {
    display: flex;
    justify-content: center;
    margin-bottom: 15px;
}

.package-card .mat-list {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.package-card .mat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.package-card .mat-list img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

.package-card .package-name {
    text-align: center;
    color: #ffd700;
    font-size: 1.1rem;
    padding: 15px 0;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 15px;
}

.package-card .package-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.package-card .info-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
    flex-wrap: nowrap;
}

.package-card .info-label {
    color: #a0a0a0;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.package-card .info-value {
    color: #ffd700;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.package-card .price-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.package-card .package-select {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    padding: 6px 12px;
    cursor: pointer;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.15), rgba(255, 215, 0, 0.05));
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 20px;
    transition: all 0.3s ease;
}

.package-card .package-select:hover {
    background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
    border-color: rgba(255, 215, 0, 0.5);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.2);
}

.package-card .package-select input[type="radio"] {
    display: none;
}

.package-card .package-select .custom-radio {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 215, 0, 0.6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.package-card .package-select .custom-radio::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #ffd700;
    border-radius: 50%;
    transform: scale(0);
    transition: transform 0.2s ease;
}

.package-card .package-select input[type="radio"]:checked + .custom-radio {
    border-color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.package-card .package-select input[type="radio"]:checked + .custom-radio::after {
    transform: scale(1);
}

.package-card .package-select .select-text {
    color: #ffd700;
    font-size: 0.9rem;
    font-weight: 500;
}

/* 套餐详情样式 */
.package-card .package-details {
    margin: 15px 0;
    padding: 15px;
    background: rgba(0,0,0,0.2);
    border-radius: 8px;
}

.package-card .package-detail {
    color: #a0a0a0;
    font-size: 0.95rem;
    padding: 8px 0;
    text-align: center;
    border-bottom: none;
}

.package-card .package-plus {
    color: #ffd700;
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 5px 0;
    line-height: 1;
}

.package-card .package-number {
    color: #ffd700;
    font-weight: bold;
    margin-right: 8px;
}

.package-card .package-scheme-title {
    color: #ffd700;
    font-size: 1.1rem;
    text-align: center;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 10px;
}

.package-card .highlight {
    color: #ffd700;
    font-weight: bold;
}

.package-card .package-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.package-card .package-item {
    background: rgba(0,0,0,0.3);
    border-radius: 8px;
    padding: 12px 15px;
    text-align: center;
    color: #a0a0a0;
}

.package-card .package-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    margin-top: 20px;
}

.footer {
    text-align: center;
    padding: 20px;
}

.admin-link {
    color: #666;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s;
}

.admin-link:hover {
    color: #ffd700;
}

.monster-section {
    margin-top: 30px;
}

.monster-section h3 {
    color: #ffd700;
    margin-bottom: 20px;
    text-align: center;
}

.monster-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.monster-card {
    background: rgba(0,0,0,0.2);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(255,255,255,0.1);
}

.monster-card h4 {
    color: #ffd700;
    margin-bottom: 10px;
    font-size: 1rem;
}

.monster-card .monster-desc {
    color: #a0a0a0;
    font-size: 0.85rem;
    margin-bottom: 10px;
}

.monster-card .drop-list {
    margin-top: 10px;
}

.monster-card .drop-item {
    color: #e0e0e0;
    font-size: 0.9rem;
    margin-bottom: 5px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.monster-card .drop-item:last-child {
    border-bottom: none;
}

/* 清单操作按钮 */
.cart-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
    justify-content: center;
}

.btn-add-cart {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 10px;
    color: #1a1a2e;
    padding: 12px 24px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: bold;
}

.btn-add-cart:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(255,215,0,0.3);
}

.btn-view-cart {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    color: #ffd700;
    padding: 12px 24px;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
}

.btn-view-cart:hover {
    background: rgba(255,255,255,0.15);
    transform: translateY(-2px);
}

.add-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 16px;
    padding: 30px;
    max-width: 320px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.add-toast.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.toast-title {
    color: #ffd700;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.toast-message {
    color: #a0a0a0;
    font-size: 1rem;
    margin-bottom: 25px;
    line-height: 1.5;
}

.toast-close {
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    border: none;
    border-radius: 8px;
    color: #1a1a2e;
    padding: 10px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.toast-close:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 215, 0, 0.4);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header h1 {
        font-size: 1.5rem;
    }
    
    .wuxue-selector {
        padding: 20px;
    }
    
    .calculator-section {
        padding: 10px;
    }
    
    .selector-row {
        gap: 10px;
    }
    
    .selector-faction-icon {
        width: 50px;
        height: 50px;
    }
    
    .selector-wuxue-icon {
        width: 50px;
        height: 50px;
    }
    
    .custom-select-wrapper {
        max-width: 100%;
    }
    
    .calc-form {
        flex-direction: row;
        align-items: flex-end;
        justify-content: center;
    }
    
    .form-group select {
        width: 100%;
    }
    
    .calc-btn {
        width: 100%;
    }
    
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .selected-info {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .result-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .promo-banner {
        flex-direction: column;
    }
    
    .promo-item {
        min-width: 100%;
    }
    
    .package-list {
        grid-template-columns: 1fr;
    }
    
    .package-list .package-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .selector-faction-icon {
        width: 40px;
        height: 40px;
    }
    
    .selector-wuxue-icon {
        width: 40px;
        height: 40px;
    }
    
    .select-trigger .selected-content img {
        width: 28px;
        height: 28px;
    }
}

/* 侧边悬浮说明按钮 */
.instruction-float {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #ffd700, #ff8c00);
    color: #1a1a2e;
    padding: 12px 8px;
    border-radius: 8px 0 0 8px;
    cursor: pointer;
    z-index: 1000;
    box-shadow: -2px 0 10px rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
    writing-mode: vertical-rl;
    text-orientation: upright;
    font-weight: bold;
    font-size: 0.9rem;
}

.instruction-float:hover {
    padding-right: 12px;
    box-shadow: -4px 0 15px rgba(255, 215, 0, 0.5);
}

.instruction-float span {
    letter-spacing: 2px;
}

/* 说明弹窗 */
.instruction-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.instruction-modal.show {
    display: flex;
}

.instruction-content {
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border-radius: 16px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.instruction-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 215, 0, 0.2);
    background: rgba(255, 215, 0, 0.05);
}

.instruction-header h3 {
    color: #ffd700;
    font-size: 1.2rem;
    margin: 0;
}

.instruction-close {
    background: none;
    border: none;
    color: #a0a0a0;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.instruction-close:hover {
    color: #ffd700;
    background: rgba(255, 215, 0, 0.1);
}

.instruction-body {
    padding: 24px;
    color: #e0e0e0;
    line-height: 1.8;
    font-size: 0.95rem;
    overflow-y: auto;
    max-height: calc(80vh - 80px);
}

.instruction-body::-webkit-scrollbar {
    width: 6px;
}

.instruction-body::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.instruction-body::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 3px;
}

.instruction-body::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}
