/* ==================== 变量定义 ==================== */
:root {
    --primary-blue: #004080;
    --primary-light-blue: #0066cc;
    --primary-yellow: #ffd633;
    --primary-light-yellow: #ffe066;
    --dark-gray: #333333;
    --medium-gray: #666666;
    --light-gray: #f5f7fa;
    --white: #ffffff;
    --green: #27ae60;
    --red: #e74c3c;
    --orange: #f39c12;
    --purple: #8e44ad;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --border-radius: 12px;
    --transition: all 0.3s ease;
}

/* ==================== 基础重置 ==================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-gray);
    background-color: var(--light-gray);
    line-height: 1.7;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--primary-blue);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ==================== 按钮样式 ==================== */
.btn {
    display: inline-block;
    padding: 16px 36px;
    background-color: var(--primary-yellow);
    color: var(--primary-blue);
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    box-shadow: var(--shadow);
    text-decoration: none;
    width: 100%;
}

.btn:hover {
    background-color: var(--primary-light-yellow);
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-light-blue);
}

.btn-success {
    background-color: var(--green);
    color: var(--white);
}

.btn-success:hover {
    background-color: #229954;
}

.btn-orange {
    background-color: var(--orange);
    color: var(--white);
}

.btn-orange:hover {
    background-color: #e67e22;
}

.btn-secondary {
    background-color: var(--medium-gray);
    color: white;
}

.btn-secondary:hover {
    background-color: #555;
}

.btn:disabled, .btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== Logo图片 ==================== */
.logo img {
    height: 40px;
    width: auto;
    transition: height 0.3s ease;
}

/* ==================== 头部 ==================== */
.main-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light-blue) 100%);
    color: var(--white);
    padding: 30px 0;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
}

.main-header h1 {
    color: var(--white);
    font-size: 2.8rem;
    margin-bottom: 10px;
}

.main-header p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* ==================== 语言切换 ==================== */
.language-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    gap: 10px;
}

.lang-btn {
    background: var(--white);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 70px;
    justify-content: center;
}

.lang-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.lang-btn.active {
    background: var(--primary-yellow);
    color: var(--primary-blue);
}

/* ==================== 导航栏 ==================== */
.main-nav {
    background-color: var(--white);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    position: relative;
    min-height: 70px;
    box-sizing: border-box;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: opacity 0.3s ease;
    z-index: 102;
}

.logo i {
    color: var(--primary-yellow);
}

.logo img {
    height: 50px;
    width: auto;
    margin-right: 5px;
}

.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 102;
    position: relative;
}

.hamburger span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 10px;
    transition: all 0.3s ease;
    transform-origin: left center;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, -2px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, 2px);
}

.nav-links {
    display: flex;
    gap: 25px;
    align-items: center;
    transition: all 0.3s ease;
}

.nav-links a {
    color: var(--dark-gray);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
    padding: 8px 0;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--primary-blue);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
    padding: 8px 16px;
    background: var(--light-gray);
    border-radius: 40px;
    transition: var(--transition);
}

.user-info:hover {
    background: #e8eef5;
}

.user-info span {
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.95rem;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
    padding: 5px;
    font-size: 0.9rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-hover);
    min-width: 220px;
    display: none;
    z-index: 1000;
    margin-top: 8px;
    border: 1px solid var(--light-gray);
    overflow: hidden;
}

.user-dropdown.show {
    display: block;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    color: var(--dark-gray);
    text-decoration: none;
    transition: var(--transition);
    border-bottom: 1px solid var(--light-gray);
    font-size: 0.95rem;
    font-weight: 500;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background: var(--light-gray);
    color: var(--primary-blue);
    padding-left: 22px;
}

.user-dropdown a i {
    width: 24px;
    font-size: 1.1rem;
    color: var(--primary-blue);
    text-align: center;
}

.admin-access {
    display: none;
}

.admin-btn {
    background: var(--purple);
    color: white !important;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    font-size: 0.95rem;
    white-space: nowrap;
    min-width: 150px;
    justify-content: center;
    text-align: center;
}

.admin-btn:hover {
    background: #5b2c6f;
    transform: translateY(-2px);
    color: white !important;
}

.admin-btn i {
    color: white !important;
    font-size: 1rem;
}

/* ==================== Hero区域 ==================== */
.hero {
    background: linear-gradient(rgba(0, 64, 128, 0.9), rgba(0, 102, 204, 0.9)), url('https://images.unsplash.com/photo-1583409899067-19f1d1997d41?ixlib=rb-4.0.3&auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 0;
    text-align: center;
}

.hero h2 {
    color: var(--white);
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto 40px;
    opacity: 0.9;
}

/* ==================== 测试卡片 ==================== */
.test-cards {
    padding: 80px 0;
    background-color: var(--white);
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.section-title p {
    color: var(--medium-gray);
    max-width: 700px;
    margin: 0 auto;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.test-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.test-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-blue);
}

.card-header {
    padding: 30px;
    text-align: center;
    background-color: var(--primary-blue);
    color: var(--white);
}

.card-header h3 {
    color: var(--white);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.card-price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-yellow);
}

.card-body {
    padding: 30px;
}

.features-list {
    list-style: none;
    margin-bottom: 30px;
}

.features-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    gap: 10px;
}

.features-list li i {
    color: var(--green);
}

.features-list li:last-child {
    border-bottom: none;
}

.password-info {
    background-color: rgba(243, 156, 18, 0.1);
    border: 2px solid var(--orange);
    border-radius: var(--border-radius);
    padding: 15px;
    margin: 20px 0;
    text-align: center;
}

.password-info p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--dark-gray);
}

.password-info a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: none;
}

.protected-link {
    position: relative;
}

.protected-link.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ==================== 主题卡片网格 ==================== */
.themes-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.theme-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 280px;
}

.theme-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.theme-icon {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 15px;
    flex-shrink: 0;
}

.theme-card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
    line-height: 1.4;
}

.theme-card p {
    color: var(--medium-gray);
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    flex-grow: 1;
}

.theme-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.9rem;
    flex-shrink: 0;
}

/* ==================== 文章内容 ==================== */
.policy-content {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.article-content {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 50px;
    box-shadow: var(--shadow);
    line-height: 1.8;
}

.article-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 3px solid var(--primary-yellow);
}

.article-header h2 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.article-meta {
    color: var(--medium-gray);
    font-size: 0.9rem;
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.article-image {
    width: 100%;
    height: 400px;
    border-radius: var(--border-radius);
    margin: 30px 0;
    overflow: hidden;
    position: relative;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.article-image:hover img {
    transform: scale(1.05);
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: var(--white);
    padding: 10px 15px;
    font-size: 0.85rem;
}

.content-section {
    margin-bottom: 40px;
}

.content-section h3 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--primary-blue);
    padding-left: 15px;
    border-left: 4px solid var(--primary-yellow);
}

.content-section p {
    margin-bottom: 20px;
    text-align: justify;
}

.highlight-box {
    background-color: rgba(0, 64, 128, 0.05);
    border-left: 4px solid var(--primary-blue);
    padding: 25px;
    border-radius: 0 8px 8px 0;
    margin: 25px 0;
}

/* ==================== FAQ ==================== */
.faq-section {
    padding: 80px 0;
    background-color: var(--white);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    margin-bottom: 20px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    overflow: hidden;
    cursor: pointer;
}

.faq-question {
    padding: 20px;
    background: var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    transition: var(--transition);
}

.faq-question i {
    transition: var(--transition);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.active .faq-question {
    background: var(--primary-blue);
    color: var(--white);
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 1000px;
}

/* ==================== 模态框 ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
}

.modal.show {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h3 {
    color: white;
    margin: 0;
    font-size: 1.3rem;
}

.modal-header .close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
    padding: 0 10px;
}

.modal-body {
    padding: 30px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--dark-gray);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.form-group label i {
    color: var(--primary-blue);
    width: 20px;
}

.form-group input {
    padding: 12px 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
}

.form-group input.readonly-field {
    background-color: var(--light-gray);
    cursor: not-allowed;
}

.login-error {
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid var(--red);
    color: var(--red);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.login-success {
    background-color: rgba(39, 174, 96, 0.1);
    border: 1px solid var(--green);
    color: var(--green);
    padding: 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--medium-gray);
    font-size: 0.9rem;
    border-top: 1px solid var(--light-gray);
    padding-top: 20px;
}

.profile-info-section,
.profile-edit-section {
    background: var(--light-gray);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.profile-info-section h4,
.profile-edit-section h4 {
    color: var(--primary-blue);
    margin-bottom: 15px;
    font-size: 1.1rem;
    border-bottom: 2px solid var(--primary-yellow);
    padding-bottom: 5px;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.profile-actions .btn {
    flex: 1;
}

/* ==================== Toast通知 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 350px;
}

.toast {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    animation: slideInRight 0.3s ease;
    border-left: 4px solid var(--orange);
}

.toast.warning {
    border-left-color: var(--orange);
}

.toast.success {
    border-left-color: var(--green);
}

.toast.error {
    border-left-color: var(--red);
}

.toast-icon {
    font-size: 24px;
    color: var(--orange);
}

.toast.success .toast-icon {
    color: var(--green);
}

.toast.error .toast-icon {
    color: var(--red);
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--dark-gray);
    font-size: 1rem;
}

.toast-message {
    color: var(--medium-gray);
    font-size: 0.9rem;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== 页脚 ==================== */
.main-footer {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h4 {
    color: var(--primary-yellow);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    opacity: 0.8;
    transition: var(--transition);
}

.footer-links a:hover {
    opacity: 1;
    padding-left: 5px;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item i {
    color: var(--primary-yellow);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}

/* ==================== PWA相关 ==================== */
.pwa-install-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.install-btn {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-light-blue) 100%);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 12px 24px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 64, 128, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.pwa-install-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.pwa-install-guide.show {
    display: flex;
}

.install-guide-content {
    background: white;
    border-radius: var(--border-radius);
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-hover);
}

.install-header {
    background: var(--primary-blue);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.install-header h3 {
    color: white;
    margin: 0;
}

.close-guide {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

.install-body {
    padding: 20px;
}

.device-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
}

.device-selector .device-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--light-gray);
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.device-selector .device-btn.active {
    border-color: var(--primary-blue);
    background: rgba(0, 64, 128, 0.1);
}

.install-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.step-number {
    background: var(--primary-blue);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
}

.step-content h4 {
    margin: 0 0 5px 0;
    color: var(--dark-gray);
}

.step-content p {
    margin: 0;
    color: var(--medium-gray);
}

.instructions {
    display: none;
}

.instructions.active {
    display: block;
}

.install-footer {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.offline-notice {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: var(--orange);
    color: white;
    padding: 10px;
    text-align: center;
    z-index: 1001;
}

.offline-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* ==================== 响应式设计 - 平板 ==================== */
@media (min-width: 768px) and (max-width: 1024px) {
    .themes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==================== 响应式设计 - 手机 ==================== */
@media (max-width: 768px) {
    .main-header h1 {
        font-size: 1.6rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.95rem;
    }
    
    .section-title h2 {
        font-size: 1.5rem;
    }
    
    .cards-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 25px;
        padding: 0 16px;
    }
    
    .test-card {
        width: 100%;
        max-width: 380px;
        margin: 0 auto;
    }
    
    .test-card .btn {
        width: 100%;
        text-align: center;
        padding: 12px 16px;
        font-size: 0.9rem;
        box-sizing: border-box;
    }
    
    .themes-grid {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    .theme-card {
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
        text-align: center;
    }
    
    .theme-link {
        justify-content: center;
    }
    
    .article-image {
        height: 220px;
    }
    
    .article-content {
        padding: 25px 16px;
    }
    
    .pwa-install-btn {
        bottom: 70px;
        right: 15px;
    }
    
    .install-btn {
        padding: 10px 18px;
        font-size: 0.85rem;
    }
    
    .toast-container {
        left: 16px;
        right: 16px;
        max-width: none;
    }
    
    .user-dropdown {
        min-width: 250px;
        right: -10px;
    }
}

/* ==================== 响应式设计 - 小手机 ==================== */
@media (max-width: 480px) {
    .test-card {
        max-width: 100%;
    }
    
    .theme-card {
        max-width: 100%;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
    
    .contact-item {
        justify-content: center;
    }
}

/* ==================== 响应式设计 - 导航栏 ==================== */
@media (max-width: 1024px) {
    .nav-container {
        padding: 12px 16px;
        min-height: 60px;
    }
    
    .hamburger {
        display: flex;
        z-index: 1002;
        order: 1;
    }
    
    .logo {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 1;
        order: 2;
    }
    
    .language-toggle {
        position: static;
        display: flex;
        gap: 8px;
        order: 3;
        z-index: 1002;
    }
    
    .lang-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
        min-width: 55px;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        padding: 70px 20px 30px 25px;
        gap: 0;
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 1001;
        box-shadow: -5px 0 20px rgba(0, 0, 0, 0.15);
        display: flex !important;
    }
    
    .nav-links.active {
        right: 0;
    }
    
    .nav-links a {
        width: 100%;
        padding: 14px 0;
        border-bottom: 1px solid var(--light-gray);
        font-size: 1rem;
        white-space: normal;
        text-align: left;
    }
    
    .nav-links a::after {
        display: none;
    }
    
    .user-info {
        width: 100%;
        margin-top: 20px;
        padding: 12px 0;
        border-top: 1px solid var(--light-gray);
        justify-content: space-between;
        position: relative;
    }
    
    .user-dropdown {
        position: absolute;
        top: 100%;
        right: 0;
        left: auto;
        width: 220px;
        z-index: 1003;
        margin-top: 5px;
    }
    
    body.menu-open {
        overflow: hidden;
    }
}
/* 手机端 Logo 文字强制一行显示 */
@media (max-width: 768px) {
    .logo {
        font-size: 1rem;
        white-space: nowrap;
    }
    
    .logo span {
        display: inline-block;
        white-space: nowrap;
    }
    
    .logo img {
        height: 35px;
    }
}

/* 超小手机进一步缩小字体 */
@media (max-width: 480px) {
    .logo {
        font-size: 0.85rem;
    }
    
    .logo img {
        height: 30px;
    }
}