/*
Theme Name: 乐途慢享 Letumx
Theme URI: https://www.letumx.com
Author: Letumx Team
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.0
License: GPL v2
Text Domain: letumx
*/

/* ===== 基础重置 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul, ol { list-style: none; }

/* ===== 变量 ===== */
:root {
    --primary: #B71C1C;
    --primary-light: #D32F2F;
    --primary-dark: #7F0000;
    --text: #2D1810;
    --text-light: #5D4037;
    --text-muted: #8D6E63;
    --bg: #FFFBF0;
    --bg-alt: #F5EDE0;
    --white: #FFFFFF;
    --border: #E0D5C8;
    --shadow: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 16px rgba(0,0,0,0.12);
    --radius: 8px;
}

/* ===== 基础 ===== */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

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

/* ===== 主内容区域间距 ===== */
.site-main {
    padding-top: 30px;
}

/* Hero 区域不需要顶部间距 */
.home-main {
    padding-top: 0;
}

/* ===== 通用页面样式 ===== */
.page-main {
    padding-top: 40px;
    padding-bottom: 60px;
    min-height: calc(100vh - 200px);
}

.page-content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    padding-bottom: 16px;
    border-bottom: 3px solid var(--primary);
}

/* 使用指南 */
.guide-section {
    margin-bottom: 30px;
    padding: 24px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.guide-section h2 {
    font-size: 22px;
    margin-bottom: 16px;
    color: var(--primary);
}

.guide-section ol,
.guide-section ul {
    padding-left: 24px;
    line-height: 2;
}

.guide-section li {
    margin-bottom: 4px;
}

/* 常见问题 */
.faq-item {
    margin-bottom: 16px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.faq-question {
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    border-left: 4px solid var(--primary);
}

.faq-answer {
    padding: 16px 24px;
    padding-top: 0;
    color: var(--text-light);
    line-height: 1.8;
}

.faq-answer ul {
    padding-left: 24px;
    margin-top: 8px;
}

/* 联系我们 */
.contact-intro {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 30px;
    line-height: 1.8;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.contact-method {
    text-align: center;
    padding: 30px 20px;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-icon {
    font-size: 40px;
    margin-bottom: 16px;
}

.contact-method h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.contact-method p {
    color: var(--text-light);
    font-size: 14px;
}

.contact-form-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.contact-form-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 无障碍工具栏 ===== */
.accessibility-toolbar {
    background: #f8f8f8;
    border-bottom: 1px solid var(--border);
    padding: 8px 0;
    text-align: center;
    font-size: 14px;
}

.a11y-label {
    color: var(--text-muted);
    margin-right: 10px;
}

.a11y-btn {
    width: 36px;
    height: 36px;
    margin: 0 4px;
    border: 1px solid var(--border);
    background: var(--white);
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.a11y-btn:hover {
    background: var(--bg-alt);
}

/* ===== 头部 ===== */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    margin: 0;
    line-height: 1.2;
}

.site-title a { 
    color: var(--primary); 
}

.site-description {
    font-size: 12px;
    color: var(--text-muted);
    margin: 2px 0 0 0;
}

/* ===== 主导航 ===== */
.main-navigation {
    flex: 1;
    margin: 0 30px;
}

.primary-menu {
    display: flex;
    gap: 30px;
    justify-content: center;
}

.primary-menu a {
    color: var(--text);
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    position: relative;
}

.primary-menu a:hover {
    color: var(--primary);
}

.primary-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

.primary-menu a:hover::after {
    width: 100%;
}

/* ===== 头部操作区 ===== */
.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-toggle,
.user-link,
.mobile-menu-toggle {
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 20px;
}

.search-toggle:hover,
.user-link:hover {
    color: var(--primary);
}

.login-link {
    padding: 8px 16px;
    background: var(--primary);
    color: var(--white);
    border-radius: var(--radius);
    font-size: 14px;
}

.login-link:hover {
    background: var(--primary-dark);
}

.mobile-menu-toggle {
    display: none;
}

/* ===== 搜索覆盖层 ===== */
.search-overlay {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 20px 0;
    box-shadow: var(--shadow);
}

.search-overlay.active {
    display: block;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-field {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
}

.search-field:focus {
    outline: none;
    border-color: var(--primary);
}

.search-submit {
    padding: 12px 24px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
}

.search-close {
    padding: 12px 16px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
}

/* ===== 移动端菜单 ===== */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    z-index: 99;
    padding: 20px;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-menu-list a {
    display: block;
    padding: 15px;
    font-size: 18px;
    border-bottom: 1px solid var(--border);
}

/* ===== Hero ===== */
.hero-section {
    position: relative;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
    /* 渐变色备用背景（当背景图片未加载时显示） */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    /* 渐变色备用背景 */
    background-color: #764ba2;
    background-image: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 60px 20px;
}

.hero-title {
    font-size: 42px;
    margin-bottom: 16px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 18px;
    opacity: 0.95;
    margin-bottom: 32px;
}

.hero-search-form {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 10px;
}

.hero-search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
}

.hero-search-submit {
    padding: 15px 30px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
}

.hero-search-submit:hover {
    background: var(--primary-light);
}

.hero-quick-links {
    margin-top: 30px;
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-btn {
    padding: 12px 24px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: var(--radius);
    transition: all 0.3s;
    font-weight: 500;
}

.hero-btn:hover {
    background: rgba(255,255,255,0.3);
    border-color: rgba(255,255,255,0.5);
}

/* ===== 快速入口 ===== */
.quick-entry-section {
    padding: 60px 0;
    background: var(--bg-alt);
}

.quick-entry-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.quick-entry-card {
    background: var(--white);
    padding: 30px 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.quick-entry-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.quick-entry-icon {
    font-size: 36px;
    color: var(--primary);
    margin-bottom: 12px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quick-entry-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text);
}

.quick-entry-desc {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 板块区域 ===== */
.section-block {
    padding: 80px 0;
}

.section-block:nth-child(even) {
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 32px;
    margin-bottom: 12px;
    color: var(--text);
    font-weight: 700;
}

.section-desc {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 16px;
}

.section-more {
    color: var(--primary);
    font-weight: 600;
    font-size: 16px;
}

.section-more:hover {
    text-decoration: underline;
}

.subsection-title {
    font-size: 22px;
    margin: 40px 0 20px;
    color: var(--text);
}

/* ===== 卡片网格 ===== */
.card-grid {
    display: grid;
    gap: 24px;
}

.card-grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.card-grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.card-grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* ===== 卡片 ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    display: block;
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

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

.tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--bg-alt);
    color: var(--text-light);
    font-size: 12px;
    border-radius: 20px;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.4;
}

.card-title a {
    color: var(--text);
}

.card-title a:hover {
    color: var(--primary);
}

.card-text {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
    margin-bottom: 16px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== 无内容提示 ===== */
.no-content {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-alt);
    border-radius: var(--radius);
}

.no-content p {
    color: var(--text-light);
    margin-bottom: 10px;
}

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

/* ===== 页脚 ===== */
.site-footer {
    background: #2D1810;
    color: #D7CCC8;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col-title {
    color: white;
    font-size: 18px;
    margin-bottom: 20px;
    font-weight: 600;
}

.footer-link-list li {
    margin-bottom: 12px;
}

.footer-link-list a {
    color: #D7CCC8;
    font-size: 14px;
}

.footer-link-list a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 14px;
}

.footer-icp {
    margin-top: 6px;
}

.footer-icp a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
}

.footer-icp a:hover {
    color: rgba(255,255,255,0.9);
    text-decoration: underline;
}

.footer-qrcode {
    margin-top: 12px;
}

.footer-qrcode img {
    width: 120px;
    height: 120px;
    border-radius: 8px;
    border: 2px solid rgba(255,255,255,0.2);
}

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 98;
    box-shadow: var(--shadow);
}

.back-to-top:hover {
    background: var(--primary-dark);
}

.back-to-top.visible {
    display: flex;
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .quick-entry-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .card-grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .main-navigation {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .hero-search-form {
        flex-direction: column;
    }
    
    .quick-entry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .card-grid-2,
    .card-grid-3,
    .card-grid-4 {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 28px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .quick-entry-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== 用户中心 ===== */
.user-center-main {
    padding-top: 40px;
    padding-bottom: 60px;
    min-height: calc(100vh - 200px);
}

.user-profile-card {
    display: flex;
    align-items: center;
    gap: 30px;
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

.user-avatar img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info {
    flex: 1;
}

.user-name {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.user-bio {
    color: var(--text-light);
    margin-bottom: 8px;
}

.user-website {
    color: var(--primary);
    font-size: 14px;
}

.btn-logout {
    white-space: nowrap;
}

.user-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 10px;
    overflow-x: auto;
}

.user-tab-item {
    padding: 12px 24px;
    color: var(--text-light);
    font-weight: 500;
    border-radius: var(--radius);
    transition: all 0.3s;
    white-space: nowrap;
}

.user-tab-item:hover {
    background: var(--bg-alt);
    color: var(--text);
}

.user-tab-item.active {
    background: var(--primary);
    color: var(--white);
}

.user-tab-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.tab-panel {
    animation: fadeIn 0.3s ease;
}

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

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}

.panel-title {
    font-size: 20px;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p {
    margin-bottom: 20px;
}

.applications-list,
.messages-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.application-item,
.message-item {
    padding: 20px;
    background: var(--bg);
    border-radius: var(--radius);
    border-left: 4px solid var(--primary);
}

.message-item.unread {
    border-left-color: var(--primary);
    background: #FFF8E1;
}

.message-item.read {
    border-left-color: var(--border);
}

.settings-form-wrapper {
    max-width: 600px;
}

.settings-form .form-group {
    margin-bottom: 24px;
}

.settings-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-actions {
    margin-top: 30px;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
}
