/* 售后页面 - 重新设计：视觉传达优化 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #f5f5f5;
    --accent-color: #d4af37;
    --text-primary: #1a1a1a;
    --text-secondary: #8e8e93;
    --border-color: #e5e5ea;
    --background: #fafafa;
    --card-background: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.08);
    --pre-sale-bg: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    --after-sale-bg: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    --quick-action-bg: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    background: var(--background);
    color: var(--text-primary);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

.container {
    max-width: 430px;
    margin: 0 auto;
    background: var(--background);
    min-height: 100vh;
    position: relative;
    padding-bottom: 80px;
}

/* 顶部栏 - 售后主题色 */
.top-bar {
    background: linear-gradient(135deg, #fff3e0 0%, #ffffff 100%);
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(255, 152, 0, 0.2);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.page-title .section-icon {
    color: #ff9800;
}

/* 内容区域 */
.support-content {
    padding: 20px;
}

.support-section {
    margin-bottom: 32px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.section-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 售前客服卡片 - 绿色主题，传达友好咨询感 */
.support-card {
    background: var(--card-background);
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.pre-sale-card {
    background: var(--pre-sale-bg);
    border-color: rgba(76, 175, 80, 0.3);
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.15);
}

/* 移除左侧深色侧边 */
/* .pre-sale-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #4caf50 0%, #388e3c 100%);
} */

.card-content {
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.card-description {
    font-size: 15px;
    color: var(--text-primary);
    line-height: 1.7;
    font-weight: 500;
}

/* 操作按钮 */
.action-button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
    position: relative;
    z-index: 1;
}

.action-button.primary {
    background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.3);
}

.action-button.primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
}

.action-button.primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(76, 175, 80, 0.3);
}

.action-button .btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.action-button .btn-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 售后客服列表 - 橙色主题，传达温暖服务感 */
.customer-service-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px;
    background: var(--card-background);
    border-radius: 16px;
    transition: all 0.3s ease;
    border: 2px solid var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.service-item:hover {
    border-color: #ff9800;
    box-shadow: 0 4px 16px rgba(255, 152, 0, 0.15);
    transform: translateY(-2px);
}

.service-item:active {
    transform: translateY(0) scale(0.98);
}

.service-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    font-weight: bold;
    color: white;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(255, 152, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.9);
}

.service-info {
    flex: 1;
    min-width: 0;
}

.service-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.service-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.service-connect-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    border: none;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.service-connect-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.service-connect-btn:active {
    transform: translateY(0) scale(0.95);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

/* 快捷操作 - 紫色主题，传达操作便捷感 */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.quick-action-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--card-background);
    border-radius: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    border: 2px solid var(--border-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.quick-action-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #9c27b0 0%, #7b1fa2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.quick-action-item:hover {
    border-color: #9c27b0;
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.2);
    transform: translateY(-2px);
}

.quick-action-item:hover::before {
    opacity: 1;
}

.quick-action-item:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 10px rgba(156, 39, 176, 0.15);
}

.action-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
    border-radius: 16px;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(156, 39, 176, 0.15);
}

.action-icon svg {
    width: 28px;
    height: 28px;
    display: block;
    stroke: #9c27b0;
}

.action-content {
    flex: 1;
    min-width: 0;
}

.action-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.action-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.action-arrow {
    font-size: 28px;
    color: #9c27b0;
    flex-shrink: 0;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.quick-action-item:hover .action-arrow {
    transform: translateX(4px);
}

/* 弹窗 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--background);
    border-radius: 24px;
    width: 100%;
    max-width: 400px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease;
    border: 1px solid rgba(255, 152, 0, 0.2);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 24px 20px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.05) 0%, transparent 100%);
}

.modal-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: #ff9800;
}

.modal-title-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.modal-close {
    background: var(--secondary-color);
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #e8e8e8;
    transform: rotate(90deg);
}

.modal-close:active {
    background: #d0d0d0;
    transform: scale(0.9) rotate(90deg);
}

.modal-close span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
}

.modal-close span svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.modal-body {
    padding: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.form-label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    color: #ff9800;
}

.form-label-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.form-input {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background: var(--card-background);
}

.form-input:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.1);
}

.form-textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
    min-height: 100px;
    background: var(--card-background);
}

.form-textarea:focus {
    outline: none;
    border-color: #ff9800;
    box-shadow: 0 0 0 4px rgba(255, 152, 0, 0.1);
}

.required-mark {
    color: #f44336;
    margin-left: 4px;
}

.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--secondary-color);
}

.upload-area:hover {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.05);
}

.upload-area:active {
    background: #e8e8e8;
    border-color: #ff9800;
}

.upload-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin-bottom: 12px;
    flex-shrink: 0;
    color: #ff9800;
}

.upload-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

.upload-text {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.upload-hint {
    font-size: 12px;
    color: var(--text-secondary);
}

.image-preview-container {
    margin-top: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.image-preview-item {
    position: relative;
    width: 100%;
    max-width: 200px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.image-preview-item img {
    width: 100%;
    height: auto;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    backdrop-filter: blur(4px);
}

.remove-image-btn:active {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(0.9);
}

.radio-group {
    display: flex;
    gap: 16px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    flex: 1;
    transition: all 0.3s ease;
    background: var(--card-background);
}

.radio-option:hover {
    border-color: #ff9800;
    background: rgba(255, 152, 0, 0.05);
}

.radio-option input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #ff9800;
}

.radio-option input[type="radio"]:checked + span {
    font-weight: 700;
    color: #ff9800;
}

.radio-option span {
    font-size: 14px;
    color: var(--text-primary);
}

.action-buttons {
    display: flex;
    gap: 12px;
    margin-top: 28px;
}

.btn {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 152, 0, 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.3);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: #e8e8e8;
}

.btn-secondary:active {
    transform: scale(0.98);
    background: #d0d0d0;
}

.btn-icon-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.btn-icon-inline svg {
    width: 100%;
    height: 100%;
    display: block;
    stroke: currentColor;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.4;
}

.empty-state-text {
    font-size: 15px;
    font-weight: 500;
}

/* 加载状态 */
.loading-placeholder {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.loading {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top-color: #ff9800;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 加载覆盖层 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.loading-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-content {
    text-align: center;
    padding: 40px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-color);
    border-top: 3px solid #ff9800;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

.loading-content p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

/* 底部导航栏 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: var(--card-background);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-around;
    padding: 12px 0 calc(12px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    padding: 4px 16px;
    border-radius: 12px;
}

.nav-item.active {
    color: #ff9800;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
    color: currentColor;
}

.nav-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
}

.nav-label {
    font-size: 11px;
    font-weight: 500;
}
