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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.47;
    color: #000;
    background-color: #f2f2f7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* iOS颜色系统 */
:root {
    --ios-blue: #007AFF;
    --ios-blue-dark: #0051D5;
    --ios-gray: #8E8E93;
    --ios-gray2: #AEAEB2;
    --ios-gray3: #C7C7CC;
    --ios-gray4: #D1D1D6;
    --ios-gray5: #E5E5EA;
    --ios-gray6: #F2F2F7;
    --ios-red: #FF3B30;
    --ios-green: #34C759;
    --ios-orange: #FF9500;
}

/* 客服挂件样式 */
.customer-service-widget {
    position: fixed;
    bottom: 34px;
    right: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.service-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ios-blue);
    color: white;
    padding: 14px 24px;
    border-radius: 25px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    user-select: none;
    border: none;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.01em;
}

.service-toggle:hover {
    background: var(--ios-blue-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 25px rgba(0, 122, 255, 0.4), 0 2px 8px rgba(0, 0, 0, 0.15);
}

.service-toggle:active {
    transform: translateY(0);
    box-shadow: 0 2px 10px rgba(0, 122, 255, 0.3), 0 1px 3px rgba(0, 0, 0, 0.1);
}

.service-toggle:focus {
    outline: none;
    box-shadow: 0 4px 20px rgba(0, 122, 255, 0.3), 0 0 0 3px rgba(0, 122, 255, 0.2);
}

.service-icon {
    font-size: 18px;
}

.service-text {
    display: none;
}

.service-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    max-height: 480px;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 18px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 0.5px solid rgba(0, 0, 0, 0.04);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.service-panel.active {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

.service-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 20px 16px 20px;
    background: transparent;
    border-bottom: 1px solid var(--ios-gray5);
}

.service-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.01em;
}

.close-btn {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--ios-gray);
    cursor: pointer;
    padding: 8px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    transition: all 0.2s ease;
    font-weight: 300;
}

.close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #000;
}

.close-btn:active {
    background-color: rgba(0, 0, 0, 0.1);
    transform: scale(0.95);
}

.service-content {
    padding: 20px;
}

.service-section {
    margin-bottom: 32px;
}

.section-title {
    text-align: center;
    margin-bottom: 24px;
    font-size: 22px;
    font-weight: 700;
    color: #000;
    letter-spacing: -0.02em;
    padding-bottom: 12px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 3px;
    background: var(--ios-blue);
    border-radius: 2px;
}

.service-options {
    margin-bottom: 24px;
}

/* 备用域名按钮容器 - 水平排列 */
.backup-domains-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.backup-domains-container .service-option {
    flex: 1;
    min-width: 80px;
    margin-bottom: 0;
}

/* 小屏幕下备用域名按钮样式 */
.backup-domains-container .service-option {
    padding: 12px 8px;
}

.backup-domains-container .service-option .option-icon {
    font-size: 14px;
    width: 16px;
    height: 16px;
}

.backup-domains-container .service-option span:last-child {
    font-size: 13px;
    white-space: nowrap;
}

.service-option {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--ios-gray5);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    font-size: 16px;
    font-weight: 400;
    color: #000;
    letter-spacing: -0.01em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.service-option:hover {
    background: rgba(0, 122, 255, 0.05);
    border-color: var(--ios-blue);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.15), 0 2px 4px rgba(0, 0, 0, 0.08);
    color: var(--ios-blue);
}

.service-option:active {
    transform: translateY(0);
    background: rgba(0, 122, 255, 0.08);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.service-option:last-child {
    margin-bottom: 0;
}

/* 收藏按钮特殊样式 */
.favorite-btn {
    background: var(--ios-blue);
    color: white;
    text-align: center;
    justify-content: center;
}

.favorite-btn:hover {
    background: var(--ios-blue-dark);
    border-color: var(--ios-blue-dark);
    color: white;
}

.favorite-btn:active {
    background: #0051D5;
    color: white;
}

/* 备用域名按钮居中对齐样式 */
.backup-domain-btn {
    text-align: center;
    justify-content: center;
}

.backup-domain-btn:hover {
    background: rgba(255, 149, 0, 0.05);
    border-color: var(--ios-orange);
    color: var(--ios-orange);
}

.backup-domain-btn:active {
    background: rgba(255, 149, 0, 0.08);
}

.option-icon {
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
}

.telegram-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
}

.qq-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    border-radius: 4px;
}

.service-info {
    padding: 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    border: 1px solid var(--ios-gray5);
    margin-top: 24px;
}

.service-info h4 {
    margin: 0 0 16px 0;
    font-size: 17px;
    font-weight: 600;
    color: #000;
    letter-spacing: -0.01em;
}

.service-info p {
    margin: 12px 0;
    font-size: 15px;
    font-weight: 400;
    color: var(--ios-gray);
    text-align: left;
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    vertical-align: middle;
}

.service-info .option-icon {
    margin: 0;
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.service-info .option-icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    vertical-align: middle;
    display: inline-block;
    border-radius: 4px;
}

.service-info .option-icon.emoji {
    font-size: 16px;
    line-height: 1;
    text-align: center;
    vertical-align: middle;
}

@media (max-width: 768px) {
    .customer-service-widget {
        bottom: 28px;
        right: 16px;
    }
    
    .service-panel {
        width: 300px;
        bottom: 66px;
    }
    
    .service-content {
        padding: 16px;
    }
    
    .section-title {
        font-size: 20px;
    }
    
    .service-option {
        padding: 14px 16px;
    }
    
    .service-info {
        padding: 16px;
    }
    
    /* 移动端备用域名按钮优化 */
    .backup-domains-container {
        gap: 6px;
    }
    
    .backup-domains-container .service-option {
        padding: 10px 6px;
        min-width: 70px;
    }
    
    .backup-domains-container .service-option .option-icon {
        font-size: 12px;
        width: 14px;
        height: 14px;
    }
    
    .backup-domains-container .service-option span:last-child {
        font-size: 11px;
        white-space: nowrap;
    }
}