/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(180deg, #F0F4FF 0%, #FFFFFF 100%);
    min-height: 100vh;
    padding-bottom: 70px;
}

.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 16px;
}

/* 首页 - 挽回通话模块 */
.hero-section {
    background: linear-gradient(135deg, #E8EEFF 0%, #F5F7FF 100%);
    border-radius: 20px;
    padding: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(107, 140, 255, 0.1);
}

.hero-content {
    flex: 1;
}

.hero-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin-bottom: 8px;
}

.hero-subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 16px;
}

.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    color: white;
    padding: 12px 32px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(107, 140, 255, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 2px 10px rgba(107, 140, 255, 0.3);
}

.hero-image {
    flex-shrink: 0;
}

/* 功能卡片 */
.feature-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.red-card {
    border-top: 3px solid #FF6B6B;
}

.blue-card {
    border-top: 3px solid #6B8CFF;
}

.card-icon {
    margin-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.card-desc {
    font-size: 12px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 12px;
    min-height: 60px;
}

.card-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #6B8CFF;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
}

.red-card .card-link {
    color: #FF6B6B;
}

/* 底部导航 */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    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: #999;
    font-size: 12px;
    padding: 4px 16px;
}

.nav-item.active {
    color: #6B8CFF;
}

/* 挽回通话页面 */
.call-page {
    background: linear-gradient(180deg, #6B8CFF 0%, #8BA4FF 100%);
    min-height: 100vh;
    padding-bottom: 70px;
}

.call-header {
    display: flex;
    align-items: center;
    padding: 16px;
    color: white;
    position: relative;
}

.back-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 20px;
}

.call-title {
    flex: 1;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.call-content {
    padding: 20px 16px;
}

.call-banner {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.banner-text h2 {
    color: white;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 8px;
}

.banner-text p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
}

.banner-illustration svg {
    width: 100px;
    height: 100px;
}

.call-notice {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.call-notice h4 {
    color: #333;
    font-size: 14px;
    margin-bottom: 12px;
}

.notice-list {
    list-style: none;
}

.notice-list li {
    color: #FF4444;
    font-size: 12px;
    line-height: 1.8;
    padding-left: 12px;
    position: relative;
}

.notice-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 4px;
    height: 4px;
    background: #FF4444;
    border-radius: 50%;
}

.call-form {
    background: white;
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 16px;
}

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

.phone-input {
    width: 100%;
    padding: 16px;
    border: 1px solid #E5E5E5;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

.phone-input:focus {
    border-color: #6B8CFF;
}

.phone-input::placeholder {
    color: #999;
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background: #CCC;
    cursor: not-allowed;
}

.service-link {
    text-align: center;
    color: #6B8CFF;
    font-size: 14px;
    text-decoration: none;
    display: block;
}

/* 结果页面 */
.result-page {
    background: #F5F7FF;
    min-height: 100vh;
    padding: 20px 16px 70px;
}

.result-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.result-header .back-btn {
    background: #6B8CFF;
    color: white;
}

.result-header h1 {
    flex: 1;
    text-align: center;
    font-size: 18px;
    color: #333;
}

.loading-container {
    background: white;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    margin-bottom: 20px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #E8EEFF;
    border-top-color: #6B8CFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #333;
    margin-bottom: 8px;
}

.loading-subtext {
    font-size: 14px;
    color: #999;
}

.order-info {
    background: white;
    border-radius: 16px;
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #F0F0F0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    color: #666;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.call-btn {
    display: block;
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    color: white;
    text-align: center;
    text-decoration: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 20px;
}

/* 模态框 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    max-width: 280px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid #E8EEFF;
    border-top-color: #6B8CFF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.modal-text {
    font-size: 16px;
    color: #333;
    line-height: 1.5;
}

/* 后台管理样式 */
.admin-body {
    background: #F5F7FA;
    padding: 0;
}

.admin-header {
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.admin-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.admin-nav {
    display: flex;
    background: white;
    padding: 0 16px;
    border-bottom: 1px solid #E8E8E8;
    overflow-x: auto;
}

.admin-nav a {
    padding: 16px 20px;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.admin-nav a.active,
.admin-nav a:hover {
    color: #6B8CFF;
    border-bottom-color: #6B8CFF;
}

.admin-content {
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

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

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.stat-card h3 {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.stat-card .number {
    font-size: 28px;
    font-weight: 700;
    color: #333;
}

.stat-card.primary .number {
    color: #6B8CFF;
}

.stat-card.success .number {
    color: #52C41A;
}

.stat-card.warning .number {
    color: #FAAD14;
}

.search-bar {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.search-bar input,
.search-bar select {
    padding: 10px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 8px;
    font-size: 14px;
    outline: none;
}

.search-bar input:focus,
.search-bar select:focus {
    border-color: #6B8CFF;
}

.search-bar input {
    flex: 1;
    min-width: 200px;
}

.search-bar button {
    padding: 10px 24px;
    background: #6B8CFF;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
}

.data-table {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.data-table table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px;
    text-align: left;
    font-size: 14px;
}

.data-table th {
    background: #F8F9FA;
    color: #666;
    font-weight: 500;
}

.data-table td {
    border-bottom: 1px solid #F0F0F0;
    color: #333;
}

.data-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.status-pending {
    background: #FFF7E6;
    color: #FA8C16;
}

.status-paid {
    background: #F6FFED;
    color: #52C41A;
}

.status-processing {
    background: #E6F7FF;
    color: #1890FF;
}

.status-completed {
    background: #F6FFED;
    color: #52C41A;
}

.status-cancelled {
    background: #FFF1F0;
    color: #FF4D4F;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 20px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
}

.pagination a {
    background: white;
    color: #666;
    border: 1px solid #E5E5E5;
}

.pagination a:hover {
    border-color: #6B8CFF;
    color: #6B8CFF;
}

.pagination span {
    background: #6B8CFF;
    color: white;
}

/* 登录页面 */
.login-page {
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.login-box h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #666;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #E5E5E5;
    border-radius: 10px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #6B8CFF;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #6B8CFF 0%, #8BA4FF 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 10px;
}

.error-msg {
    color: #FF4D4F;
    font-size: 14px;
    margin-top: 10px;
    text-align: center;
}

/* 响应式优化 */
@media (max-width: 480px) {
    .feature-cards {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        flex-direction: column;
        text-align: center;
    }
    
    .hero-image {
        margin-top: 20px;
    }
    
    .call-banner {
        flex-direction: column;
        text-align: center;
    }
    
    .banner-illustration {
        margin-top: 20px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        overflow-x: auto;
    }
    
    .data-table table {
        min-width: 800px;
    }
}
