/* 通用变量 */
:root {
    --apple-blur: saturate(180%) blur(20px);
    --modal-background: rgba(255, 255, 255, 0.72);
    --toast-background: rgba(29, 29, 31, 0.72);
    --toast-success: rgba(52, 199, 89, 0.72);  /* Apple System Green */
    --toast-error: rgba(255, 59, 48, 0.72);    /* Apple System Red */
    --dialog-background: rgba(255, 255, 255, 0.9);
    --apple-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

/* 通用模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    background-color: white;
    margin: 0;
    padding: 0;
    width: 550px;
    max-width: 90%;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-20px);
}

.modal.show .modal-content {
    transform: translate(-50%, -50%) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.modal-body {
    padding: 20px;
}

.close {
    color: #aaa;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #333;
}

/* 对话框样式 */
.dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.dialog-overlay.show {
    opacity: 1;
    visibility: visible;
}

.dialog {
    background: var(--dialog-background);
    border-radius: 12px;
    box-shadow: var(--apple-shadow);
    width: 95%;
    max-width: 550px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    transform: translateY(30px);
    opacity: 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.dialog.show {
    transform: translateY(0);
    opacity: 1;
}

.dialog-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.dialog-title {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #1d1d1f;
}

.dialog-close {
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    color: #86868b;
    cursor: pointer;
    transition: color 0.2s;
}

.dialog-close:hover {
    color: #1d1d1f;
}

.dialog-content {
    padding: 24px;
    max-height: 70vh;
    overflow-y: auto;
}

.dialog-footer {
    display: flex;
    justify-content: flex-end;
    padding: 16px 24px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    gap: 12px;
}

.dialog-button {
    padding: 8px 16px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.dialog-button.primary {
    background: #0071e3;
    color: white;
}

.dialog-button.primary:hover {
    background: #0077ed;
}

.dialog-button.secondary {
    background: #e8e8ed;
    color: #1d1d1f;
}

.dialog-button.secondary:hover {
    background: #d2d2d7;
}

/* Toast 通知 */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.toast {
    background: var(--toast-background);
    color: white;
    padding: 12px 24px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.4;
    margin: 8px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    backdrop-filter: var(--apple-blur);
    -webkit-backdrop-filter: var(--apple-blur);
    box-shadow: var(--apple-shadow);
    text-align: center;
    pointer-events: auto;
    min-width: 200px;
    max-width: 80vw;
    font-weight: 500;
    letter-spacing: -0.01em;
}

.toast.success {
    background: var(--toast-success);
}

.toast.error {
    background: var(--toast-error);
}

.toast.active {
    opacity: 1;
    transform: translateY(0);
}

/* 按钮样式 */
.apple-button {
    background: #0071e3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 980px;
    font-size: 14px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apple-button:hover {
    background: #0077ed;
}

.apple-button.secondary {
    background: #e8e8ed;
    color: #1d1d1f;
}

.apple-button.secondary:hover {
    background: #d2d2d7;
}

/* 客服微信弹窗 */
.customer-service-dialog {
    text-align: center;
}

.qrcode-container {
    margin: 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qrcode-container img {
    max-width: 220px;
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: block;
    margin: 0 auto;
}

.qrcode-tip {
    color: #86868b;
    font-size: 14px;
    margin-top: 10px;
} 