/* ==================== CSS变量定义 ==================== */
:root {
    /* 主色调 - 极简蓝灰色系 */
    --primary-color: #667eea;
    --primary-dark: #5568d3;
    --primary-light: #f0f4ff;
    
    /* 强调色 */
    --accent-color: #ff6b6b;
    --accent-hover: #ff5252;
    
    /* 中性色阶 */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* 文字颜色 */
    --text-primary: #2d3748;
    --text-secondary: #4a5568;
    --text-tertiary: #718096;
    
    /* 背景色 */
    --bg-primary: #ffffff;
    --bg-secondary: #f7fafc;
    --bg-tertiary: #edf2f7;
    
    /* 边框 */
    --border-color: #e2e8f0;
    --border-radius-sm: 8px;
    --border-radius-md: 12px;
    --border-radius-lg: 16px;
    
    /* 阴影 */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);
    
    /* 间距 */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    
    /* 字体大小 */
    --font-xs: 12px;
    --font-sm: 14px;
    --font-base: 16px;
    --font-lg: 20px;
    --font-xl: 24px;
    --font-2xl: 32px;
    
    /* 过渡 */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, 
                 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: var(--bg-secondary);
    color: var(--text-primary);
    min-height: 100vh;
    padding: var(--spacing-lg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

header {
    background: var(--bg-primary);
    border-radius: var(--border-radius-lg);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);
}

header h1 {
    font-size: var(--font-2xl);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    text-align: center;
}

.header-banner {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
}

.header-banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    padding: var(--spacing-lg);
    color: white;
}

.banner-overlay p {
    font-size: var(--font-lg);
    font-weight: 500;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.auth-buttons {
    position: absolute;
    top: var(--spacing-md);
    right: var(--spacing-md);
    display: flex;
    gap: var(--spacing-sm);
    z-index: 10;
}

.auth-buttons .btn {
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    border: none;
    padding: 8px 20px;
    font-size: var(--font-sm);
    font-weight: 500;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-base);
}

.auth-buttons .btn:hover {
    background: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

#auth-section {
    display: flex;
    gap: var(--spacing-md);
}

/* 汉堡菜单按钮（桌面端隐藏） */
.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-menu span {
    width: 100%;
    height: 3px;
    background: var(--text-primary);
    border-radius: 3px;
    transition: all var(--transition-base);
}

.hamburger-menu.active span:nth-child(1) {
    transform: translateY(10px) rotate(45deg);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: translateY(-10px) rotate(-45deg);
}

/* 认证区域样式 */
#auth-section {
    display: flex;
    gap: var(--spacing-sm);
}

.tabs {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xl);
    flex-wrap: wrap;
    padding: 0 var(--spacing-md);
}

.tab-btn {
    padding: 10px 20px;
    font-size: var(--font-sm);
    font-weight: 500;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    background: var(--bg-primary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.tab-btn:hover {
    background: var(--primary-light);
    color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

/* 状态筛选按钮样式 */
.status-filter .btn.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    font-weight: 600;
}

.tab-content {
    display: none;
    min-height: 500px;
    animation: fadeIn var(--transition-base);
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: var(--bg-primary);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-xl);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: box-shadow var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card h2 {
    color: var(--text-primary);
    font-size: var(--font-xl);
    font-weight: 600;
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-light);
}

.banner-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: var(--border-radius-md);
    margin-bottom: var(--spacing-lg);
    box-shadow: var(--shadow-sm);
}

.banner-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform var(--transition-base);
}

.banner-image:hover img {
    transform: scale(1.05);
}

.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-group label {
    display: block;
    margin-bottom: var(--spacing-sm);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-sm);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-sm);
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-primary);
    transition: all var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--gray-400);
}

.star-rating {
    display: flex;
    gap: 10px;
    align-items: center;
}

.star-rating input[type="radio"] {
    display: none;
}

.star-rating .star {
    font-size: 32px;
    cursor: pointer;
    color: #ddd;
    transition: color 0.2s;
    user-select: none;
}

.star-rating .star:hover,
.star-rating .star:hover ~ .star {
    color: #ffc107;
}

.star-rating input[type="radio"]:checked ~ .star {
    color: #ffc107;
}

.star-rating input[type="radio"]:checked + .star,
.star-rating input[type="radio"]:checked + .star ~ .star {
    color: #ffc107;
}

.homework-status {
    padding: 10px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    min-height: 44px;
}

.btn,
.btn-primary {
    padding: 10px 24px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--primary-color);
    color: white;
    min-height: 44px;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-secondary {
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-sm);
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-base);
    background: var(--bg-primary);
    color: var(--text-secondary);
    min-height: 44px;
}

.btn-secondary:hover {
    background: var(--gray-100);
    border-color: var(--gray-300);
    color: var(--text-primary);
}

.filter-bar {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

.filter-bar label {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-sm);
}

.filter-bar input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    font-size: var(--font-sm);
}

.homework-item {
    background: var(--bg-primary);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-md);
    border-left: 3px solid var(--primary-color);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
    transition: all var(--transition-base);
}

.homework-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.homework-item.graded {
    border-left-color: #10b981;
}

.homework-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.homework-title-container {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.homework-title {
    color: var(--text-primary);
    margin: 0;
    font-size: var(--font-lg);
    font-weight: 600;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.btn-icon:hover {
    opacity: 1;
}

.homework-info {
    flex: 1;
}

.homework-info h3 {
    color: #333;
    margin-bottom: 5px;
}

.homework-info p {
    color: var(--text-secondary);
    margin: var(--spacing-xs) 0;
    font-size: var(--font-sm);
}

.homework-actions {
    display: flex;
    gap: 10px;
}

.homework-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: var(--font-xs);
    font-weight: 600;
}

.homework-status.pending {
    background: #fef3c7;
    color: #92400e;
}

.homework-status.graded {
    background: #d1fae5;
    color: #065f46;
}

.homework-status.partial {
    background: #fee2e2;
    color: #991b1b;
}

.grade-info {
    margin-top: var(--spacing-sm);
    padding: var(--spacing-md);
    background: #ecfdf5;
    border-radius: var(--border-radius-sm);
    border: 1px solid #a7f3d0;
}

.grade-info strong {
    color: #065f46;
}

.file-link {
    color: #4CAF50;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.file-link:hover {
    text-decoration: underline;
}

.locked-file {
    color: #999;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    transition: all var(--transition-base);
}

.locked-file:hover {
    color: #666;
    text-decoration: underline;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: fadeIn var(--transition-base);
}

.modal-content {
    background-color: var(--bg-primary);
    margin: 5% auto;
    padding: var(--spacing-xl);
    border-radius: var(--border-radius-md);
    width: 90%;
    max-width: 600px;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: slideUp var(--transition-base);
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 登录模态框特殊样式 */
#login-modal .modal-content {
    max-width: 400px;
}

#password-info {
    margin-bottom: 15px;
    padding: 10px;
    background: #fff3cd;
    border-radius: 8px;
    font-size: 14px;
    color: #856404;
}

.close {
    color: var(--gray-400);
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-base);
}

.close:hover {
    color: var(--text-primary);
}

.homework-detail-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.homework-detail-info p {
    margin: 5px 0;
    color: #555;
}

/* 科目上传样式 */
#subjects-container {
    margin-top: var(--spacing-lg);
}

#subjects-container h3 {
    color: var(--primary-color);
    margin-bottom: var(--spacing-lg);
    font-size: var(--font-lg);
    font-weight: 600;
}

.subject-item {
    background: var(--gray-50);
    border-radius: var(--border-radius-sm);
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-left: 3px solid var(--primary-color);
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--primary-color);
}

.subject-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.subject-header h4 {
    color: var(--text-primary);
    margin: 0;
    font-size: var(--font-base);
    font-weight: 600;
}

.btn-add-file {
    padding: 6px 16px;
    font-size: var(--font-sm);
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    cursor: pointer;
    transition: all var(--transition-base);
}

.btn-add-file:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-add-file:disabled {
    background: var(--gray-300);
    cursor: not-allowed;
}

.files-list {
    margin-top: 10px;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: white;
    padding: 10px;
    border-radius: 6px;
    margin-bottom: 8px;
    border: 1px solid #e0e0e0;
}

.file-item-info {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.file-item-name {
    color: #333;
    font-size: 14px;
}

.file-item-size {
    color: #999;
    font-size: 12px;
}

.btn-remove-file {
    padding: 4px 10px;
    font-size: 12px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-remove-file:hover {
    background: #c82333;
}

/* 科目展示样式 */
.subjects-display {
    margin-top: 10px;
}

.subject-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border-left: 3px solid #4CAF50;
}

.subject-display-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.subject-display-name {
    font-weight: 600;
    color: #333;
}

.subject-display-files {
    margin-top: 8px;
}

.subject-display-file {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: white;
    border-radius: 4px;
    margin-right: 5px;
    margin-bottom: 5px;
    border: 1px solid #e0e0e0;
    font-size: 13px;
    color: #4CAF50;
    text-decoration: none;
    transition: all var(--transition-base);
}

.subject-display-file:hover {
    text-decoration: underline;
    background: #f9f9f9;
}

.subject-display-file.locked-file {
    color: #999;
    background: #f5f5f5;
    cursor: pointer;
}

.subject-display-file.locked-file:hover {
    color: #666;
    text-decoration: underline;
    background: #eeeeee;
}

.subject-grade-info {
    margin-top: 8px;
    padding: 8px;
    background: #e8f5e9;
    border-radius: 6px;
}

.homework-status.partial {
    background: #fff3cd;
    color: #856404;
}

/* ==================== 移动端优化 ==================== */

@media (max-width: 768px) {
    body {
        padding: var(--spacing-md);
    }
    
    header {
        flex-direction: row;
        flex-wrap: wrap;
        gap: var(--spacing-md);
        padding: var(--spacing-lg);
        position: relative;
    }
    
    header h1 {
        font-size: var(--font-xl);
        flex: 1;
    }
    
    /* 显示汉堡菜单按钮 */
    .hamburger-menu {
        display: flex;
        order: 2;
    }
    
    #auth-section {
        order: 3;
        width: 100%;
        margin-top: var(--spacing-sm);
    }
    
    /* 移动端按钮样式调整 */
     .auth-buttons {
         position: relative;
         top: 0;
         right: 0;
         justify-content: center;
         width: 100%;
     }
     
     .auth-buttons .btn {
         flex: 1;
         min-width: 120px;
         text-align: center;
     }
     
     /* 移动端图片高度调整 */
     .header-banner {
         height: 100px;
     }
     
     .banner-overlay p {
         font-size: var(--font-base);
     }
    
    /* 移动端导航改为抽屉式 */
    .tabs {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-primary);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 80px var(--spacing-lg) var(--spacing-lg);
        gap: var(--spacing-sm);
        margin: 0;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transition: right var(--transition-base);
        z-index: 1000;
        overflow-y: auto;
    }
    
    .tabs.active {
        right: 0;
    }
    
    .tab-btn {
        width: 100%;
        text-align: left;
        padding: 12px 16px;
        font-size: var(--font-sm);
        flex-shrink: 0;
        border-radius: var(--border-radius-sm);
    }
    
    .card {
        padding: var(--spacing-lg);
        border-radius: var(--border-radius-sm);
    }
    
    .card h2 {
        font-size: var(--font-lg);
    }
    
    .homework-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .homework-actions {
        margin-top: var(--spacing-sm);
        width: 100%;
        flex-wrap: wrap;
    }
    
    .homework-actions .btn {
        flex: 1;
        min-width: 120px;
    }
    
    .filter-bar {
        flex-direction: column;
        align-items: stretch;
        gap: var(--spacing-sm);
    }
    
    .filter-bar input,
    .filter-bar button {
        width: 100%;
    }
    
    .status-filter {
        display: flex;
        gap: var(--spacing-xs);
    }
    
    .status-filter .btn {
        flex: 1;
        font-size: var(--font-xs);
        padding: 8px 12px;
    }
    
    .modal-content {
        width: 95%;
        padding: var(--spacing-lg);
        margin: 10% auto;
    }
    
    .subject-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .btn-add-file {
        width: 100%;
    }
    
    /* 触摸优化 */
    .btn,
    .btn-primary,
    .btn-secondary,
    .tab-btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* 表单优化 */
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* 避免ios自动缩放 */
    }
}

/* ==================== 亲子时光样式 ==================== */

.familytime-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #4CAF50;
}

.familytime-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.familytime-header h3 {
    color: #333;
    margin: 0;
    font-size: 18px;
}

.familytime-description {
    color: #555;
    line-height: 1.6;
    margin: 10px 0;
    white-space: pre-wrap;
}

.familytime-files {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 10px 0;
}

.familytime-files .file-link {
    background: #f0f4ff;
    border: 1px solid #d0d7ff;
    color: #667eea;
}

.familytime-files .file-link:hover {
    background: #667eea;
    color: white;
}

.familytime-files .locked-file {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    color: #999;
    cursor: pointer;
}

.familytime-files .locked-file:hover {
    background: #e0e0e0;
    color: #666;
}

.familytime-time {
    color: #999;
    font-size: 12px;
    margin: 10px 0 0 0;
}

/* ==================== 家长随笔样式 ==================== */

.note-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #FFC107;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.note-header h3 {
    color: #333;
    margin: 0;
    font-size: 18px;
}

.note-content {
    color: #555;
    line-height: 1.8;
    margin: 10px 0;
    white-space: pre-wrap;
}

.note-time {
    color: #999;
    font-size: 12px;
    margin: 10px 0 0 0;
}

/* ==================== 编辑列表样式 ==================== */

.edit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border-left: 3px solid #4CAF50;
}

.edit-item-info {
    flex: 1;
}

.edit-item-info strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.edit-item-info small {
    color: #999;
    margin-right: 15px;
}

.edit-item-actions {
    display: flex;
    gap: 10px;
}

/* ==================== 折叠按钮样式 ==================== */

.toggle-btn {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 12px;
    font-size: 12px;
    cursor: pointer;
    color: #666;
    margin-top: 10px;
    transition: all 0.2s;
}

.toggle-btn:hover {
    background: #e0e0e0;
    color: #333;
}

/* ==================== 地图样式 ==================== */

.familytime-location {
    margin: 15px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
}

.familytime-location span {
    color: #667eea;
    font-weight: 500;
}

.familytime-mini-map {
    border: 1px solid #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    width: 100% !important;
    height: 200px !important;
}

/* 确保Leaflet容器正确显示 */
.leaflet-container {
    height: 100% !important;
    width: 100% !important;
    position: relative !important;
    z-index: 1;
}

/* 地图瓦片层优化 */
.leaflet-tile-pane {
    position: absolute;
}

.leaflet-tile {
    filter: inherit;
    visibility: inherit;
}

/* 大地图容器 */
#familytime-map,
#ft-map {
    width: 100% !important;
    height: 300px !important;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

/* 移动端地图优化 */
@media (max-width: 768px) {
    .familytime-mini-map {
        height: 180px !important;
    }
    
    #familytime-map,
    #ft-map {
        height: 250px !important;
    }
    
    /* 移动端触摸优化 */
    .leaflet-container {
        -webkit-tap-highlight-color: transparent;
        tap-highlight-color: transparent;
    }
    
    .leaflet-touch .leaflet-control-layers,
    .leaflet-touch .leaflet-bar {
        border: 2px solid rgba(0,0,0,0.2);
    }
}


.custom-popup .leaflet-popup-content-wrapper {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.custom-popup .leaflet-popup-content {
    margin: 10px;
}

.custom-popup .leaflet-popup-tip {
    background: white;
}

/* ==================== 孩子标签样式 ==================== */

.child-tag {
    background: #667eea;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
}

/* ==================== 文件链接样式 ==================== */

.file-link {
    display: inline-block;
    padding: 6px 12px;
    background: #e9ecef;
    color: #495057;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s ease;
}

.file-link:hover {
    background: #667eea;
    color: white;
    text-decoration: none;
}

/* ==================== 折叠内容初始隐藏 ==================== */

.familytime-files[data-is-long="true"] {
    display: none;
}

/* ==================== 关于我页面样式 ==================== */

.about-content {
    line-height: 1.8;
    color: #333;
}

.about-content p {
    margin-bottom: 15px;
}

.about-content strong {
    color: #667eea;
}

.about-content ul {
    margin: 15px 0;
    padding-left: 25px;
}

.about-content li {
    margin-bottom: 8px;
    color: #555;
}

.about-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.about-link:hover {
    color: #764ba2;
    text-decoration: underline;
}

/* ==================== 页脚样式 ==================== */

footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    border-radius: var(--border-radius-md);
    padding: var(--spacing-xl);
    margin-top: 60px;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-content p {
    color: var(--text-secondary);
    margin: 0;
    font-size: var(--font-sm);
    line-height: 1.8;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all var(--transition-base);
    font-weight: 500;
}

.footer-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==================== 浮动联系按钮 ==================== */

.floating-contact {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.4);
    transition: all var(--transition-base);
    z-index: 999;
    animation: float 3s ease-in-out infinite;
}

.floating-contact:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.floating-contact svg {
    width: 24px;
    height: 24px;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

@media (max-width: 768px) {
    .floating-contact {
        bottom: 20px;
        right: 20px;
        width: 48px;
        height: 48px;
    }
}

/* ==================== 图片懒加载 ==================== */

img[data-src] {
    opacity: 0;
    transition: opacity var(--transition-base);
}

img[data-src].loaded {
    opacity: 1;
}

/* 图片加载占位符 */
img[data-src]:not(.loaded) {
    background: var(--gray-100);
    min-height: 200px;
}

/* ==================== 移动端菜单遮罩 ==================== */

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.menu-overlay.active {
    display: block;
    opacity: 1;
}
