/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航样式 */
.header {
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}

.logo img {
    height: 60px; /* 从50px增加到60px */
    width: auto;
    max-width: 240px; /* 从200px增加到240px */
    object-fit: contain;
}

.logo-text {
    font-size: 20px;
    font-weight: bold;
    color: #333;
}

.nav-menu {
    flex: 1 1 auto;
    display: flex;
    justify-content: center;
    margin: 0;
}

.nav-menu ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #666;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #3366ff;
    background-color: #f0f4ff;
}

.nav-link.active {
    color: #3366ff;
    background-color: #f0f4ff;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: #3366ff;
}

/* 移动端菜单按钮 */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.mobile-menu-btn:hover {
    background-color: #f0f4ff;
}

.menu-icon {
    display: flex;
    flex-direction: column;
    width: 24px;
    height: 18px;
    justify-content: space-between;
}

.menu-icon span {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #333;
    border-radius: 1px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .menu-icon span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .menu-icon span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .menu-icon span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

.customer-service {
    position: relative;
}

.service-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #3366ff, #4d7fff);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.service-btn:hover {
    background: linear-gradient(135deg, #2952cc, #3d66cc);
    transform: translateY(-1px);
}

.service-icon {
    font-size: 16px;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

/* 主要内容样式 */
.main-content {
    min-height: calc(100vh - 80px);
}

/* 横幅样式 */
.hero-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 40px 0; /* 减少padding从60px到40px */
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.1)"/><circle cx="50" cy="10" r="0.5" fill="rgba(255,255,255,0.1)"/><circle cx="20" cy="80" r="0.5" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-title {
    font-size: 42px; /* 稍微减少字体大小从48px到42px */
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* 内容区域样式 */
.content-section {
    padding: 40px 0; /* 减少上下padding从80px到40px */
    background: #f5f7fa;
}

.content-wrapper {
    display: grid;
    grid-template-columns: auto 1fr; /* 左侧自适应，右侧占据剩余空间 */
    gap: 30px; /* 减少间距 */
    align-items: start;
    min-height: 720px;
}

/* 左侧图片区域 */
.image-section {
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 20px;
    padding: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 720px;
    min-height: 720px;
    width: fit-content;
    max-width: 380px;
}

.main-image {
    width: 360px;
    height: 700px;
    object-fit: cover;
    border-radius: 12px;
}

/* 右侧功能区域 */
.function-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    height: 720px;
    min-height: 720px;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 查询结果显示区域 */
.result-display {
    flex: 1;
    padding: 30px;
    border-bottom: 1px solid #e8ecf0;
    overflow-y: auto;
    min-height: 300px;
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
}

/* 欢迎消息样式 */
.welcome-message {
    text-align: center;
    color: #666;
}

.welcome-message h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 10px;
}

.welcome-message p {
    font-size: 16px;
    color: #999;
}

/* AI生成loading样式 */
.ai-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3366ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.loading-subtitle {
    font-size: 14px;
    color: #666;
    text-align: center;
    line-height: 1.5;
}

/* 结果内容样式 */
.result-content {
    width: 100%;
}

.result-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3366ff;
}

.result-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.result-item-inline {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3366ff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.result-item-inline:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.result-item-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.result-item-desc {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

/* 查询输入区域 */
.query-section {
    padding: 30px;
    background: white;
    border-bottom-left-radius: 20px;
    border-bottom-right-radius: 20px;
}

.form-title {
    font-size: 20px;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    text-align: center;
}

.form-content {
    width: 100%;
}

.input-group {
    margin-bottom: 0;
}

.input-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
}

.input-label {
    display: block;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
}

.required {
    color: #ff4757;
}

.form-input {
    flex: 1;
    padding: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    transition: all 0.3s ease;
    resize: none;
    line-height: 1.5;
    font-family: inherit;
    height: 140px;
}

.form-input:focus {
    outline: none;
    border-color: #3366ff;
    box-shadow: 0 0 0 3px rgba(51, 102, 255, 0.1);
    background-color: #fafbfc;
}

.form-input::placeholder {
    color: #999;
}

.search-btn {
    padding: 20px 24px;
    background: linear-gradient(135deg, #3366ff, #4d7fff);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: pre-line;
    text-align: center;
    min-width: 80px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: linear-gradient(135deg, #2952cc, #3d66cc);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(51, 102, 255, 0.3);
}

.search-btn:active {
    transform: translateY(0);
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .content-wrapper {
        gap: 20px;
    }

    .hero-title {
        font-size: 36px;
    }

    .nav-menu ul {
        gap: 20px;
    }

    .nav-link {
        font-size: 15px;
        padding: 6px 12px;
    }

    .logo img {
        height: 55px;
        max-width: 220px;
    }

    .function-section {
        min-height: 650px;
        height: 650px;
    }

    .result-display {
        min-height: 250px;
    }

    .image-section {
        height: 650px;
        min-height: 650px;
        max-width: 350px;
    }

    .main-image {
        width: 330px;
        height: 640px;
    }
}

@media (max-width: 768px) {
    /* 显示移动端菜单按钮 */
    .mobile-menu-btn {
        display: block;
    }

    /* 隐藏桌面端导航菜单 */
    .nav-menu {
        display: none;
    }

    .nav-wrapper {
        flex-wrap: wrap;
    }

    .hero-title {
        font-size: 28px;
        line-height: 1.3;
    }

    .content-section {
        padding: 20px 0;
    }

    .hero-banner {
        padding: 30px 0;
    }

    /* 隐藏左侧图片区域 */
    .image-section {
        display: none;
    }

    /* 右侧区域占满全宽 */
    .content-wrapper {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .function-section {
        min-height: 600px;
        height: auto;
        margin: 0;
    }

    .result-display {
        min-height: 300px;
        padding: 20px;
    }

    .form-title {
        font-size: 18px;
    }

    .logo img {
        height: 50px;
        max-width: 200px;
    }

    .function-section {
        border-radius: 16px;
    }

    .main-image {
        width: 300px;
        height: 580px;
    }

    .input-row {
        flex-direction: column;
        gap: 15px;
    }

    .search-btn {
        width: 100%;
        height: 60px;
        white-space: nowrap;
    }

    .form-input {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .hero-title {
        font-size: 24px;
    }

    /* 保持左侧图片隐藏 */
    .image-section {
        display: none;
    }

    .function-section {
        margin: 0;
        border-radius: 12px;
    }

    .result-display {
        padding: 15px;
        min-height: 250px;
    }

    .form-title {
        font-size: 16px;
    }

    .nav-menu ul {
        gap: 10px;
    }

    .nav-link {
        font-size: 14px;
        padding: 5px 8px;
    }

    .service-btn {
        padding: 8px 12px;
        font-size: 12px;
    }

    .logo img {
        height: 45px;
        max-width: 180px;
    }

    .welcome-message h3 {
        font-size: 18px;
    }

    .welcome-message p {
        font-size: 14px;
    }

    .main-image {
        width: 280px;
        height: 540px;
    }

    .search-btn {
        height: 50px;
        font-size: 14px;
    }

    .form-input {
        height: 100px;
        padding: 15px;
        font-size: 14px;
    }
}

/* 动画效果 */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.image-section,
.function-section {
    animation: fadeInUp 0.8s ease-out;
}

.image-section {
    animation-delay: 0.2s;
}

.function-section {
    animation-delay: 0.4s;
}

/* 搜索按钮loading状态 */
.loading {
    pointer-events: none;
}

.loading .search-btn {
    background: #ccc;
    cursor: not-allowed;
}

.loading .search-btn::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid transparent;
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 1s ease infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* 移动端菜单动画效果 */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOutUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
} 

/* Markdown内容样式 */
.result-item-inline h1,
.result-item-inline h2,
.result-item-inline h3,
.result-item-inline h4,
.result-item-inline h5,
.result-item-inline h6 {
    margin: 16px 0 8px 0;
    font-weight: 600;
    line-height: 1.4;
}

.result-item-inline h1 {
    font-size: 24px;
    color: #1a1a1a;
    border-bottom: 2px solid #e1e4e8;
    padding-bottom: 8px;
}

.result-item-inline h2 {
    font-size: 20px;
    color: #2c3e50;
    border-bottom: 1px solid #e1e4e8;
    padding-bottom: 6px;
}

.result-item-inline h3 {
    font-size: 18px;
    color: #34495e;
}

.result-item-inline h4 {
    font-size: 16px;
    color: #34495e;
}

.result-item-inline p {
    margin: 12px 0;
    line-height: 1.6;
    color: #333;
}

.result-item-inline strong {
    font-weight: 600;
    color: #2c3e50;
}

.result-item-inline em {
    font-style: italic;
    color: #555;
}

.result-item-inline code {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 4px;
    padding: 2px 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 13px;
    color: #d73a49;
}

.result-item-inline pre {
    background: #f6f8fa;
    border: 1px solid #e1e4e8;
    border-radius: 6px;
    padding: 16px;
    margin: 16px 0;
    overflow-x: auto;
    line-height: 1.45;
}

.result-item-inline pre code {
    background: none;
    border: none;
    padding: 0;
    color: #24292e;
    font-size: 14px;
}

.result-item-inline ul,
.result-item-inline ol {
    margin: 12px 0;
    padding-left: 24px;
}

.result-item-inline li {
    margin: 6px 0;
    line-height: 1.6;
    color: #333;
}

.result-item-inline ul li {
    list-style-type: disc;
}

.result-item-inline ol li {
    list-style-type: decimal;
}

.result-item-inline a {
    color: #3366ff;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.3s ease;
}

.result-item-inline a:hover {
    color: #2952cc;
    border-bottom-color: #2952cc;
}

.result-item-inline blockquote {
    border-left: 4px solid #dfe2e5;
    padding-left: 16px;
    margin: 16px 0;
    color: #6a737d;
    font-style: italic;
}

.result-item-inline table {
    border-collapse: collapse;
    width: 100%;
    margin: 16px 0;
}

.result-item-inline th,
.result-item-inline td {
    border: 1px solid #e1e4e8;
    padding: 8px 12px;
    text-align: left;
}

.result-item-inline th {
    background: #f6f8fa;
    font-weight: 600;
}

.result-item-inline hr {
    border: none;
    border-top: 1px solid #e1e4e8;
    margin: 24px 0;
}

/* 确保markdown内容在result-item-inline中的间距 */
.result-item-inline {
    padding: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.result-item-inline > *:first-child {
    margin-top: 0;
}

.result-item-inline > *:last-child {
    margin-bottom: 0;
} 