/* ========================================
   SH365教程网 - 现代简约风格
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    /* 主题色 - 蓝色系 */
    --primary: #2563eb;
    --primary-light: #3b82f6;
    --primary-dark: #1e40af;
    
    /* 辅助色 */
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    
    /* 中性色 */
    --gray-50: #fafafa;
    --gray-100: #f4f4f5;
    --gray-200: #e4e4e7;
    --gray-300: #d4d4d8;
    --gray-600: #52525b;
    --gray-700: #3f3f46;
    --gray-900: #18181b;
    
    /* 文字 */
    --text-primary: #18181b;
    --text-secondary: #71717a;
    
    /* 其他 */
    --white: #ffffff;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 
                 'Microsoft YaHei', sans-serif;
    background: var(--gray-50);
    color: var(--text-primary);
    line-height: 1.6;
}

/* 顶部导航 */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-back {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-action {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-service {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
}

.service-icon-img {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 48px 16px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.15) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(20px, 20px) scale(1.1); }
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-desc {
    font-size: 15px;
    opacity: 0.95;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* 主容器 */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* 客服卡片 */
.service-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-xl);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.service-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
}

.service-banner:active {
    transform: translateY(-2px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.service-banner-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.service-banner-text h3 {
    font-size: 18px;
    margin-bottom: 4px;
    font-weight: 600;
}

.service-banner-text p {
    font-size: 14px;
    opacity: 0.95;
}

/* 分类卡片 */
.category-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 14px;
}

.category-card {
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.1) 0%, transparent 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.category-card:active {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl);
    border-color: var(--primary);
}

.category-card:active::before {
    transform: scaleX(1);
}

.category-card:active::after {
    width: 300px;
    height: 300px;
}

.category-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    color: var(--primary);
}

.category-icon svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.service-banner-icon {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.category-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.category-meta {
    font-size: 13px;
    color: var(--text-secondary);
    position: relative;
    z-index: 1;
}

/* 教程列表 */
.tutorial-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tutorial-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.tutorial-header {
    background: var(--gray-50);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.tutorial-number {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    flex-shrink: 0;
}

.tutorial-info {
    flex: 1;
}

.tutorial-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 2px;
}

.tutorial-badge {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
}

.tutorial-body {
    padding: 16px;
}

.tutorial-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 14px;
}

.btn-tutorial {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-tutorial:active {
    transform: scale(0.98);
}

/* FAQ */
.faq-card {
    background: var(--white);
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.faq-question {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.faq-number {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.faq-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 32px;
}

.faq-answer {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.8;
    padding-left: 44px;
}

/* 信息卡片 */
.info-card {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.info-card h3 {
    font-size: 17px;
    margin-bottom: 12px;
}

.info-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.contact-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    text-align: center;
    border-radius: 8px;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.contact-btn:active {
    transform: scale(0.98);
}

/* 联系卡片 */
.contact-card {
    background: var(--white);
    border-radius: 16px;
    padding: 0;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.contact-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-header svg {
    flex-shrink: 0;
}

.contact-header h3 {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.contact-desc {
    padding: 20px;
    background: var(--gray-50);
}

.contact-desc p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin: 0 0 12px 0;
}

.work-time {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--white);
    border-radius: 8px;
    border-left: 3px solid var(--primary);
    font-size: 13px;
    color: var(--text-primary);
}

.work-time svg {
    color: var(--primary);
    flex-shrink: 0;
}

.contact-methods {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-method {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: 12px;
    border: 1px solid var(--gray-200);
    transition: all 0.3s;
}

.contact-method.wechat {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.contact-method.wechat:active {
    transform: scale(0.98);
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-color: var(--primary);
}

.contact-method.phone {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-color: #fbbf24;
}

.method-icon {
    width: 48px;
    height: 48px;
    background: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.contact-method.wechat .method-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
}

.contact-method.phone .method-icon {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: var(--white);
}

.method-info {
    flex: 1;
}

.method-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.method-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.method-phone {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-dark);
    letter-spacing: 0.5px;
}

.method-arrow {
    color: var(--text-secondary);
    flex-shrink: 0;
}

.contact-footer {
    padding: 16px 20px;
    text-align: center;
    font-size: 13px;
    color: var(--text-secondary);
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}

.phone-card {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    border: 1px solid #93c5fd;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    margin: 16px 0;
}

.phone-label {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.phone-number {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 1px;
}

/* 服务网格 */
.service-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.service-item {
    background: var(--white);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.service-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: var(--primary);
}

.service-item h4 {
    font-size: 15px;
    margin-bottom: 6px;
}

.service-item p {
    font-size: 13px;
    color: var(--text-secondary);
}

/* 加载动画 - 全新设计 */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* 加载动画容器 */
.spinner {
    position: relative;
    width: 80px;
    height: 80px;
}

/* 外圈旋转 */
.spinner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 4px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--white);
    border-radius: 50%;
    animation: spin 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

/* 内圈反向旋转 */
.spinner::after {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    width: calc(100% - 20px);
    height: calc(100% - 20px);
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-bottom-color: var(--white);
    border-radius: 50%;
    animation: spin-reverse 0.8s linear infinite;
}

/* 中心点脉动 */
.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    background: var(--white);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 1.5s ease-in-out infinite;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes spin-reverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes pulse {
    0%, 100% { 
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.7;
    }
}

/* 加载文字 */
.loading-text {
    margin-top: 32px;
    color: var(--white);
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    animation: fade 2s ease-in-out infinite;
}

@keyframes fade {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* 装饰性粒子效果 */
.loading-overlay::before,
.loading-overlay::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    animation: float-particle 4s ease-in-out infinite;
}

.loading-overlay::before {
    width: 100px;
    height: 100px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.loading-overlay::after {
    width: 150px;
    height: 150px;
    bottom: 15%;
    right: 10%;
    animation-delay: 2s;
}

@keyframes float-particle {
    0%, 100% { 
        transform: translate(0, 0) scale(1);
        opacity: 0.3;
    }
    50% { 
        transform: translate(30px, -30px) scale(1.2);
        opacity: 0.6;
    }
}

/* 隐藏类 */
.hidden {
    display: none !important;
}

/* 响应式 */
@media (max-width: 375px) {
    .hero-title {
        font-size: 22px;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
