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

body {
    font-family: Arial, sans-serif;
    font-size: 13px;
    line-height: 1.4;
    color: #000;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
}

footer {
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    padding: 15px 20px;
    text-align: center;
    color: #666;
    font-size: 11px;
    margin-top: auto;
}

footer p {
    margin: 0;
}

a {
    color: #0000cc;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: #551a8b;
}

.home-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
}

.logo {
    margin-bottom: 30px;
}

.logo h1 {
    font-size: 60px;
    font-weight: normal;
    color: #000;
    letter-spacing: -2px;
}

.search-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 600px;
}

.search-box {
    width: 100%;
    margin-bottom: 20px;
}

.search-box input {
    width: 100%;
    padding: 10px 15px;
    font-size: 16px;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    outline: none;
}

.search-box input:focus {
    border-color: #4d90fe;
    box-shadow: 0 0 3px rgba(77, 144, 254, 0.3);
}

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

.search-buttons button {
    padding: 10px 20px;
    font-size: 13px;
    background: #f5f5f5;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    cursor: pointer;
    color: #333;
    font-weight: bold;
}

.search-buttons button:hover {
    border-color: #c6c6c6;
    background: #f8f8f8;
}

.search-tips {
    margin-top: 30px;
    color: #666;
    font-size: 12px;
}

.results-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 20px 10px 20px;
}

.search-form-inline {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.search-logo a {
    text-decoration: none;
}

.search-logo h1 {
    font-size: 28px;
    font-weight: normal;
    color: #000;
    letter-spacing: -1px;
}

.search-box-inline {
    display: flex;
    flex: 1;
    max-width: 600px;
}

.search-box-inline input {
    flex: 1;
    padding: 8px 12px;
    font-size: 14px;
    border: 1px solid #d9d9d9;
    border-radius: 2px 0 0 2px;
    outline: none;
}

.search-box-inline input:focus {
    border-color: #4d90fe;
}

.search-box-inline button {
    padding: 8px 16px;
    font-size: 13px;
    background: #4d90fe;
    border: 1px solid #3079ed;
    border-radius: 0 2px 2px 0;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
}

.search-box-inline button:hover {
    background: #357ae8;
    border-color: #2f5bb7;
}

.search-tabs {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}

.search-tabs a {
    padding: 8px 16px;
    background: #f5f5f5;
    border: 1px solid #dcdcdc;
    border-radius: 2px;
    color: #333;
    font-size: 13px;
    text-decoration: none;
}

.search-tabs a.active {
    background: #fff;
    border-bottom: 2px solid #4d90fe;
}

.search-tabs a:hover {
    background: #f8f8f8;
}

.results-stats {
    padding: 8px 20px;
    color: #666;
    font-size: 12px;
}

.results-container {
    max-width: 800px;
    padding: 10px 20px 30px 20px;
}

.result-item {
    margin: 0 0 20px 0;
}

.result-item h3 {
    margin: 0 0 2px 0;
    font-size: 16px;
    font-weight: normal;
}

.result-item h3 a {
    color: #0000cc;
    text-decoration: none;
}

.result-item h3 a:hover {
    text-decoration: underline;
}

.result-url {
    color: #008000;
    font-size: 12px;
    margin: 0 0 4px 0;
}

.result-snippet {
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

.no-results {
    text-align: center;
    padding: 50px 20px;
    color: #666;
}

.no-results p {
    margin: 10px 0;
}

.ai-answer-container {
    padding: 10px 20px 30px 20px;
    margin-bottom: 30px;
}

.ai-answer {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.ai-citations {
    max-width: 800px;
    padding: 10px 20px 30px 20px;
}

.ai-citations h3 {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
}

.ai-citations-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ai-citation-item {
    padding: 15px;
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
}

.ai-citation-item h4 {
    margin: 0 0 5px 0;
    font-size: 13px;
    font-weight: normal;
}

.ai-citation-item h4 a {
    color: #0000cc;
    text-decoration: none;
}

.ai-citation-item h4 a:hover {
    text-decoration: underline;
}

.citation-url {
    color: #008000;
    font-size: 11px;
    margin: 0 0 8px 0;
    word-break: break-all;
}

.citation-text {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 10px 20px 30px 20px;
    max-width: 1200px;
}

.image-item {
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s;
}

.image-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-item a {
    display: block;
    text-decoration: none;
}

.image-thumbnail {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f5f5f5;
}

.image-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-info {
    padding: 8px;
}

.image-title {
    font-size: 12px;
    color: #333;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.image-url {
    font-size: 10px;
    color: #008000;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .logo h1 {
        font-size: 40px;
    }

    .search-form-inline {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .search-box-inline {
        width: 100%;
    }

    .search-logo {
        width: 100%;
    }

    .search-logo h1 {
        font-size: 24px;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .image-thumbnail {
        height: 120px;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 32px;
    }

    .search-buttons {
        flex-direction: column;
        width: 100%;
    }

    .search-buttons button {
        width: 100%;
    }

    .images-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
        padding: 10px 10px 30px 10px;
    }

    .image-thumbnail {
        height: 100px;
    }

    .ai-answer-container {
        padding: 10px 15px 20px 15px;
    }

    .ai-answer {
        padding: 15px;
        font-size: 13px;
    }

    .ai-citations {
        padding: 10px 15px 20px 15px;
    }

    .ai-citation-item {
        padding: 12px;
    }
}

.ai-answer {
    background: #fff;
    border: 1px solid #d9d9d9;
    border-radius: 2px;
    padding: 20px;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

.ai-answer h1 {
    font-size: 24px;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.ai-answer h2 {
    font-size: 20px;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 12px;
}

.ai-answer h3 {
    font-size: 18px;
    font-weight: bold;
    margin-top: 20px;
    margin-bottom: 10px;
}

.ai-answer h4 {
    font-size: 16px;
    font-weight: bold;
    margin-top: 18px;
    margin-bottom: 8px;
}

.ai-answer p {
    margin: 10px 0;
}

.ai-answer ul, .ai-answer ol {
    margin: 10px 0;
    padding-left: 25px;
}

.ai-answer li {
    margin: 5px 0;
    line-height: 1.5;
}

.ai-answer strong {
    font-weight: bold;
}

.ai-answer code {
    background: #f4f4f4;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: 'Courier New', monospace;
    font-size: 13px;
    color: #c7254e;
}

.ai-answer pre {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

.highlight {
    background: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
    overflow-x: auto;
}

.highlight pre {
    margin: 0;
    padding: 0;
    font-size: 13px;
    line-height: 1.4;
}

.highlight code {
    font-family: 'Courier New', monospace;
}

.highlight .tok {
    display: inline;
}

.highlight .tok-comment {
    color: #999;
    font-style: italic;
}

.highlight .tok-keyword {
    color: #008000;
    font-weight: bold;
}

.highlight .tok-string {
    color: #a31515;
}

.highlight .tok-number {
    color: #099;
}

.highlight .tok-function {
    color: #0000ff;
}

.search-results-section {
    max-width: 800px;
    padding: 20px 20px 30px 20px;
}

.search-results-section h3 {
    font-size: 14px;
    font-weight: bold;
    margin: 0 0 15px 0;
    color: #333;
}

@media (max-width: 768px) {
    .ai-answer-container {
        padding: 10px 15px 20px 15px;
    }

    .ai-answer {
        padding: 15px;
        font-size: 13px;
    }

    .ai-answer h1 {
        font-size: 20px;
    }

    .ai-answer h2 {
        font-size: 18px;
    }

    .ai-answer h3 {
        font-size: 16px;
    }

    .highlight {
        padding: 10px;
        margin: 10px 0;
    }

    .search-results-section {
        padding: 15px 15px 20px 15px;
    }
}
