@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

.xunmeng-points-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 24px;
    margin: 16px 0;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.xunmeng-points-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #eee;
}

.xunmeng-points-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}

.xunmeng-points-header h3 i {
    margin-right: 8px;
    color: #FFD700;
}

.xunmeng-points-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.xunmeng-points-item {
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #fff 0%, #f8f9fa 100%);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border-top: 3px solid #FFD700;
}

.xunmeng-points-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.xunmeng-points-item.highlight {
    border-top-color: #4CAF50;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f5e9 100%);
}

.points-icon {
    font-size: 32px;
    margin-bottom: 12px;
    color: #FFD700;
}

.xunmeng-points-item.highlight .points-icon {
    color: #4CAF50;
}

.points-value {
    font-family: 'Inter', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #333;
    margin-bottom: 6px;
}

.xunmeng-points-item.highlight .points-value {
    color: #4CAF50;
}

.points-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.xunmeng-exchange-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
}

.xunmeng-exchange-section h4 {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin: 0 0 12px 0;
}

.xunmeng-exchange-section h4 i {
    margin-right: 8px;
    color: #2196F3;
}

.exchange-rate {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.exchange-fee {
    font-size: 13px;
    color: #ff9800;
    margin-bottom: 16px;
    padding: 10px;
    background: #fff8e1;
    border-radius: 8px;
    display: flex;
    align-items: center;
}

.exchange-fee i {
    margin-right: 8px;
}

.xunmeng-exchange-form .form-group {
    margin-bottom: 16px;
}

.xunmeng-exchange-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.xunmeng-exchange-form input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.xunmeng-exchange-form input[type="number"]:focus {
    outline: none;
    border-color: #FFD700;
}

.help-text {
    font-size: 12px;
    color: #999;
    margin-top: 6px;
}

.exchange-preview {
    font-size: 20px;
    font-weight: 600;
    color: #4CAF50;
    padding: 12px;
    background: #fff;
    border-radius: 8px;
    margin-top: 8px;
}

.exchange-fee-preview {
    font-size: 14px;
    color: #ff9800;
    margin-top: 8px;
    padding: 10px;
    background: #fff8e1;
    border-radius: 8px;
}

.exchange-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.exchange-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.exchange-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.exchange-btn i {
    margin-right: 8px;
}

.exchange-disabled {
    padding: 16px;
    background: #fff;
    border-radius: 8px;
    text-align: center;
    color: #999;
    font-size: 14px;
}

.xunmeng-points-notice {
    text-align: center;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    color: #666;
}

.xunmeng-widget-points {
    padding: 16px;
    background: #fff;
    border-radius: 10px;
}

.widget-points-item,
.widget-balance-item {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
}

.widget-points-item:last-child,
.widget-balance-item:last-child {
    border-bottom: none;
}

.widget-icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
}

.widget-icon-wrap.points {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%);
}

.widget-icon-wrap.points i {
    color: #FFD700;
    font-size: 20px;
}

.widget-icon-wrap.balance {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8e9 100%);
}

.widget-icon-wrap.balance i {
    color: #4CAF50;
    font-size: 20px;
}

.widget-info {
    flex: 1;
}

.points-num,
.balance-num {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #333;
}

.balance-num {
    color: #4CAF50;
}

.points-text,
.balance-text {
    display: block;
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.widget-rate {
    padding: 12px 0;
    border-bottom: 1px dashed #eee;
    margin-bottom: 12px;
}

.rate-label {
    display: block;
    font-size: 11px;
    color: #999;
    margin-bottom: 4px;
}

.rate-value {
    display: block;
    font-size: 13px;
    color: #333;
    font-weight: 600;
}

.fee-info {
    display: block;
    font-size: 11px;
    color: #ff9800;
    margin-top: 4px;
}

.widget-exchange-section {
    margin-top: 12px;
}

.widget-exchange-btn {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.widget-exchange-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

.widget-exchange-btn i {
    margin-right: 8px;
}

.widget-exchange-disabled {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #999;
    font-size: 13px;
}

.widget-exchange-disabled {
    text-align: center;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    color: #999;
    font-size: 13px;
}

.xunmeng-widget-notice {
    padding: 20px;
    text-align: center;
    color: #666;
    font-size: 13px;
}

.xunmeng-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    overflow-y: auto;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.modal-content {
    position: relative;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 420px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -45%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #fff 0%, #fafafa 100%);
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
    display: flex;
    align-items: center;
}

.modal-header h3 i {
    margin-right: 10px;
    color: #FFD700;
}

.modal-close {
    font-size: 24px;
    border: none;
    background: none;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.3s ease;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 24px;
    max-height: calc(90vh - 140px);
    overflow-y: auto;
}

.current-info {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 10px;
}

.current-points,
.current-balance {
    flex: 1;
}

.current-info .label {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 4px;
}

.current-info .value {
    font-size: 18px;
    font-weight: 700;
}

.current-info .value.points {
    color: #FFD700;
}

.current-info .value.balance {
    color: #4CAF50;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.label-hint {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.modal-body input[type="number"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eee;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.modal-body input[type="number"]:focus {
    outline: none;
    border-color: #FFD700;
}

.exchange-calculation {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 16px;
}

.calc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.calc-row:not(:last-child) {
    border-bottom: 1px dashed #ddd;
}

.calc-label {
    font-size: 13px;
    color: #666;
}

.calc-value {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

.calc-row.fee .calc-value {
    color: #ff9800;
}

.calc-row.total {
    padding-top: 12px;
}

.calc-row.total .calc-label {
    font-weight: 600;
    color: #333;
}

.calc-row.total .calc-value.highlight {
    font-size: 18px;
    color: #4CAF50;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.modal-cancel,
.modal-submit {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-cancel {
    background: #f0f0f0;
    color: #666;
}

.modal-cancel:hover {
    background: #e8e8e8;
}

.modal-submit {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
}

.modal-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.modal-submit:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.xunmeng-points-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    color: #333;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

.xunmeng-balance-badge {
    display: inline-block;
    padding: 6px 12px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

body.dark-theme .xunmeng-points-container,
body.dark .xunmeng-points-container {
    background: rgba(51, 51, 51, 0.95);
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .xunmeng-points-header h3,
body.dark .xunmeng-points-header h3 {
    color: #e2e8f0;
}

body.dark-theme .xunmeng-points-item,
body.dark .xunmeng-points-item {
    background: #444;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .xunmeng-points-item.highlight,
body.dark .xunmeng-points-item.highlight {
    background: #3a5a3a;
}

body.dark-theme .points-value,
body.dark .points-value {
    color: #e2e8f0;
}

body.dark-theme .points-label,
body.dark .points-label {
    color: #a0aec0;
}

body.dark-theme .xunmeng-exchange-section,
body.dark .xunmeng-exchange-section {
    background: #444;
}

body.dark-theme .xunmeng-exchange-section h4,
body.dark .xunmeng-exchange-section h4 {
    color: #e2e8f0;
}

body.dark-theme .exchange-rate,
body.dark .exchange-rate {
    background: #333;
    color: #a0aec0;
}

body.dark-theme .exchange-fee,
body.dark .exchange-fee {
    background: #4a3f2f;
}

body.dark-theme .xunmeng-exchange-form label,
body.dark .xunmeng-exchange-form label {
    color: #e2e8f0;
}

body.dark-theme .xunmeng-exchange-form input[type="number"],
body.dark .xunmeng-exchange-form input[type="number"] {
    background: #333;
    border-color: #555;
    color: #e2e8f0;
}

body.dark-theme .xunmeng-exchange-form input[type="number"]:focus,
body.dark .xunmeng-exchange-form input[type="number"]:focus {
    border-color: #FFD700;
}

body.dark-theme .exchange-fee-preview,
body.dark .exchange-fee-preview {
    background: #4a3f2f;
}

body.dark-theme .exchange-disabled,
body.dark .exchange-disabled {
    background: #333;
    color: #a0aec0;
}

body.dark-theme .xunmeng-widget-points,
body.dark .xunmeng-widget-points {
    background: #333;
}

body.dark-theme .widget-points-item,
body.dark-theme .widget-balance-item,
body.dark .widget-points-item,
body.dark .widget-balance-item {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .widget-icon-wrap.points,
body.dark .widget-icon-wrap.points {
    background: rgba(255, 215, 0, 0.1);
}

body.dark-theme .widget-icon-wrap.balance,
body.dark .widget-icon-wrap.balance {
    background: rgba(76, 175, 80, 0.1);
}

body.dark-theme .points-num,
body.dark-theme .balance-num,
body.dark .points-num,
body.dark .balance-num {
    color: #e2e8f0;
}

body.dark-theme .points-text,
body.dark-theme .balance-text,
body.dark .points-text,
body.dark .balance-text {
    color: #a0aec0;
}

body.dark-theme .widget-rate,
body.dark .widget-rate {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .rate-value,
body.dark .rate-value {
    color: #e2e8f0;
}

body.dark-theme .modal-content,
body.dark .modal-content {
    background: #333;
}

body.dark-theme .modal-header,
body.dark .modal-header {
    background: #444;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .modal-header h3,
body.dark .modal-header h3 {
    color: #e2e8f0;
}

body.dark-theme .modal-close,
body.dark .modal-close {
    color: #a0aec0;
}

body.dark-theme .modal-close:hover,
body.dark .modal-close:hover {
    color: #e2e8f0;
}

body.dark-theme .current-info,
body.dark .current-info {
    background: #444;
}

body.dark-theme .current-info .label,
body.dark .current-info .label {
    color: #a0aec0;
}

body.dark-theme .modal-body label,
body.dark .modal-body label {
    color: #e2e8f0;
}

body.dark-theme .modal-body input[type="number"],
body.dark .modal-body input[type="number"] {
    background: #444;
    border-color: #555;
    color: #e2e8f0;
}

body.dark-theme .modal-body input[type="number"]:focus,
body.dark .modal-body input[type="number"]:focus {
    border-color: #FFD700;
}

body.dark-theme .exchange-calculation,
body.dark .exchange-calculation {
    background: #444;
}

body.dark-theme .calc-row:not(:last-child),
body.dark .calc-row:not(:last-child) {
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .calc-label,
body.dark .calc-label {
    color: #a0aec0;
}

body.dark-theme .calc-value,
body.dark .calc-value {
    color: #e2e8f0;
}

body.dark-theme .modal-footer,
body.dark .modal-footer {
    background: #444;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark-theme .modal-cancel,
body.dark .modal-cancel {
    background: #555;
    color: #a0aec0;
}

body.dark-theme .modal-cancel:hover,
body.dark .modal-cancel:hover {
    background: #5a5a5a;
}

body.dark-theme .xunmeng-points-notice,
body.dark .xunmeng-points-notice {
    background: #444;
    color: #a0aec0;
}

@media (max-width: 768px) {
    .xunmeng-points-container {
        padding: 16px;
        margin: 12px 0;
    }
    
    .xunmeng-points-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .xunmeng-points-item {
        padding: 16px;
    }
    
    .points-icon {
        font-size: 24px;
    }
    
    .points-value {
        font-size: 22px;
    }
    
    .xunmeng-exchange-section {
        padding: 16px;
    }
    
    .current-info {
        flex-direction: column;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .xunmeng-points-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-header,
    .modal-footer {
        padding: 16px;
    }
}
