@font-face {
    font-family: Roboto;
    src: url('../Assets/roboto.ttf') format('truetype');
}

:root {
    --bg-color: #1f1f1f;
    --title-color: #ffffff;
    --details-color: #e0e0e0;
    --info-color: #cccccc;
    --link-color: #4dabf7;
    --border-color: #ffffff;
    --header-bg-color: #000000;
    --footer-bg-color: #000000;
    --h1-size: 32px;
    --h2-size: 24px;
    --p-size: 16px;
    --a-size: 14px;
}

* {
    font-family: 'Roboto', 'Courier New', Courier, monospace;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

#logo{
    width: 20vw;
}

html, body {
    height: 100%;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 100vh;
    background-color: var(--bg-color);
    color: var(--info-color);
    display: flex;
    flex-direction: column;
}

h1 {
    color: var(--title-color);
    font-size: var(--h1-size);
}

h2 {
    color: var(--details-color);
    font-size: var(--h2-size);
}

p {
    color: var(--info-color);
    font-size: var(--p-size);
}

a {
    color: var(--link-color);
    font-size: var(--a-size);
}

header {
    display: flex;
    
    align-items: center;
    background-color: var(--header-bg-color);
    width: 100%;
    margin: 0;
}

button {
    background: #333;
    color: var(--info-color);
    border: none;
    padding: 6px 10px;
    cursor: pointer;
}

#main {
    flex: 1;
    background-color: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
}

#content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}


#searchbar {
    display: flex;
    flex-direction: column;
    width: 50vw;
    max-width: 600px;
}

#searchbar input {
    width: 100%;
    border-radius: 16px 16px 0 0;
    font-size: large;
    padding: 8px 12px;
    border: none;
    outline: none;
}

header button{
    height: 100%;
}

#buttons {
    display: flex;
    width: 100%;
}

#buttons button {
    width: 50%;
    margin: 0;
}

#search_btn {
    border-radius: 0 0 0 16px;
}

#lucky_btn {
    border-radius: 0 0 16px 0;
}

footer {
    text-align: center;
    padding: 10px 0;
    background-color: var(--footer-bg-color);
    width: 100%;
    margin-top: auto;
}

footer h3 {
    color: var(--details-color);
}

#settings {
    position: fixed;
    
    left: 0;
    width: min(320px, 80vw);
    height: fit-content;
    padding: 20px 10px;
    background-color: var(--bg-color);
    overflow-y: auto;
    transition: transform 0.5s ease;
    transform: translateX(-110%);
    display: flex;
    justify-content: center;
    z-index: 1000;
    pointer-events: none;
}

#settings.open {
    transform: translateX(0);
    pointer-events: auto;
}

body.settings-open {
    overflow: hidden;
}

.settings-inner {
    width: min(320px, 100%);
    display: flex;
    flex-direction: column;
}

.settings-close {
    align-self: flex-end;
    margin-bottom: 1rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--info-color);
    border-radius: 4px;
    padding: 4px 8px;
    width: auto;
}

#settings fieldset {
    width: 100%;
    margin-bottom: 1rem;
    border-radius: 6px;
    background-color: black;
    color: var(--info-color);
    border: 1px solid var(--border-color);
}

#settings * {
    margin: 0.25rem 0;
}

.setting-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.selector {
    border-radius: 50%;
    border: 1px solid var(--border-color);
    width: 32px;
    background-color: black;
}

#contribute{
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: min(320px, calc(100vw - 40px));
    padding: 16px;
    background-color: rgba(0, 0, 0, 0.85);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 1100;
}

#contribute.hidden{
    display: none;
}

#contribute h3{
    margin: 0;
    color: var(--title-color);
}

#contribute p{
    margin: 0;
    font-size: 0.95rem;
    color: var(--info-color);
}

.contribute-links{
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.contribute-btn{
    flex: 1 1 45%;
    text-align: center;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--header-bg-color);
    color: var(--info-color);
    text-decoration: none;
    transition: transform 0.15s ease, filter 0.15s ease;
}

.contribute-btn.secondary{
    background-color: transparent;
}

.contribute-btn:hover{
    transform: translateY(-1px);
    filter: brightness(1.15);
}

#settings input {
    width: 20%;
    padding: 2px 5px;
}

#settings button {
    width: 100%;
}



@media (max-width: 768px) {
    *{
        overflow: hidden;
    }
    fieldset{
        margin: 0;

    }

    #settings {
        display: flex;
        height: 100%;
        width: 100%;
        padding: 0;
        margin: 0;
    }
    
    #settings * {
        margin: 0;
    }
    #contribute{
        position: static;
        width: calc(100% - 20px);
        margin: 10px auto;
        box-shadow: none;
    }
    #widgets{
        display: none;
    }
    #content{
        width: 100%;
    }
    #searchbar{
        width: 90%;
    }
    #logo{
        width: 60%;
    }
    footer{
        height: fit-content;
    }
}
