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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--color-background);
    color: var(--color-text);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 1rem;
}

.container {
    width: 100%;
    max-width: 1400px;
    display: flex;
    gap: 1rem;
    height: 100%;
    flex-direction: column;
    background: var(--color-background);
}

#header {
    text-align: center;
}

#search {
    flex: 1;
    background: var(--color-background);
    display: flex;
    flex-direction: row;
    overflow: hidden;
}

#search-body {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    width:80%;
    margin-right:5px;
    margin-left:5px;
}

#search-form {
    display: flex;
    padding: 1rem;
    gap: 0.5rem;
}

#search-input {
    flex: 1;
    padding: 0.5rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
}

#search-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    border: 1px solid var(--color-border);
    background: var(--color-button);
    cursor: pointer;
}

#search-button:hover {
    background: var(--color-button-h);
}

#search-results {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: var(--color-card);
    width:100%;
}

.search-result {
    background: var(--color-background);
    border: 1px solid var(--color-border);
    margin-bottom: 3px;
    padding:5px;
    max-width: 95%;
}

.search-result:hover {
    background: var(--color-button-h);
    cursor:pointer;
}

.result-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 0.25rem;
}

.result-description {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.4;
}

#search-history {
    width:300px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 1rem;
}

#search-history-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

#search-history-content {
    font-size: 0.9rem;
    color: var(--color-text);
}

#newly-indexed {
    width:300px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    max-height: 100dvh;
}

#newly-indexed-header {
    font-weight: bold;
    margin-bottom: 0.5rem;
}

#newly-indexed-content {
    font-size: 0.9rem;
    color: var(--color-text);
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

@media (max-width: 1000px) {
    .container, #search{
        flex-direction: column;
    }
    
    #search-body {
        width: 100%;
        height: 100dvh;
    }

    #search-history {
        display: none;
    }

    #newly-indexed {
        display: none;
    }

    #search-results, #search, .container, body{
        padding:0px;
    }

    #search-body{
        margin:0px;
    }
    #header {
        display:none;
    }
}