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

/* 防止移动端自动缩放 */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
}

body {
    font-family: 'Arial', sans-serif;
    background: radial-gradient(ellipse at top, #0d1117 0%, #161b22 50%, #0a0a0a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
    /* PWA 安全区域支持 */
    padding-top: max(40px, env(safe-area-inset-top, 20px));
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    /* 防止双击缩放 */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

body::-webkit-scrollbar {
    display: none;
}

body {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* PWA 状态栏蒙版 - iPhone刘海屏优化 */
body::before {
    content: '' !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    height: env(safe-area-inset-top, 0px) !important;
    background: linear-gradient(180deg, #0d1117 0%, #161b22 50%, #0d1117 100%) !important;
    backdrop-filter: blur(30px) saturate(180%) !important;
    z-index: 999999 !important;
    pointer-events: none !important;
    display: block !important;
    opacity: 1 !important;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5) !important;
}

/* PWA 安全区域适配 */
@supports(padding: max(0px)) {
    body {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

/* 网格覆盖层 - 赛博朋克氛围 */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(0, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 1;
    animation: gridMove 20s linear infinite;
}

@keyframes gridMove {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

/* 霓虹灯渐变动画 */
@keyframes gradientShift {
    0%, 100% { 
        background-position: 0% 50%; 
        filter: hue-rotate(0deg) brightness(1);
    }
    25% { 
        background-position: 100% 50%; 
        filter: hue-rotate(30deg) brightness(1.1);
    }
    50% { 
        background-position: 100% 50%; 
        filter: hue-rotate(60deg) brightness(0.9);
    }
    75% { 
        background-position: 0% 50%; 
        filter: hue-rotate(30deg) brightness(1.1);
    }
}

/* 数据流动画 */
@keyframes dataFlow {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100vw); opacity: 0; }
}

/* 反向数据流动画 */
@keyframes dataFlowReverse {
    0% { transform: translateX(100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(-100vw); opacity: 0; }
}

/* 脉冲发光效果 */
@keyframes pulse {
    0%, 100% { 
        box-shadow: 
            0 4px 20px #00ffff,
            0 0 20px rgba(0, 255, 255, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: #00ffff;
    }
    50% { 
        box-shadow: 
            0 8px 40px #00ffff,
            0 0 60px rgba(0, 255, 255, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: #00ffff;
    }
}

/* 主题按钮发光效果 */
@keyframes themeButtonGlow {
    0%, 100% { 
        box-shadow: 
            0 4px 20px #ff0080,
            0 0 20px rgba(255, 0, 128, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: #ff0080;
    }
    50% { 
        box-shadow: 
            0 8px 40px #ff0080,
            0 0 60px rgba(255, 0, 128, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: #ff0080;
    }
}

/* 暖色主题动画效果 */
@keyframes warmPulse {
    0%, 100% { 
        box-shadow: 
            0 4px 20px #ff4000,
            0 0 20px rgba(255, 64, 0, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: #ff4000;
    }
    50% { 
        box-shadow: 
            0 8px 40px #ff4000,
            0 0 60px rgba(255, 64, 0, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: #ff4000;
    }
}

@keyframes warmThemeGlow {
    0%, 100% { 
        box-shadow: 
            0 4px 20px #00ff80,
            0 0 20px rgba(0, 255, 128, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
        border-color: #00ff80;
    }
    50% { 
        box-shadow: 
            0 8px 40px #00ff80,
            0 0 60px rgba(0, 255, 128, 0.8),
            inset 0 1px 0 rgba(255, 255, 255, 0.4);
        border-color: #00ff80;
    }
}

.container {
    background: rgba(13, 17, 23, 0.3);
    border-radius: 16px;
    box-shadow: 
        0 8px 32px rgba(0, 255, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(0, 255, 255, 0.2);
    overflow: visible;
    width: 100%;
    max-width: 500px;
    position: relative;
    z-index: 2;
}

.header {
    background: #161b22;
    color: #ffffff;
    text-align: center;
    padding: 40px 30px;
    position: relative;
    box-shadow: 
        0 0 30px rgba(0, 255, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 16px 16px 0 0;
    z-index: 1;
    overflow: hidden;
}

.header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
    pointer-events: none;
}

.settings-btn {
    position: absolute;
    top: 58px;
    right: 30px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 255, 255, 0.4);
    border: 1px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    z-index: 10;
}

.settings-btn:hover {
    background: rgba(0, 255, 255, 0.6);
    border-color: #00ffff;
    transform: translateY(-50%) scale(1.05);
}

.settings-btn:active {
    background: rgba(0, 255, 255, 0.8);
    transform: translateY(-50%) scale(0.95);
}

.header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.header p {
    font-size: 14px;
    opacity: 0.9;
}

.form-section {
    padding: 30px;
    background: rgba(13, 17, 23, 0.5);
    position: relative;
    z-index: 2;
    border-radius: 0 0 16px 16px;
}

.formula {
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.formula::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: dataFlow 3s linear infinite;
}

.formula::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: -100%;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, #00ffff, transparent);
    animation: dataFlowReverse 3s linear infinite;
}

.formula-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 16px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 15px;
    text-shadow: 0 0 10px rgba(0, 255, 255, 0.5);
}

.formula-step {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    padding: 12px 16px;
    margin: 8px 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.formula-step:hover {
    background: rgba(0, 255, 255, 0.08);
    border-color: rgba(0, 255, 255, 0.25);
    transform: translateX(4px);
}

.formula-step::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, #00ffff, #ff0080, #8000ff);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.formula-step:hover::before {
    opacity: 1;
}

.process-description {
    background: rgba(0, 255, 255, 0.05);
    border: 1px solid rgba(0, 255, 255, 0.15);
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.input-group {
    margin-bottom: 20px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #00ffff;
    font-weight: 500;
    font-size: 14px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.input-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(13, 17, 23, 0.3);
    border: 1px solid rgba(0, 255, 255, 0.3);
    border-radius: 8px;
    color: #ffffff;
    font-size: 16px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-appearance: none;
    -moz-appearance: textfield;
    /* 防止输入时自动缩放 */
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
    touch-action: manipulation;
    /* 输入框需要可选择和编辑 */
    -webkit-user-select: auto;
    -moz-user-select: auto;
    -ms-user-select: auto;
    user-select: auto;
}

.input-group input::-webkit-outer-spin-button,
.input-group input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.input-group input:focus {
    outline: none;
    border-color: #00ffff;
    box-shadow: 0 0 0 2px rgba(0, 255, 255, 0.2);
    background: rgba(13, 17, 23, 0.4);
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #00ffff 0%, #0080ff 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
    margin-top: 10px;
}

.calculate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 255, 255, 0.4);
}

.calculate-btn:hover::before {
    left: 100%;
}

.calculate-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 255, 255, 0.3);
}

/* 弹窗样式 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(13, 17, 23, 0.95);
    border-radius: 16px;
    border: 1px solid rgba(0, 255, 255, 0.3);
    backdrop-filter: blur(20px);
    box-shadow: 0 8px 32px rgba(0, 255, 255, 0.2);
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: #161b22;
    color: #ffffff;
    padding: 20px 24px;
    border-radius: 16px 16px 0 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(0, 255, 255, 0.3);
}

.modal-header h2 {
    font-size: 20px;
    margin: 0;
    font-weight: bold;
}

.close-btn {
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #ffffff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 24px;
    color: #ffffff;
}

.results-section {
    margin-bottom: 24px;
}

.results-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: bold;
    color: #00ffff;
    margin-bottom: 16px;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(0, 255, 255, 0.03);
    border: 1px solid rgba(0, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.result-item:hover {
    background: rgba(0, 255, 255, 0.05);
    border-color: rgba(0, 255, 255, 0.2);
    transform: translateX(4px);
}

.result-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.result-value {
    font-size: 16px;
    font-weight: bold;
    color: #00ffff;
    text-shadow: 0 0 5px rgba(0, 255, 255, 0.3);
}

/* 特殊样式项目 */
.final-price-item {
    background: rgba(0, 255, 255, 0.08) !important;
    border-color: rgba(0, 255, 255, 0.3) !important;
}

.merchant-amount-item {
    background: rgba(255, 0, 128, 0.08) !important;
    border-color: rgba(255, 0, 128, 0.3) !important;
}

.modal-body #totalPrice,
.final-price {
    color: #00ffff !important;
    font-size: 18px !important;
    text-shadow: 0 0 8px rgba(0, 255, 255, 0.5) !important;
}

.modal-body #merchantReceive,
.merchant-amount {
    color: #ff0080 !important;
    font-size: 18px !important;
    text-shadow: 0 0 8px rgba(255, 0, 128, 0.5) !important;
}

/* 警告区域样式 */
.warning-section {
    background: rgba(255, 193, 7, 0.05);
    border: 1px solid rgba(255, 193, 7, 0.2);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.9);
}

.warning-section strong {
    color: #ffc107;
}

/* 错误状态样式 */
.modal-overlay[data-error="true"] .modal-content {
    border-color: rgba(255, 0, 0, 0.5);
    box-shadow: 0 8px 32px rgba(255, 0, 0, 0.3);
}

/* 设置页面样式 */
.modal-overlay[data-settings="true"] .modal-content {
    border-color: rgba(0, 255, 255, 0.5);
}

/* 响应式设计 */
@media (max-width: 768px) {
    body {
        padding: 15px;
        padding-top: max(35px, env(safe-area-inset-top, 15px));
        padding-bottom: max(15px, env(safe-area-inset-bottom));
        padding-left: max(15px, env(safe-area-inset-left));
        padding-right: max(15px, env(safe-area-inset-right));
    }
    
    .container {
        max-width: 100%;
        min-height: auto;
        max-height: none;
        overflow: visible;
    }
    
    .header {
        padding: 20px 15px;
    }
    
    .header h1 {
        font-size: 22px;
    }
    
    .header p {
        font-size: 13px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .formula {
        padding: 15px;
        margin: 15px 0;
    }
    
    .formula-title {
        font-size: 14px;
    }
    
    .formula-step {
        font-size: 12px;
        padding: 10px 12px;
    }
    
    .input-group {
        margin-bottom: 15px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .input-group input {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    .calculate-btn {
        font-size: 16px;
        padding: 14px;
    }
    
    .modal-overlay {
        padding: 10px;
    }
    
    .modal-content {
        max-height: 90vh;
        max-height: 90dvh;
    }
    
    .modal-header {
        padding: 15px 16px;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .result-item {
        padding: 10px 12px;
    }
    
    .result-label {
        font-size: 13px;
    }
    
    .result-value {
        font-size: 15px;
    }
    
    .final-price, .merchant-amount {
        font-size: 16px !important;
    }
    
    .settings-btn {
        width: 36px;
        height: 36px;
        top: 34px;
        right: 15px;
        transform: translateY(-50%);
    }
    
    .close-btn {
        top: 50%;
        right: 16px;
        transform: translateY(-50%);
        width: 28px;
        height: 28px;
        font-size: 16px;
    }
}

/* 极小屏幕设备优化 */
@media (max-width: 340px) {
    body {
        padding: 8px;
        padding-top: max(30px, env(safe-area-inset-top, 8px));
        padding-bottom: max(8px, env(safe-area-inset-bottom));
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }
    
    .container {
        width: 100%;
        max-width: none;
        min-width: 0;
        max-height: none;
        overflow: visible;
    }
    
    .header h1 {
        font-size: 18px;
    }
    
    .header p {
        font-size: 11px;
    }
    
    .form-section {
        padding: 8px;
    }
    
    .input-group {
        margin-bottom: 8px;
    }
    
    .input-group label {
        font-size: 12px;
        margin-bottom: 3px;
    }
    
    .input-group input {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    .calculate-btn {
        padding: 10px;
        font-size: 14px;
        margin-top: 8px;
    }
    
    .formula {
        padding: 8px;
        margin: 8px 0;
    }
    
    .formula-title {
        font-size: 12px;
    }
    
    .formula-step {
        font-size: 10px;
        padding: 4px 8px;
    }
    
    .settings-btn, .theme-btn {
        width: 32px;
        height: 32px;
        top: 34px;
        transform: translateY(-50%);
    }
    
    .settings-btn {
        right: 8px;
    }
    
    .theme-btn {
        left: 8px;
    }
    
    .close-btn {
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        width: 24px;
        height: 24px;
        font-size: 16px;
    }
    
    .modal-content {
        margin: 8px;
        max-width: calc(100% - 16px);
        max-height: calc(100vh - 16px);
    }
    
    .modal-header {
        padding: 8px 12px;
    }
    
    .modal-header h2 {
        font-size: 14px;
    }
    
    .modal-body {
        padding: 8px 12px;
    }
    
    .result-item {
        padding: 6px 8px;
        margin-bottom: 4px;
    }
    
    .result-label {
        font-size: 11px;
    }
    
    .result-value {
        font-size: 12px;
    }
    
    .final-price {
        font-size: 14px !important;
    }
    
    .merchant-amount {
        font-size: 14px !important;
    }
}

/* 主题切换按钮样式 */
.theme-btn {
    position: absolute;
    top: 58px;
    left: 30px;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 255, 255, 0.4);
    border: 1px solid #00ffff;
    color: #00ffff;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(15px);
    z-index: 10;
}

.theme-btn:hover {
    background: rgba(0, 255, 255, 0.6);
    border-color: #00ffff;
    transform: translateY(-50%) scale(1.05);
}

.theme-btn:active {
    background: rgba(0, 255, 255, 0.8);
    transform: translateY(-50%) scale(0.95);
}


/* 淡紫色科技主题样式 */
.warm-tech-theme {
    background: radial-gradient(ellipse at top, #1a0f1a 0%, #2a1a2a 50%, #0f0a0f 100%) !important;
}

.warm-tech-theme .header {
    background: #2a1a2a !important;
    box-shadow: 
        0 0 30px rgba(177, 156, 217, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
    border-bottom: 1px solid rgba(177, 156, 217, 0.3) !important;
    border-radius: 16px 16px 0 0 !important;
}

.warm-tech-theme .settings-btn {
    background: rgba(177, 156, 217, 0.4) !important;
    border: 1px solid #b19cd9 !important;
    color: #b19cd9 !important;
}

.warm-tech-theme .theme-btn {
    background: rgba(177, 156, 217, 0.4) !important;
    border: 1px solid #b19cd9 !important;
    color: #b19cd9 !important;
}

.warm-tech-theme .settings-btn:hover {
    background: rgba(177, 156, 217, 0.6) !important;
    border-color: #b19cd9 !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.warm-tech-theme .theme-btn:hover {
    background: rgba(177, 156, 217, 0.6) !important;
    border-color: #b19cd9 !important;
    transform: translateY(-50%) scale(1.05) !important;
}

.warm-tech-theme .settings-btn:active {
    background: rgba(177, 156, 217, 0.8) !important;
    transform: translateY(-50%) scale(0.95) !important;
}

.warm-tech-theme .theme-btn:active {
    background: rgba(177, 156, 217, 0.8) !important;
    transform: translateY(-50%) scale(0.95) !important;
}


.warm-tech-theme .container {
    background: rgba(26, 15, 26, 0.3) !important;
    border-color: rgba(177, 156, 217, 0.2) !important;
    box-shadow: 
        0 8px 32px rgba(177, 156, 217, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

.warm-tech-theme .form-section {
    background: rgba(26, 15, 26, 0.5) !important;
    border-radius: 0 0 16px 16px !important;
}

.warm-tech-theme .formula {
    background: rgba(177, 156, 217, 0.03) !important;
    border-color: rgba(177, 156, 217, 0.1) !important;
}

.warm-tech-theme .formula::before {
    background: linear-gradient(90deg, transparent, #b19cd9, transparent) !important;
}

.warm-tech-theme .formula::after {
    background: linear-gradient(90deg, transparent, #b19cd9, transparent) !important;
}

.warm-tech-theme .formula-title {
    color: #b19cd9 !important;
    text-shadow: 0 0 10px rgba(177, 156, 217, 0.5) !important;
}

.warm-tech-theme .formula-step {
    background: rgba(177, 156, 217, 0.05) !important;
    border-color: rgba(177, 156, 217, 0.15) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.warm-tech-theme .formula-step:hover {
    background: rgba(177, 156, 217, 0.08) !important;
    border-color: rgba(177, 156, 217, 0.25) !important;
}

.warm-tech-theme .formula-step::before {
    background: linear-gradient(to bottom, #b19cd9, #9d4edd, #dcc7f0) !important;
}

.warm-tech-theme .process-description {
    background: rgba(177, 156, 217, 0.05) !important;
    border-color: rgba(177, 156, 217, 0.15) !important;
}

.warm-tech-theme .input-group label {
    color: #b19cd9 !important;
    text-shadow: 0 0 5px rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .input-group input {
    background: rgba(26, 15, 26, 0.3) !important;
    border-color: rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .input-group input:focus {
    border-color: #b19cd9 !important;
    box-shadow: 0 0 0 2px rgba(177, 156, 217, 0.2) !important;
}

.warm-tech-theme .calculate-btn {
    background: linear-gradient(135deg, #b19cd9 0%, #9d4edd 100%) !important;
    box-shadow: 0 4px 15px rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .calculate-btn:hover {
    box-shadow: 0 6px 20px rgba(177, 156, 217, 0.4) !important;
}

.warm-tech-theme body::before {
    background: linear-gradient(180deg, #1a0f1a 0%, #2a1a2a 50%, #1a0f1a 100%) !important;
}

/* 淡紫色主题弹窗样式 */
.warm-tech-theme .modal-content {
    background: rgba(26, 15, 26, 0.95) !important;
    border-color: rgba(177, 156, 217, 0.3) !important;
    box-shadow: 0 8px 32px rgba(177, 156, 217, 0.2) !important;
}

.warm-tech-theme .modal-header {
    background: #2a1a2a !important;
    border-bottom: 1px solid rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .results-title {
    color: #b19cd9 !important;
    text-shadow: 0 0 5px rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .result-item {
    background: rgba(177, 156, 217, 0.03) !important;
    border-color: rgba(177, 156, 217, 0.1) !important;
}

.warm-tech-theme .result-item:hover {
    background: rgba(177, 156, 217, 0.05) !important;
    border-color: rgba(177, 156, 217, 0.2) !important;
}

.warm-tech-theme .result-value {
    color: #b19cd9 !important;
    text-shadow: 0 0 5px rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .final-price-item {
    background: rgba(177, 156, 217, 0.08) !important;
    border-color: rgba(177, 156, 217, 0.3) !important;
}

.warm-tech-theme .merchant-amount-item {
    background: rgba(255, 0, 128, 0.08) !important;
    border-color: rgba(255, 0, 128, 0.3) !important;
}

.warm-tech-theme .modal-body #totalPrice,
.warm-tech-theme .final-price {
    color: #b19cd9 !important;
    text-shadow: 0 0 8px rgba(177, 156, 217, 0.5) !important;
}

.warm-tech-theme .modal-body #merchantReceive,
.warm-tech-theme .merchant-amount {
    color: #b19cd9 !important;
    text-shadow: 0 0 8px rgba(177, 156, 217, 0.5) !important;
}

.warm-tech-theme .modal-overlay[data-settings="true"] .modal-content {
    border-color: rgba(177, 156, 217, 0.5) !important;
}

/* 缓存清除按钮简洁样式 */
.cache-clear-btn:hover {
    opacity: 0.9;
}

.cache-clear-btn:active {
    opacity: 0.8;
}

.cache-clear-btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* PWA 模式专用样式 - 不影响PC端居中 */
@media (display-mode: standalone) {
    body {
        justify-content: flex-start !important;
        padding-top: max(60px, env(safe-area-inset-top, 20px)) !important;
    }
}

/* iOS Safari PWA 模式 */
@media (display-mode: standalone) and (-webkit-touch-callout: none) {
    body {
        padding-top: max(80px, env(safe-area-inset-top, 20px)) !important;
    }
}

/* 移动端 PWA 模式专用样式 */
@media (display-mode: standalone) and (max-width: 768px) {
    body {
        justify-content: flex-start !important;
        padding-top: max(70px, env(safe-area-inset-top, 15px)) !important;
    }
}

/* 小屏幕 PWA 模式 */
@media (display-mode: standalone) and (max-width: 340px) {
    body {
        padding-top: max(60px, env(safe-area-inset-top, 8px)) !important;
    }
}


/* 响应式主题按钮 */
@media (max-width: 768px) {
    .theme-btn {
        width: 36px;
        height: 36px;
        top: 34px;
        left: 15px;
        transform: translateY(-50%);
    }
    
    .settings-btn {
        width: 36px;
        height: 36px;
        top: 34px;
        right: 15px;
        transform: translateY(-50%);
    }
}