/* 购买弹窗 - 原生简洁风格 */
.mini-checkout-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
    animation: fadeIn 0.2s;
}

.mini-checkout-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.mini-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.mini-modal-box {
    position: relative;
    width: 400px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    animation: slideUp 0.3s;
}

[data-theme="dark"] .mini-modal-box {
    background: #1a1a1a;
}

.mini-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    color: #999;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.mini-modal-close:hover {
    color: #333;
}

[data-theme="dark"] .mini-modal-close {
    color: #999;
}

[data-theme="dark"] .mini-modal-close:hover {
    color: #fff;
}

.mini-modal-content {
    padding: 20px;
}

.mini-modal-title {
    font-size: 16px;
    font-weight: 500;
    margin: 0 0 20px 0;
    color: #333;
    text-align: left;
}

[data-theme="dark"] .mini-modal-title {
    color: #fff;
}

.mini-product-info {
    display: flex;
    gap: 12px;
    padding: 0;
    background: transparent;
    border: none;
    margin-bottom: 20px;
}

.mini-product-thumb {
    width: 60px;
    height: 60px;
    border-radius: 2px;
    object-fit: cover;
}

.mini-product-detail {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mini-product-name {
    font-size: 14px;
    font-weight: 400;
    margin-bottom: 6px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

[data-theme="dark"] .mini-product-name {
    color: #fff;
}

.mini-product-price {
    font-size: 20px;
    font-weight: 500;
    color: #f56c6c;
}

[data-theme="dark"] .mini-product-price {
    color: #ff7875;
}

.mini-form-group {
    margin-bottom: 16px;
}

.mini-input {
    width: 100%;
    height: 32px;
    padding: 0 11px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    transition: all 0.3s;
    background: #fff;
    color: #333;
    box-sizing: border-box;
}

[data-theme="dark"] .mini-input {
    background: #252525;
    border-color: #404040;
    color: #fff;
}

.mini-input:hover {
    border-color: #40a9ff;
}

.mini-input:focus {
    outline: none;
    border-color: #40a9ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.mini-input::placeholder {
    color: #bfbfbf;
}

.mini-submit-btn-primary {
    width: 100%;
    height: 40px;
    background: #1890ff !important;
    color: #fff !important;
    border: 1px solid #1890ff !important;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
    display: block;
    margin: 0;
    padding: 0;
}

.mini-submit-btn-primary:hover {
    background: #40a9ff !important;
    border-color: #40a9ff !important;
}

.mini-submit-btn-primary:active {
    background: #096dd9 !important;
    border-color: #096dd9 !important;
}

.mini-pay-method-btn {
    width: 100%;
    height: 40px;
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-sizing: border-box;
}

[data-theme="dark"] .mini-pay-method-btn {
    background: #252525;
    border-color: #404040;
    color: #ccc;
}

.mini-pay-method-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.mini-pay-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.mini-rainbow-text {
    font-size: 18px;
    font-weight: 700;
    background: linear-gradient(90deg, #f00, #f80, #ff0, #0f0, #0ff, #00f, #80f);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: rainbowFlow 4s linear infinite;
}

@keyframes rainbowFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.mini-cancel-btn {
    width: 100%;
    height: 40px;
    background: #fff;
    color: rgba(0, 0, 0, 0.65);
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

[data-theme="dark"] .mini-cancel-btn {
    background: #252525;
    border-color: #404040;
    color: #999;
}

.mini-cancel-btn:hover {
    border-color: #40a9ff;
    color: #40a9ff;
}

.mini-qr-box {
    text-align: center;
    margin-bottom: 20px;
}

.mini-qr-code {
    width: 180px;
    height: 180px;
    margin: 0 auto 16px;
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    color: #d9d9d9;
    padding: 10px;
    box-sizing: border-box;
}

[data-theme="dark"] .mini-qr-code {
    background: #fff;
    border-color: #404040;
}

.mini-qr-amount {
    font-size: 28px;
    font-weight: 500;
    color: #f56c6c;
    margin-bottom: 10px;
}

[data-theme="dark"] .mini-qr-amount {
    color: #ff7875;
}

.mini-qr-tip {
    font-size: 14px;
    color: #1890ff;
    text-align: center;
    margin-top: 12px;
}

[data-theme="dark"] .mini-qr-tip {
    color: #409eff;
}

.mini-order-info {
    background: #fafafa;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 12px;
    margin-bottom: 16px;
}

[data-theme="dark"] .mini-order-info {
    background: #252525;
    border-color: #404040;
}

.mini-info-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.65);
}

[data-theme="dark"] .mini-info-row {
    color: #999;
}

.mini-info-row strong {
    color: #333;
    font-weight: 400;
}

[data-theme="dark"] .mini-info-row strong {
    color: #fff;
}

.mini-check-btn {
    width: 100%;
    height: 40px;
    background: #fff;
    color: #333;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.mini-check-btn:hover {
    background: #fafafa;
    border-color: #999;
}

.mini-check-btn:active {
    background: #f0f0f0;
    border-color: #666;
}

[data-theme="dark"] .mini-check-btn {
    background: #2a2a2a;
    color: #fff;
    border-color: #444;
}

[data-theme="dark"] .mini-check-btn:hover {
    background: #333;
    border-color: #666;
}

[data-theme="dark"] .mini-check-btn:active {
    background: #3a3a3a;
    border-color: #888;
}

.mini-success-icon {
    text-align: center;
    font-size: 56px;
    color: #52c41a;
    margin-bottom: 16px;
}

.mini-success-title {
    font-size: 18px;
    font-weight: 500;
    margin: 0 0 8px 0;
    color: #333;
    text-align: center;
}

[data-theme="dark"] .mini-success-title {
    color: #fff;
}

.mini-success-desc {
    font-size: 14px;
    color: rgba(0, 0, 0, 0.45);
    text-align: center;
    margin-bottom: 20px;
}

[data-theme="dark"] .mini-success-desc {
    color: rgba(255, 255, 255, 0.65);
}

.mini-cardkey-box {
    background: #f5f7fa;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

[data-theme="dark"] .mini-cardkey-box {
    background: #252525;
    border-color: #404040;
}

.mini-cardkey-content {
    font-size: 15px;
    color: #303133;
    line-height: 1.8;
    word-break: break-all;
    white-space: pre-wrap;
    text-align: left;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

[data-theme="dark"] .mini-cardkey-content {
    color: #f0f0f0;
}

.mini-done-btn {
    width: 100%;
    height: 36px;
    background: #52c41a;
    color: #fff;
    border: 1px solid #52c41a;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    box-sizing: border-box;
}

.mini-done-btn:hover {
    background: #73d13d;
    border-color: #73d13d;
}

.mini-done-btn:active {
    background: #389e0d;
    border-color: #389e0d;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 480px) {
    .mini-modal-box {
        width: 95%;
    }
}

/* 暗黑模式下的额外优化 */
[data-theme="dark"] h2 {
    color: #fff;
}

[data-theme="dark"] p {
    color: #ccc;
}

[data-theme="dark"] hr {
    border-top-color: #404040;
}

/* 支付金额大号显示 */
.mini-modal-content h2 {
    color: #f56c6c;
}

[data-theme="dark"] .mini-modal-content h2 {
    color: #ff7875;
}

/* 确保所有文本在暗黑模式下可读 */
[data-theme="dark"] .mini-modal-content {
    color: #ccc;
}

/* 优化输入框占位符 */
[data-theme="dark"] .mini-input::placeholder {
    color: #666;
}

/* 优化按钮文字 */
[data-theme="dark"] .mini-pay-method-btn {
    font-weight: 500;
}

/* 优化成功图标 */
.mini-success-icon i {
    display: inline-block;
}
