/* Fonts */

@import url('https://fonts.googleapis.com/css2?family=Bodoni+Moda');
@import url('https://fonts.googleapis.com/css2?family=Merriweather&amp;display=swap');



:root {
    --wrong: #ff2424;
    --right: #4bff33;
    --accent: #eeee2b;

    /* Primárně černý theme */
    --text: #ffffff;
    --unimportant: #cccccc;
    --background: #0a0a0a;
    --primary: #ffffff0d;
    --border: #ffffff1a;
    }

/* Rozlišení themů

@media (prefers-color-scheme: light) {
    :root {
        --text: #000000;
        --unimportant: hsl(0, 0%, 27%);
        --background: #ffffff;
        --primary: hsla(0, 0%, 0%, 0.05);
        --border: rgba(0, 0, 0, 0.1);
    }
}
@media (prefers-color-scheme: dark) {
    :root {
        --text: #ffffff;
        --unimportant: hsl(0, 0%, 80%);
        --background: #0a0a0a;
        --primary: hsla(0, 0%, 100%, 0.05);
        --border: rgba(255, 255, 255, 0.1);
    }
}

*/



/* Basic elements */

html {
    height: 100%;
}

body {
    background-color: var(--background);
    color: var(--text);
    font-family: 'Merriweather', serif;
    font-weight: 100;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    min-height: 100%;
    margin: auto;
    box-sizing: border-box;

    position: relative;
    z-index: 0; /* aby pseudo-element byl pod obsahem */
}

body::before {
    content: "";
    position: fixed;  
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: url('bg.svg');
    background-repeat: repeat;
    filter: blur(42px);
    opacity: 0.30; /* doladíš podle potřeby */
    z-index: -1;
    pointer-events: none; /* aby to nepřekáželo v klikání */
}


header {
    padding: 1.5rem;
    display: flex;
    background: var(--primary);
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
}

main {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background-color: var(--primary);
    max-width: 70%; 
    min-width: 100px;
    border-radius: 1rem;
    align-self: center;
    margin: 1rem;
    padding: 2rem;
    border: 1px solid var(--border);
}

footer {
    font-size: 0.7rem;
    color: var(--unimportant);
    padding: 1rem;
    background-color: var(--primary);
    text-align: center;
    border-top: 1px solid var(--border);
}

h1, h2, h3 {
    font-family: "Bodoni Moda", 'Times New Roman', Times, serif;
}

h1 {
    font-size: 2rem;
}

h2 {
    font-size: 2rem;
    font-weight: normal;
    line-height: 2rem;
}

h4 {
    font-size: 1.25rem;
    line-height: 0.1em;
}

button {
    margin: 0.4rem;
    padding: 10px 15px;
    background-color: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 5px;
    font-family: inherit;
    cursor: pointer;
    height: min-content;
    width: fit-content;
    min-width: fit-content;
}

textarea, input {
    margin: 0.4em;
    padding: 10px 15px;
    background-color: var(--primary);
    color: var(--text);
    border: none;
    border-radius: 5px;
    font-family: inherit;
    cursor: auto;
    min-width: fit-content;
    box-sizing: border-box;
}

form {
    margin: 0;
}

button:hover {
    background-color: var(--primary); 
    color: var(--accent);
    font-style: bold;
    opacity: 0.8;
}

a.invisible-link {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    font-family: inherit;
    font-style: inherit;
    text-decoration: inherit;
}

a.invisible-link:hover {
    color: inherit;
}

a.disabled {
    color: var(--unimportant);
}

a {
    color: inherit;
    min-width: fit-content;
}

a:hover {
    color: var(--accent);
}

b {
    font-weight: 600;
}

li {
    line-height: 1.5rem;
    margin: 3px;
}

.hidden {
    display: none !important;
}

.highlighted {
    font-weight: 600;
    color: var(--accent) !important;
}

.lowlighted {
    color: var(--unimportant);
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.horizontal {
    display: flex;
    flex-direction: row;
}

input[type="file" i] {
    display: flex;
    flex-direction: column;
}

.contained {
    background: var(--primary);
    padding: 1em;
    border-radius: 0.5rem;
    border: 1px solid var(--border);
}



/* Tiles */

.tiles {
    display: flex;
    flex-direction: row;
    padding: 0;
    margin: 0;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5em;
}

.tiles li {
    align-items: center;
    background: var(--primary);
    padding: 1.5em;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;

    border: 1px solid var(--border);
}

.tiles li a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    font-size: 1.1em;
    line-height: 2rem;
}



/* Icons */

.icon {
    display: flex;
    align-items: center;
    width: 2rem;
    height: 2rem;
    fill: currentColor; 
    stroke: currentColor;
    stroke-width: 1;
}

.tile-icon {
    width: 4rem;
    height: 4rem;
    margin: 0.5rem;
}

.inline-icon {
    width: 1.2rem;
    height: 1.2rem;
    display: inline;
    position: relative;
    top: 2;
    margin-inline: 0.2em;
}



/* Header */

#splash-text {
    vertical-align: middle;
    align-content: center;
    text-align: left;
    color: var(--unimportant);
    margin: 0;
    font-size: smaller;
}

#header-nav {
    gap: 1vw;
    font-weight: bold;
    margin: 1em;
    justify-content: flex-end;
    flex-wrap: wrap;
    max-width: 50%;
}

#header-nav li a {
    text-decoration: none;
    text-wrap-mode: nowrap;
}

#title {
    text-align: left;
    margin-block: 0;
    line-height: 1.3em;
}

#logo {
    display: flex;
    flex-direction: column;
    gap: 1em;
    max-width: 40%;
}

#hamburger {
    display: none; /* Na desktopu schovat */
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

#hamburger span {
    width: 25px;
    height: 3px;
    background: var(--text);
    display: block;
    border-radius: 3px;
}



/* Scroll bar */

::-webkit-scrollbar {
    width: 7px;
}

::-webkit-scrollbar-track {
    background: var(--primary); /* barva pozadí */
    border-radius: 5px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--primary); /* barva posuvníku */
    border-radius: 5px;
    border: 2px solid var(--primary); /* aby měl „okraj“ */
    margin: 1px;
}

::-webkit-scrollbar-thumb:hover {
    background-color: #999; /* tmavší při hoveru */
}



/* Lightbox */

#lightbox {
    position: fixed;
    inset: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, .85);
    z-index: 100;
    text-shadow: 0 10px 40px rgba(0, 0, 0, .6);
    color: var(--unimportant);
}

#lightbox img {
    max-width: 90%;
    max-height: 85%;
    object-fit: contain;
    border-radius: 8px;
}

.lb-btn {
    position: absolute;
    background: none;
    border: none;
    cursor: pointer;
    padding: 1rem;
    box-sizing: border-box;
    color: var(--unimportant);
    z-index: 10;
}

#lightbox-close {
    right: 20px;
    font-size: 2.5rem;
    top: 0px;
}

#lightbox-download {
    right: 80px;
    top: 21px;
    text-decoration: none;
}

#lightbox-delete {
    right: 160px;
    top: 21px;
    text-decoration: none;
}

#lightbox-prev,
#lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    font-size: 2.8rem;
    box-sizing: border-box;
    color: var(--text);
}

#lightbox-prev {
    left: 18px;
}

#lightbox-next {
    right: 18px;
}

#lightbox-caption {
    background-color: rgba(0, 0, 0, 0.75);
    color: var(--unimportant);
    line-height: 1.5em;
    font-style: italic;
    padding: 2.5em 1em;
    text-align: center;
    font-size: 0.75rem;
    position: absolute;
    bottom: 0;
    width: 100%;
}

.lb-backdrop {
    position: absolute;
    inset: 0;
}

.small-delete {
    right: 5px;
    top: 5px;
    text-decoration: none;
}



/* Home page */

#home-nav li {
    min-width: 7rem;
    min-height: 7rem;
}