/* ==================== 全局样式 ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 温暖、柔和的配色 */
    --primary-color: #ff6b6b;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #dfe6e9;
    --success-color: #00b894;
    --warning-color: #fdcb6e;
    --danger-color: #d63031;
    
    /* 阴影效果 */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);
    
    /* 圆角 */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

body {
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    font-size: 18px; /* 适合老年人的大字体 */
    line-height: 1.8;
    color: var(--text-dark);
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 头部样式 ==================== */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: 2px;
}

.voice-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid white;
    color: white;
    padding: 12px 24px;
    font-size: 20px;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
}

.voice-btn:hover {
    background: white;
    color: #667eea;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==================== 主导航样式 ==================== */
.main-nav {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    padding: 15px 0;
    position: sticky;
    top: 80px;
    z-index: 999;
}

.main-nav .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 10px;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dark);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    min-width: 100px;
}

.nav-item .icon {
    font-size: 32px;
    margin-bottom: 8px;
}

.nav-item span:not(.icon) {
    font-size: 16px;
    font-weight: bold;
}

.nav-item:hover,
.nav-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

/* ==================== 欢迎横幅 ==================== */
.hero {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
    padding: 40px 0;
    margin-bottom: 40px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    margin-top: 20px;
}

.hero-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    text-align: center;
}

.hero-subtitle {
    font-size: 22px;
    text-align: center;
    margin-bottom: 30px;
    opacity: 0.95;
}

.quick-info {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.info-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 20px 30px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    min-width: 200px;
}

.info-icon {
    font-size: 40px;
}

.info-label {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 5px;
}

.info-value {
    font-size: 24px;
    font-weight: bold;
}

/* ==================== 功能模块网格 ==================== */
.modules {
    padding: 40px 0;
}

.section-title {
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    margin-bottom: 40px;
    color: var(--text-dark);
}

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.module-card {
    background: var(--bg-white);
    padding: 30px;
    border-radius: var(--radius-xl);
    text-decoration: none;
    color: var(--text-dark);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.module-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.module-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.module-card:hover::before {
    transform: scaleX(1);
}

.module-icon {
    font-size: 56px;
    margin-bottom: 20px;
}

.module-card h3 {
    font-size: 26px;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.module-card p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.module-badge {
    display: inline-block;
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    color: var(--text-dark);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
}

/* ==================== 温馨助手 ==================== */
.assistant {
    padding: 20px 0 40px;
}

.assistant-card {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    padding: 30px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: var(--shadow-md);
}

.assistant-icon {
    font-size: 64px;
}

.assistant-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.assistant-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ==================== 子女监控入口 ==================== */
.family-monitor {
    padding: 20px 0 40px;
}

.monitor-card {
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    padding: 30px;
    border-radius: var(--radius-xl);
    display: flex;
    align-items: center;
    gap: 30px;
    box-shadow: var(--shadow-md);
}

.monitor-icon {
    font-size: 64px;
}

.monitor-content h3 {
    font-size: 28px;
    margin-bottom: 10px;
    color: var(--text-dark);
}

.monitor-content p {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 20px;
}

/* ==================== 按钮样式 ==================== */
.btn-primary,
.btn-secondary,
.btn-success,
.btn-danger {
    padding: 14px 32px;
    font-size: 20px;
    font-weight: bold;
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: linear-gradient(135deg, #4ecdc4 0%, #44a08d 100%);
    color: white;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

/* ==================== 紧急求助按钮 ==================== */
.emergency-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #ff6b6b 0%, #d63031 100%);
    color: white;
    padding: 20px 30px;
    border-radius: 50px;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 20px;
    font-weight: bold;
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.emergency-btn:hover {
    transform: scale(1.1);
}

.emergency-icon {
    font-size: 28px;
    animation: shake 0.5s infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 107, 107, 0.7);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(255, 107, 107, 0);
    }
}

@keyframes shake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

/* ==================== 底部样式 ==================== */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 60px;
}

.footer p {
    font-size: 16px;
    margin-bottom: 10px;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .logo h1 {
        font-size: 22px;
    }
    
    .voice-btn {
        font-size: 16px;
        padding: 10px 18px;
    }
    
    .nav-item {
        min-width: 80px;
        padding: 12px 15px;
    }
    
    .nav-item .icon {
        font-size: 28px;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 18px;
    }
    
    .module-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .assistant-card,
    .monitor-card {
        flex-direction: column;
        text-align: center;
    }
    
    .emergency-btn {
        bottom: 20px;
        right: 20px;
        padding: 15px 20px;
        font-size: 16px;
    }
}

/* ==================== 辅助类 ==================== */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 20px;
}

.hidden {
    display: none;
}
