@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Marcellus&family=Zilla+Slab:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&display=swap");
@import url("./variables.css");

html {
    -webkit-tap-highlight-color: transparent;
}

p,
li,
ul,
textarea,
.email-input,
.opinion-input,
.intro,
#search {
    font-family: var(--font-family-serif);
    font-weight: 450;
    font-style: normal;
    color: var(--color-text);
    font-size: 20px;
    line-height: 1.4;
    text-shadow: 2px 2px 10px var(--shadow-sm);
}

.content li,
.content p {
    line-height: 1.7;
}

ul p {
    margin: 0;
}

.content-info {
    opacity: 65%;
    text-align: right;
}

.content-info p {
    font-size: 18px;
}

math {
    font-family: "Zilla Slab", serif;
    font-weight: 400;
}

.back-button {
    width: 60px !important;
}

version-info,
button,
#myNavbar a,
.nav-text,
h2,
h3,
h4,
h5 {
    font-family: var(--font-family-sans);
    font-weight: 500;
    font-style: normal;
    color: var(--color-text);
    font-size: 18px;
    text-shadow: 2px 2px 10px var(--shadow-sm);
}

h1 {
    color: var(--color-text);
}

::selection,
.underlined::selection {
    background-color: var(--color-accent-strong);
    color: var(--color-selection-text);
}

.key-icon {
    padding: 0 5px;
    display: inline-block;
    border: 1px solid var(--color-text);
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    text-transform: uppercase;
    color: var(--color-text);
}

.priklad {
    font-family: "Marcellus", serif;
    font-size: 15px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 25px;
}

h4 {
    font-size: 20px;
}

.verybig {
    font-size: 60px;
    text-shadow: 2px 2px 10px var(--shadow-sm);
    color: var(--color-text);
    z-index: -1;
}

/* Decorative dashed underline for emphasized large headings */
.verybig {
    position: relative;
    text-decoration-line: underline;
    text-decoration-style: dashed;
    text-decoration-color: var(--color-accent-3);
    text-decoration-thickness: 4px;
    text-underline-offset: 10px;
    transition: text-decoration-color 0.2s ease;
}

/* Dark mode variant: use the dark accent color */
body.dark-mode .verybig {
    text-decoration-color: var(--color-accent-3-dark);
}

body {
    font-family: var(--font-family-sans);
    background-color: var(--color-bg);
    margin: 0;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

hr {
    background-color: var(--color-text);
    height: 3px;
    border: none;
}

img:not(.navImg, footer img),
video {
    border-radius: 10px;
    border: 5px solid var(--color-accent);
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.Mcard {
    background-color: var(--color-card-bg);
    color: var(--color-white);
    border: 1px solid var(--color-muted-brown);
    border-radius: 16px;
}

.Minfo {
    padding: 0.75rem 1.25rem;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    background-color: var(--color-card-top);
}

.Mtelo {
    padding: 1rem;
}

.Mnadpis {
    font-size: 1.25rem;
}

@media screen and (max-width: 600px) {
    hr {
        width: 290px;
    }
}

.grid-predmety .subtitle {
    font-size: 13px;
    font-family: "Poppins", sans-serif;
}

main {
    margin-left: 285px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 60px;
}

section {
    max-width: 800px;
    margin: auto auto 5px;
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

section #only-content {
    padding: 0;
    display: block;
    text-align: left;
}

section:has(ul.grid),
section:has(ul.grid-predmety) {
    text-align: center;
    justify-content: center;
    align-items: center;
}

@media only screen and (max-width: 600px) {
    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 25px;
    }

    h3 {
        font-size: 20px;
    }

    h4 {
        font-size: 15px;
    }

    main {
        margin-left: 0;
        justify-content: left;
    }

    section {
        width: 97%;
        max-width: 340px;
        padding: 1px;
        text-align: center;
        align-items: center;
    }
}

.footer-content a,
main a {
    color: var(--color-accent-strong);
    font-weight: 700;
    position: relative;
    display: inline-block;
    text-decoration: underline;
    text-decoration-color: var(--color-accent-strong);
    text-decoration-style: inherit;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
    transition: all 0.3s ease;
}

.footer-content a:hover,
main a:hover {
    color: var(--color-accent-3);
}

.footer-content a::after,
main a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    bottom: -2px;
    pointer-events: none;
    background-repeat: repeat-x;
    background-position: 0 100%;
    background-size: auto 10px;
    transform: translateY(2px);
}

/* Pokud je odkaz uvnitř .intro, nepoužívej globální dekorace */
.intro a {
    color: var(--color-text);
    font-weight: inherit;
    text-decoration: none !important;
    position: static;
    display: inline;
}

.intro a::after {
    display: none !important;
    content: none !important;
}

.intro a:hover {
    color: var(--color-text);
    text-decoration: none !important;
}

/* Dark mode varianty pro .intro */
body.dark-mode .intro a {
    color: var(--color-text-dark);
}

body.dark-mode .intro a::after {
    display: none !important;
    content: none !important;
}

body.dark-mode .intro a:hover {
    color: var(--color-text-dark);
    text-decoration: none !important;
}

.loading-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: calc(100% - 285px);
    margin-left: 285px;
    height: 5px;
    background-color: transparent;
    z-index: 1030;
    overflow: hidden;
}

.loading-bar {
    height: 5px;
    width: 0;
    background-color: var(--color-accent-strong);
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

@media only screen and (max-width: 600px) {
    .loading-bar-container {
        width: 100%;
        margin-left: 0;
    }

    .verybig {
        font-size: 40px;
    }
}

.underlined {
    text-decoration: underline;
}

.blog-image {
    display: block;
    float: right;
    max-width: 150px;
    margin-left: 20px;
}

.blog-image div {
    width: auto;
}

.blog-image img {
    background-color: var(--color-white);
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.blog-image p {
    float: right;
    padding: 5px;
    margin-bottom: 0;
    border: 5px solid var(--color-card-top);
    background-color: var(--color-accent-4);
    border-radius: 10px;
    text-align: left;
    word-break: break-word;
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.blog-image a,
.blog-image a:hover {
    background-color: transparent;
}

.blog-image p a {
    background-color: var(--color-accent);
}

.blog-image p a:hover {
    background-color: var(--color-accent-3);
}

@media only screen and (max-width: 600px) {

    .blog-image,
    .blog-image p,
    .blog-image img {
        max-width: 100px;
    }

    .blog-image {
        height: auto;
    }
}

button {
    border-radius: 10px;
    border: none;
    background-color: var(--color-button-bg);
    cursor: pointer;
    outline: none;
    color: var(--color-white);
    font-size: 16px;
    padding: 10px 20px;
    margin: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

button:hover {
    background-color: var(--color-button-hover);
    transform: scale(1.05);
    border-color: var(--color-text);
}

button:active {
    transform: scale(0.95);
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.btn-success {
    background-color: var(--color-success);
}

.btn-success:hover {
    background-color: var(--color-success-hover);
}

.btn-danger {
    background-color: var(--color-danger);
    color: var(--color-white);
}

.btn-danger:hover {
    background-color: var(--color-danger-hover);
}

@media only screen and (max-width: 600px) {

    .nav-button,
    .opennav-button {
        font-size: 50px;
        position: absolute;
        background-color: transparent;
        top: 0;
        right: 0;
        border: 0 solid var(--color-text);
    }
}

mn,
mi {
    font-family: "Poppins", sans-serif;
}

textarea,
.email-input,
.opinion-input {
    border-radius: 10px;
    border: 2px solid var(--color-accent);
    background-color: var(--color-accent);
    color: var(--color-button-text);
    padding: 0.5rem;
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

textarea {
    overflow: hidden;
    resize: none;
}

.email-input,
.opinion-input {
    width: 20rem;
    margin-bottom: 1rem;
}

#search {
    width: 20rem;
    border-radius: 10px;
}

.email-input:focus,
.opinion-input:focus,
textarea:focus {
    border: 2px solid var(--color-button-text);
    outline: none;
}

@media only screen and (min-width: 1200px) {
    textarea {
        min-width: 50rem;
        min-height: 25rem;
        max-width: 60rem;
        max-height: 15rem;
    }
}

@media only screen and (max-width: 1199px) and (min-width: 950px) {
    textarea {
        min-width: 35rem;
        min-height: 18rem;
        max-width: 15rem;
        max-height: 12rem;
    }
}

@media only screen and (min-width: 740px) and (max-width: 949px) {
    textarea {
        min-width: 25rem;
        min-height: 15rem;
        max-width: 25rem;
        max-height: 15rem;
    }
}

@media only screen and (max-width: 600px) {
    textarea {
        min-width: 20rem;
        min-height: 10rem;
        max-width: 20rem;
        max-height: 10rem;
    }
}

.opinions-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.opinion-card {
    background-color: var(--color-accent);
    border-radius: 8px;
    padding: 1rem;
    position: relative;
}

.opinion-card:hover {
    transform: translateY(-2px);
}

.opinion-meta {
    display: flex;
    justify-content: space-between;
    color: var(--color-muted-brown);
    font-size: 0.875rem;
    font-family: var(--font-family-sans);
}

.scroll-to-top {
    visibility: visible;
    padding: 1rem 2rem 0;
    margin: auto 0 10px;
}

@media only screen and (max-width: 600px) {

    .scroll-to-top,
    .static-text {
        visibility: hidden;
        padding: 0;
        margin: 0;
    }
}

/* Search Modal - v souladu se stylem stránky */
.search-modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}

.search-modal.active {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 8vh;
}

.search-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--backdrop);
}

.search-container {
    position: relative;
    width: 90%;
    max-width: 600px;
    background: var(--color-bg);
    border-radius: 10px;
    box-shadow: 2px 2px 10px var(--shadow-sm);
    max-height: 75vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-header {
    padding: 20px;
    border-bottom: 2px solid var(--color-text);
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--color-bg);
    border: 2px solid transparent;
    border-radius: 10px;
    padding: 0 15px;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    border-color: var(--color-text);
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.search-icon {
    color: var(--color-button-text);
    font-size: 18px;
    margin-right: 10px;
}

#search {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    font-weight: 450;
    padding: 15px 0;
    color: var(--color-button-text);
    font-family: "Zilla Slab", serif;
}

#search::placeholder {
    color: var(--color-text-muted);
}

.search-close {
    background: none;
    border: none;
    color: var(--color-button-text);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 10px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.search-close:hover {
    background: var(--cookie-decline);
    color: var(--color-white);
    transform: scale(1.05);
}

.search-shortcuts {
    display: flex;
    gap: 15px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.search-shortcut {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--color-button-text);
    font-family: "Poppins", sans-serif;
}

.search-shortcut .key-icon {
    background: var(--color-bg);
    border: 1px solid var(--color-text-muted);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--color-button-text);
    min-width: 20px;
    text-align: center;
}

.search-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.search-results {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent-2) var(--color-bg);
}

.search-results::-webkit-scrollbar {
    width: 8px;
}

.search-results::-webkit-scrollbar-track {
    background: var(--color-bg);
}

.search-results::-webkit-scrollbar-thumb {
    background: var(--color-accent);
    border-radius: 10px;
}

.search-result {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 10px;
}

.search-result:hover {
    border: 2px solid var(--color-text);
}

/* Vypnutí hover efektů při keyboard navigaci */
.search-results.keyboard-navigation .search-result:hover {
    transform: none;
}

.search-result.selected {
    border: 2px solid var(--color-text);
}

.result-title {
    font-family: "Poppins", sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 5px;
    line-height: 1.3;
}

.search-snippet {
    font-family: "Zilla Slab", serif;
    font-size: 14px;
    line-height: 1.4;
    margin: 0;
}

.search-snippet strong {
    background: var(--color-accent-3);
    color: var(--color-white);
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 600;
}

.search-more-results {
    padding: 12px 20px;
    text-align: center;
    border-top: 2px solid var(--color-text);
    color: var(--color-white);
    font-family: var(--font-family-sans);
    font-size: 13px;
}

.search-more-results p {
    margin: 0;
    font-weight: 500;
}

.search-empty,
.search-no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    text-align: center;
    color: var(--color-button-text);
    background: var(--color-bg);
}

.search-empty i,
.search-no-results i {
    font-size: 48px;
    margin-bottom: 15px;
    color: var(--color-accent);
}

.search-empty h3,
.search-no-results h3 {
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: var(--color-button-text);
}

.search-empty p,
.search-no-results p {
    font-family: "Zilla Slab", serif;
    font-size: 14px;
    margin: 0;
    color: var(--color-text-muted);
}

@media (max-width: 768px) {
    .search-modal.active {
        padding-top: 5vh;
    }

    .search-container {
        width: 95%;
        margin: 0 auto;
        max-height: 85vh;
    }

    .search-header {
        padding: 15px;
    }

    .search-input-wrapper {
        padding: 0 12px;
    }

    #search {
        font-size: 16px;
        padding: 12px 0;
    }

    .search-shortcuts {
        gap: 10px;
        margin-top: 10px;
    }

    .search-shortcut {
        font-size: 11px;
        gap: 4px;
    }

    .search-shortcut .key-icon {
        padding: 1px 4px;
        font-size: 10px;
        min-width: 18px;
    }

    .search-result {
        padding: 12px 15px;
    }

    .result-title {
        font-size: 15px;
    }

    .search-snippet {
        font-size: 13px;
    }

    .search-empty,
    .search-no-results {
        padding: 40px 15px;
    }

    .search-empty i,
    .search-no-results i {
        font-size: 36px;
    }

    .search-empty h3,
    .search-no-results h3 {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .search-container {
        width: 98%;
    }

    .search-shortcuts {
        display: none;
    }

    .search-header {
        padding: 12px;
    }
}

body.scroll-lock {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

.cookie-consent-div {
    margin-left: 285px;
    display: flex;
    justify-content: center;
}

#cookie-consent {
    position: fixed;
    bottom: 90px;
    text-align: center;
    background-color: rgba(209, 117, 166, 0.3);
    backdrop-filter: blur(10px);
    transition: 0.3s all ease;
    padding: 15px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px var(--shadow-lg);
    z-index: 1041;
    justify-content: center;
}

#cookie-consent p {
    margin: 0;
}

#cookie-consent button {
    background: var(--cookie-accept);
    color: var(--color-white);
    width: 150px;
}

#cookie-consent button:hover {
    background: var(--cookie-accept-hover);
}

#cookie-consent .decline {
    background: var(--cookie-decline);
}

#cookie-consent .decline:hover {
    background: var(--cookie-decline-hover);
}

@media screen and (max-width: 600px) {
    #cookie-consent {
        width: 300px;
        bottom: 50px;
        flex-direction: column;
        gap: 5px;
    }
    .cookie-consent-div {
        margin-left: 0;   
    }
}

/* App install banner - uses same visual style as cookie banner */
#app-install-banner {
    position: fixed;
    bottom: 90px;
    text-align: center;
    background-color: rgba(209, 117, 166, 0.3);
    backdrop-filter: blur(10px);
    transition: 0.3s all ease;
    padding: 15px;
    border-radius: 10px;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 8px var(--shadow-lg);
    z-index: 1041;
    justify-content: center;
    display: none;
}

#app-install-banner.hidden {
    display: none !important;
}

#app-install-banner p {
    margin: 0;
    font-weight: 600;
}

#app-install-banner .buttons {
    margin-left: 12px;
    display: flex;
    gap: 8px;
    align-items: center;
}

#app-install-banner button.download {
    background: var(--cookie-accept);
    color: var(--color-white);
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    font-size: 1rem;
}

#app-install-banner button.download:hover {
    background: var(--cookie-accept-hover);
}

#app-install-banner button.hide {
    background: var(--cookie-decline);
    color: var(--color-white);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

@media screen and (max-width: 600px) {
    #app-install-banner {
        display: flex;
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    #app-install-banner .buttons {
        justify-content: space-between;
    }

    #app-install-banner button.hide {
        width: 40px;
        height: 40px;
        align-self: flex-end;
    }
}

.intro {
    background-color: var(--intro-bg);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 5px;
    display: block;
}

.question-container {
    margin-bottom: 2rem;
    border-radius: 0.375rem;
    min-width: 300px;
}

.question-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.answer-option {
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--color-accent);
    border: 2px solid var(--color-accent);
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.answer-option:hover {
    border-color: var(--color-text);
}

.answer-option.selected {
    border-color: var(--color-text);
    font-weight: 500;
}

.answer-option.correct {
    border-color: var(--good);
    background-color: var(--good-bg);
    color: var(--good-text);
}

.answer-option.incorrect {
    border-color: var(--danger-strong);
    background-color: var(--danger-weak);
    color: var(--danger-strong);
}

.test-summary {
    margin-top: 2rem;
    padding: 1.5rem;
    border-radius: 10px;
    text-align: center;
}

.test-summary.excellent {
    background-color: var(--good-bg);
    border: 2px solid var(--good-border);
    color: var(--good-text);
}

.test-summary.good {
    background-color: var(--warning-bg);
    border: 2px solid var(--warning-border);
    color: var(--warning-text);
}

.test-summary.poor {
    background-color: var(--danger-bg);
    border: 2px solid var(--danger-border);
    color: var(--danger-text);
}

.progress-bar {
    height: 20px;
    background-color: var(--color-muted-light);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-light-accent), var(--color-accent));
    transition: width 0.3s ease;
    border-radius: 10px;
}

.question-counter {
    font-size: 0.9rem;
    opacity: 75%;
    margin-bottom: 1rem;
}

.text-input-container {
    margin-bottom: 1rem;
}

.text-answer-input {
    width: 100%;
    padding: 0.75rem;
    border-radius: 10px;
    border: 2px solid var(--color-accent);
    background-color: var(--color-accent);
    color: var(--color-button-text);
    font-family: var(--font-family-serif);
    font-size: 20px;
    transition: all 0.2s ease;
    box-shadow: 2px 2px 10px var(--shadow-sm);
}

.text-answer-input:focus {
    border: 2px solid var(--color-button-text);
    outline: none;
}

.text-answer-input::placeholder {
    color: var(--color-muted-brown-2);
    opacity: 0.7;
}

.text-answer-review {
    margin-bottom: 1rem;
}

.user-text-answer,
.correct-text-answer {
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    border: 2px solid;
}

.user-text-answer.correct {
    border-color: var(--good);
    background-color: var(--good-bg);
    color: var(--good-text);
}

.user-text-answer.incorrect {
    border-color: var(--danger-strong);
    background-color: var(--danger-strong-bg);
    color: var(--danger-strong);
}

.correct-text-answer {
    border-color: var(--good);
    background-color: var(--good-bg);
    color: var(--good-text);
}

.calendar-container {
    width: 100%;
    margin: 0 auto;
    padding: 20px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h2 {
    margin: 0;
    font-size: 1.5rem;
}

.mobile-swipe-hint {
    text-align: center;
    margin-bottom: 10px;
    font-size: 0.8rem;
    opacity: 0.7;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    background-color: var(--color-accent);
    border: 1px solid var(--color-accent);
    width: 100%;
    border-radius: 10px;
}

.day-header {
    background-color: var(--color-card-top);
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 10px;
}

.day-cell {
    background-color: var(--calendar-day);
    height: 150px;
    /* Větší fixní výška pro pojmutí více událostí */
    padding: 5px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s;
    overflow: hidden;
    /* Skryje přetékající obsah */
    border-radius: 10px;
    border: 2px solid var(--calendar-day);
    min-width: 0;
    /* Umožní flexibilní šířku na mobilu */
}

.day-cell:hover {
    opacity: 70%;
}

.day-cell.other-month {
    background-color: var(--calendar-day);
    opacity: 60%;
}

.day-cell.today {
    border-color: var(--color-text);
}

.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}

.events-container {
    display: flex;
    flex-direction: column;
    gap: 1px;
    height: calc(100% - 25px);
    /* Využije zbývající místo po dni čísla */
    overflow: hidden;
}

.event-item {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: 2px 4px;
    border-radius: 3px;
    font-size: 0.8em;
    cursor: pointer;
    position: relative;
    margin-bottom: 1px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: block;
}

.event-time {
    font-weight: bold;
    margin-right: 4px;
}

.event-title {
    font-size: 0.75em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    max-width: calc(100% - 30px);
    /* Rezerva pro čas */
}

.more-events {
    color: var(--color-text-muted);
    font-size: 0.7em;
    cursor: pointer;
    text-decoration: underline;
    margin-top: 2px;
}

/* Desktop styly - pouze pro větší obrazovky */
@media (min-width: 769px) {
    .day-cell {
        width: 95px;
    }
}

/* Mobilní styly */
@media (max-width: 768px) {
    .calendar-container {
        padding: 10px;
    }

    .calendar-header {
        margin-bottom: 15px;
    }

    .calendar-header h2 {
        font-size: 1.2rem;
    }

    .calendar-header .btn {
        padding: 0.375rem 0.5rem;
        font-size: 0.9rem;
    }

    .calendar-grid {
        gap: 2px;
        font-size: 0.8em;
    }

    .day-header {
        padding: 8px 4px;
        font-size: 0.8em;
    }

    .day-cell {
        height: 80px;
        padding: 3px;
        -webkit-tap-highlight-color: transparent;
        /* Odstranění highlightu na iOS */
        user-select: none;
        /* Zabránění výběru textu */
    }

    .day-number {
        font-size: 0.9em;
        margin-bottom: 3px;
    }

    .events-container {
        height: calc(100% - 18px);
        gap: 1px;
    }

    .event-item {
        font-size: 0.65em;
        padding: 1px 2px;
        margin-bottom: 0;
        border-radius: 2px;
        line-height: 1.2;
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        /* Optimalizace pro dotyky */
    }

    .event-time {
        font-size: 0.6em;
        margin-right: 2px;
    }

    .event-title {
        font-size: 0.65em;
        max-width: calc(100% - 25px);
    }

    .more-events {
        font-size: 0.6em;
        margin-top: 1px;
    }

    /* Modal optimalizace pro mobily */
    .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .modal-header {
        padding: 0.75rem 1rem;
    }

    .modal-body {
        padding: 1rem;
        font-size: 0.9rem;
    }

    .modal-footer {
        padding: 0.75rem 1rem;
    }

    .modal-title {
        font-size: 1.1rem;
    }
}

/* Extra malé mobilní zařízení */
@media (max-width: 480px) {
    .calendar-container {
        padding: 5px;
    }

    .calendar-header h2 {
        font-size: 1rem;
    }

    .calendar-header .btn {
        padding: 0.25rem 0.4rem;
        font-size: 0.8rem;
    }

    .day-cell {
        height: 70px;
        padding: 2px;
    }

    .day-number {
        font-size: 0.8em;
        margin-bottom: 2px;
    }

    .events-container {
        height: calc(100% - 15px);
    }

    .event-item {
        font-size: 0.6em;
        padding: 1px;
    }

    .event-time {
        font-size: 0.55em;
    }

    .event-title {
        font-size: 0.6em;
        max-width: calc(100% - 20px);
    }

    .more-events {
        font-size: 0.55em;
    }
}

/* Styles moved from Components/Pages/AllQuestions.razor */
.questions-table {
    font-family: var(--font-family-serif);
    font-weight: 450;
    font-size: 18px;
}

.questions-table th {
    font-family: var(--font-family-sans);
    font-weight: 500;
    font-size: 16px;
    background-color: var(--color-accent-2) !important;
    color: var(--color-button-text);
    border: none;
}

.questions-table td {
    padding: 0.5rem;
    vertical-align: middle;
    border-bottom: 1px solid var(--color-accent);
}

.questions-table tbody tr {
    transition: all 0.3s ease;
}

.questions-table tbody tr:hover:not(.question-detail-row) {
    background-color: var(--color-accent) !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.questions-table tbody tr.table-active {
    background-color: var(--color-accent-2) !important;
    color: var(--color-button-text);
}

.question-detail-row {
    background-color: var(--color-accent-4) !important;
}

.question-detail-content {
    padding: 1rem;
    background-color: var(--color-accent-4);
    border-radius: 10px;
    margin: 0.5rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
}

.detail-section {
    background-color: var(--color-accent);
    padding: 0.75rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 1px 1px 5px rgba(0, 0, 0, 0.1);
    width: 100%;
    min-height: 150px;
    display: flex;
    flex-direction: column;
}

.detail-section h6 {
    font-family: var(--font-family-sans);
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 0.5rem;
    color: var(--color-button-text);
}

.answer-item {
    padding: 0.25rem 0.5rem;
    margin-bottom: 0.25rem;
    border-radius: 5px;
    font-size: 16px;
    display: flex;
    align-items: center;
    background-color: var(--color-accent-2);
    color: var(--color-button-text);
}

.answer-item.correct-answer {
    border-color: var(--good);
    background-color: var(--good-bg);
    color: var(--good-text);
}

.explanation-item {
    padding: 0.5rem;
    margin-bottom: 0.25rem;
    background-color: var(--color-accent-2);
    border-left: 3px solid var(--color-button-text);
    border-radius: 5px;
    font-size: 16px;
    color: var(--color-button-text);
}

.answers-list,
.explanations-list {
    max-height: 200px;
    overflow-y: auto;
}

.question-text-full {
    font-weight: 600;
    color: var(--color-button-text);
}

.question-detail-row-flex {
    display: flex;
    gap: 1rem;
    width: 100%;
    align-items: stretch;
}

.detail-col {
    flex: 1;
    min-width: 0;
    display: flex;
}

.filter-panel {
    background-color: var(--color-accent-4);
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.1);
    max-height: 600px;
    overflow-y: auto;
}

.filter-header {
    font-family: var(--font-family-sans);
    font-weight: 500;
    font-size: 16px;
    margin-bottom: 0.75rem;
    color: var(--color-button-text);
    border-bottom: 2px solid var(--color-accent-2);
    padding-bottom: 0.5rem;
}

.category-tree {
    font-family: var(--font-family-serif);
    font-size: 16px;
}

.category-item {
    display: flex;
    align-items: center;
    padding: 0.375rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--color-accent);
    border: 2px solid transparent;
    margin-bottom: 2px;
}

.category-item:hover {
    border-color: var(--color-button-text);
}

.category-item.selected {
    border-color: var(--color-button-text);
    font-weight: 600;
    background-color: var(--color-accent-2);
}

.category-item.has-children {
    font-weight: 500;
}

.expand-toggle {
    background: none;
    border: none;
    color: var(--color-button-text);
    cursor: pointer;
    padding: 0;
    margin-right: 0.5rem;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}

.expand-toggle:hover {
    color: var(--color-text);
}

.category-children {
    margin-left: 1.25rem;
    border-left: 2px solid var(--color-accent-2);
    padding-left: 0.75rem;
    margin-top: 0.25rem;
}

.post-item {
    display: flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: var(--good-bg);
    border: 2px solid transparent;
    margin-bottom: 2px;
    font-size: 14px;
}

.post-item:hover {
    border-color: var(--good-text);
}

.post-item.selected {
    border-color: var(--good-text);
    font-weight: 600;
    background-color: var(--good-border);
}

.post-icon {
    margin-right: 0.5rem;
    color: var(--good-text);
}

.question-count {
    margin-left: 0.5rem;
    font-weight: 500;
    color: var(--color-text-muted);
    font-size: 0.9em;
    opacity: 0.8;
}

.category-item .question-count {
    color: var(--color-muted-brown-2);
}

.category-item.selected .question-count {
    color: var(--color-button-text);
    font-weight: 600;
}

.post-item .question-count {
    color: var(--good);
}

.post-item.selected .question-count {
    color: var(--color-white);
}

.questions-table .badge {
    font-family: var(--font-family-sans);
    font-weight: 500;
    font-size: 12px;
    padding: 0.35em 0.65em;
    border-radius: 0.375rem;
}

.questions-table .badge.bg-primary {
    background-color: var(--color-accent-2) !important;
    color: var(--color-button-text);
}

.questions-table .badge.bg-info {
    background-color: var(--color-accent) !important;
    color: var(--color-button-text);
}

.text-muted {
    color: var(--color-text-muted) !important;
}



/* Styly pro vylepšený modal */
.event-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.detail-row i {
    margin-top: 0.1rem;
    width: 16px;
    color: var(--color-text-muted);
}

.detail-row.description {
    align-items: flex-start;
}

.description-text {
    margin-top: 0.25rem;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.event-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
}

.event-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--overlay-bg);
    z-index: 9998;
}

.event-modal-content {
    background-color: var(--modal-bg);
    border-radius: 8px;
    box-shadow: 0 10px 25px var(--shadow-medium);
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    overflow: hidden;
    max-width: 500px;
    width: 90%;
}

.event-title-section {
    padding: 1.5rem 1.5rem 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-and-color {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.modal-event-title {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 0;
    word-wrap: break-word;
    text-decoration: none;
}

.event-color-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 2px solid var(--color-white);
    box-shadow: 0 2px 4px var(--shadow-sm);
}

.event-modal-close {
    background: var(--cookie-decline);
    border: none;
    font-size: 24px;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.event-modal-close:hover {
    background-color: var(--cookie-decline-hover);
    color: var(--color-white);
}

.event-modal-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    flex: 1;
    overflow-y: auto;
    max-height: calc(90vh - 140px);
}

.related-posts {
    margin-top: 10px;
}

.related-posts a {
    padding: 0;
    margin: 20px 0 0;
    display: block;
    text-decoration: none;
}

.related-posts:hover {
    color: var(--color-accent-3);
}

.related-posts-div {
    padding: 10px;
    border-radius: 10px;
    transition: all ease 0.3s;
}

.related-posts-div h5 {
    margin: 0;
}

.related-posts-div:hover {
    background-color: var(--hover-bg);
}

/* Decorative ribbons for CategoryList */
.decorative-ribbons {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.ribbon {
    position: absolute;
    opacity: 0.15;
    transition: all 0.3s ease;
}

.ribbon path {
    stroke-linecap: round;
}

.ribbon-1 {
    width: 350px;
    height: 1600px;
    top: -200px;
    left: 180px;
}

.ribbon-2 {
    width: 400px;
    height: 1400px;
    bottom: -150px;
    left: 230px;
}

.ribbon-3 {
    width: 380px;
    height: 1500px;
    top: -250px;
    right: 30px;
}

.ribbon-4 {
    width: 360px;
    height: 1450px;
    bottom: -200px;
    right: 80px;
}

.ribbon-5 {
    width: 340px;
    height: 100vh;
    bottom: 0;
    left: 230px;
}

.ribbon-6 {
    width: 100%;
    max-width: 2000px;
    height: 35vh;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.ribbon-7 {
    width: 350px;
    height: 1600px;
    top: -200px;
    left: 50px;
    transform: rotate(-8deg);
}

.ribbon-8 {
    width: 380px;
    height: 1400px;
    bottom: -150px;
    right: 100px;
    transform: rotate(12deg);
}

.ribbon-9 {
    width: 360px;
    height: 1500px;
    top: -250px;
    left: 450px;
    transform: rotate(-15deg);
}

.ribbon-10 {
    width: 370px;
    height: 1450px;
    bottom: -200px;
    left: 500px;
    transform: rotate(10deg);
}

.ribbon-11 {
    width: 100%;
    max-width: 2000px;
    height: 35vh;
    top: 10%;
    left: 50%;
    transform: translateX(-50%) rotate(2deg);
}

.ribbon-12 {
    width: 340px;
    height: 1800px;
    top: -100px;
    right: 200px;
    transform: rotate(-6deg);
}

@media only screen and (max-width: 600px) {
    .ribbon {
        opacity: 0.1;
    }

    .ribbon-1 {
        width: 130px;
        height: 1000px;
        top: -150px;
        left: -30px;
    }

    .ribbon-2 {
        width: 120px;
        height: 900px;
        bottom: -100px;
        left: -20px;
    }

    .ribbon-3 {
        width: 140px;
        height: 1050px;
        top: -180px;
        right: -30px;
    }

    .ribbon-4 {
        width: 125px;
        height: 950px;
        bottom: -120px;
        right: -20px;
    }

    .ribbon-5 {
        width: 110px;
        height: 750px;
        left: -20px;
    }

    .ribbon-6 {
        width: 100%;
        height: 120px;
        bottom: -30px;
    }

    .ribbon-7 {
        width: 130px;
        height: 1000px;
        top: -150px;
        left: -40px;
    }

    .ribbon-8 {
        width: 140px;
        height: 900px;
        bottom: -100px;
        right: -30px;
    }

    .ribbon-9 {
        width: 125px;
        height: 1050px;
        top: -180px;
        left: 20px;
    }

    .ribbon-10 {
        width: 135px;
        height: 950px;
        bottom: -120px;
        left: 30px;
    }

    .ribbon-11 {
        width: 100%;
        height: 120px;
        top: 10%;
    }

    .ribbon-12 {
        width: 110px;
        height: 1100px;
        top: -50px;
        right: -25px;
    }
}

@media (max-width: 600px) {
    .ribbon {
        display: none;
    }
}

/* Global strong styling: accent color + sharp zigzag underline */
strong {
    color: var(--color-accent-strong-text);
    font-weight: 700;
    position: relative;
    /* Ensure the pseudo-element can position relative to text baseline */
    display: inline-block;
}

/* Fallback for browsers supporting wavy underline */
strong {
    text-decoration: underline;
    text-decoration-color: var(--color-accent-strong);
    text-decoration-style: wavy;
    text-decoration-thickness: 2px;
    text-underline-offset: 5px;
}

strong::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 10px;
    bottom: -2px;
    pointer-events: none;
    background-repeat: repeat-x;
    background-position: 0 100%;
    background-size: auto 10px;
    transform: translateY(2px);
}

.tools {
    display: flex;
    justify-content: space-between;
    border-radius: 10px;
    height: 15px;
    padding: 20px;
    background-color: var(--intro-light-bg);
}

.tool {
    display: flex;
    border-radius: 10px;
    padding: 0;
    justify-items: center;
    align-items: center;
}

.tool button {
    padding: 3px;
    background-color: transparent;
    box-shadow: none;
    transition: all ease 0.2s;
    font-size: 20px;
    width: 40px;
    height: 40px;
    margin: 3px;
    color: var(--color-button-text);
}

.tool button:hover {
    background-color: var(--intro-light-button);
    transform: none;
}

.tool span {
    font-size: 18px;
    white-space: nowrap;
}

@media only screen and (max-width: 600px) {
    .tools {
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 10px;
        justify-content: center;
    }

    .tool {
        flex-shrink: 0;
        justify-content: center;
    }

    .tool:nth-child(2) {
        flex-basis: 100%;
        order: 2;
    }

    .tool span {
        font-size: 12px;
    }
}

.secondary {
    color: var(--color-button-text);
    background-color: var(--color-accent-secondary);
}

.secondary:hover {
    background-color: var(--color-accent-secondary-hover);
}

/* Breadcrumb navigation */
.breadcrumb-nav {
    margin: 1rem 0;
    font-size: 0.9rem;
}

.breadcrumb-nav a {
    color: var(--color-accent-strong);
    text-decoration: none;
    transition: all 0.3s ease;
}

.breadcrumb-nav a:hover {
    color: var(--color-accent-3);
}

.breadcrumb-nav .separator {
    margin: 0 0.5rem;
    color:  #999;
}

.breadcrumb-nav .current {
    color: var(--color-text);
    font-weight: 500;
}

/* Snowflakes animation */
.snowflakes {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

.snowflake {
    position: absolute;
    color: #b15f88;
    font-size: 2em;
    user-select: none;
    animation: fall linear infinite;
    opacity: 0.8;
}

@media only screen and (max-width: 600px) {
    .snowflake:nth-child(2n), .snowflake:nth-child(4n), .snowflake:nth-child(6n), .snowflake:nth-child(8n), .snowflake:nth-child(10n), .snowflake:nth-child(12n), .snowflake:nth-child(14n), .snowflake:nth-child(16n), .snowflake:nth-child(18n), .snowflake:nth-child(20n) {
        display: none;
    }
}

.snowflake:nth-child(1n) { left: 1%; top: -20%; animation-duration: 8s; animation-delay: 0s; font-size: 2.2em; }
.snowflake:nth-child(2n) { left: 10%; top: -35%; animation-duration: 12s; animation-delay: 1s; font-size: 2.8em; }
.snowflake:nth-child(3n) { left: 20%; top: -15%; animation-duration: 10s; animation-delay: 3s; font-size: 2em; }
.snowflake:nth-child(4n) { left: 30%; top: -45%; animation-duration: 14s; animation-delay: 2s; font-size: 2.5em; }
.snowflake:nth-child(5n) { left: 40%; top: -25%; animation-duration: 9s; animation-delay: 4s; font-size: 2.3em; }
.snowflake:nth-child(6n) { left: 50%; top: -30%; animation-duration: 11s; animation-delay: 1.5s; font-size: 2.7em; }
.snowflake:nth-child(7n) { left: 60%; top: -40%; animation-duration: 13s; animation-delay: 0.5s; font-size: 2.4em; }
.snowflake:nth-child(8n) { left: 70%; top: -18%; animation-duration: 15s; animation-delay: 3.5s; font-size: 2.1em; }
.snowflake:nth-child(9n) { left: 80%; top: -28%; animation-duration: 10s; animation-delay: 2.5s; font-size: 2.6em; }
.snowflake:nth-child(10n) { left: 90%; top: -50%; animation-duration: 12s; animation-delay: 4.5s; font-size: 2.2em; }
.snowflake:nth-child(11n) { left: 5%; top: -22%; animation-duration: 9s; animation-delay: 1s; font-size: 2.3em; }
.snowflake:nth-child(12n) { left: 15%; top: -38%; animation-duration: 11s; animation-delay: 2s; font-size: 2.5em; }
.snowflake:nth-child(13n) { left: 25%; top: -16%; animation-duration: 13s; animation-delay: 0s; font-size: 2.1em; }
.snowflake:nth-child(14n) { left: 35%; top: -42%; animation-duration: 14s; animation-delay: 3s; font-size: 2.4em; }
.snowflake:nth-child(15n) { left: 45%; top: -32%; animation-duration: 10s; animation-delay: 1.5s; font-size: 2.6em; }
.snowflake:nth-child(16n) { left: 55%; top: -26%; animation-duration: 12s; animation-delay: 4s; font-size: 2.2em; }
.snowflake:nth-child(17n) { left: 65%; top: -48%; animation-duration: 8s; animation-delay: 0.5s; font-size: 2.7em; }
.snowflake:nth-child(18n) { left: 75%; top: -36%; animation-duration: 15s; animation-delay: 2.5s; font-size: 2.3em; }
.snowflake:nth-child(19n) { left: 85%; top: -44%; animation-duration: 9s; animation-delay: 3.5s; font-size: 2.8em; }
.snowflake:nth-child(20n) { left: 95%; top: -24%; animation-duration: 11s; animation-delay: 1s; font-size: 2em; }

@keyframes fall {
    0% {
        transform: translateX(0) translateY(0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.8;
    }
    25% {
        transform: translateX(10px) translateY(25vh) rotate(90deg);
    }
    50% {
        transform: translateX(-10px) translateY(50vh) rotate(180deg);
    }
    75% {
        transform: translateX(10px) translateY(75vh) rotate(270deg);
    }
    90% {
        opacity: 0.8;
    }
    100% {
        transform: translateX(0) translateY(110vh) rotate(360deg);
        opacity: 0;
    }
}

/* Dark mode styles */
body.dark-mode .ribbon {
    opacity: 0.08;
}

body.dark-mode .ribbon path {
    opacity: 0.8;
}

body.dark-mode {
    background-color: var(--color-bg-dark);
    color: var(--color-text-dark);
}

body.dark-mode .grid-item-pred {
    border-color: var(--color-accent-2-dark);
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .grid-item-pred:hover {
    border-color: var(--color-text-dark);
}

body.dark-mode button {
    background-color: var(--color-button-bg-dark);
}

body.dark-mode button:hover {
    background-color: var(--color-button-hover-dark);
}

body.dark-mode #MyNavBar {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .scrollable-menu {
    scrollbar-color: var(--color-accent-dark) var(--color-accent-2-dark);
}

body.dark-mode .mobile-menu {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .mobile-menu .nav-link:hover {
    background-color: var(--color-accent-dark);
}

body.dark-mode .mobile-header {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode p,
body.dark-mode .footer-content p,
body.dark-mode li,
body.dark-mode ul,
body.dark-mode textarea,
body.dark-mode .email-input,
body.dark-mode .opinion-input,
body.dark-mode #search,
body.dark-mode .version-info,
body.dark-mode button,
body.dark-mode #myNavbar a,
body.dark-mode .nav-text,
body.dark-mode #MyNavBar .nav-link,
body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode #MyNavBar .nav-text,
body.dark-mode #MyNavBar .nav-item {
    color: var(--color-text-dark);
}

body.dark-mode hr {
    background-color: var(--color-text-dark);
}

body.dark-mode .version-info {
    border-top: 3px solid var(--color-accent-dark);
    color: var(--color-text-dark);
}

body.dark-mode #MyNavBar .nav-link:hover {
    background-color: var(--color-accent-dark);
}


body.dark-mode .footer-content a,
body.dark-mode main a {
    color: var(--color-accent-strong-dark);
    text-decoration-color: var(--color-accent-strong-dark);
}

body.dark-mode .footer-content a:hover,
body.dark-mode main a:hover {
    color: var(--color-accent-3-dark);
}

body.dark-mode .Mcard {
    background-color: var(--color-card-bg-dark);
    border: 1px solid var(--color-card-top-dark);
}

body.dark-mode .Minfo {
    background-color: var(--color-card-top-dark);
}

body.dark-mode .loading-bar {
    background-color: var(--color-accent-dark);
}

body.dark-mode .opinion-input,
body.dark-mode .opinion-input,
body.dark-mode .email-input,
body.dark-mode #search,
body.dark-mode textarea {
    border: 2px solid var(--color-accent-dark);
    background-color: var(--color-accent-dark);
}

body.dark-mode .opinion-input:focus,
body.dark-mode .email-input:focus,
body.dark-mode #search:focus,
body.dark-mode textarea:focus {
    border: 2px solid var(--color-text-dark);
    outline: none;
}

body.dark-mode img:not(.navImg, footer img),
body.dark-mode img:not(.navImg, footer img),
body.dark-mode video {
    border: 5px solid var(--color-accent-dark);
}

body.dark-mode .underlined::selection {
    background-color: var(--color-accent-strong-dark);
    color: var(--color-selection-text-dark);
}

body.dark-mode .search-container {
    background: var(--color-bg-dark);
}

body.dark-mode .search-header {
    border-bottom-color: var(--color-text-dark);
}

body.dark-mode .search-input-wrapper {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

body.dark-mode .search-input-wrapper:focus-within {
    border-color: var(--color-text-dark);
}

body.dark-mode .search-input-wrapper #search {
    background-color: transparent;
    border: none;
}

body.dark-mode .search-icon {
    color: var(--color-text-dark);
}

body.dark-mode #search {
    color: var(--color-text-dark);
}

body.dark-mode #search::placeholder {
    color: var(--color-white);
    opacity: 0.7;
}

body.dark-mode .search-close {
    color: var(--color-text-dark);
}

body.dark-mode .search-close:hover {
    color: var(--color-white);
}

body.dark-mode .search-shortcut {
    color: var(--color-text-dark);
}

body.dark-mode .search-shortcut .key-icon {
    background: transparent;
    border-color: var(--color-white-70);
    color: var(--color-text-dark);
}

body.dark-mode .search-results {
    scrollbar-color: var(--color-accent-dark) var(--color-bg-dark);
}

body.dark-mode .search-result {
    color: var(--color-text-dark);
    border-color: transparent;
    background: transparent;
}

body.dark-mode .search-result:hover {
    border-color: var(--color-text-dark);
    background: transparent;
}

/* Vypnutí hover efektů při keyboard navigaci v dark mode */
body.dark-mode .search-results.keyboard-navigation .search-result:hover {
    background: transparent;
}

body.dark-mode .search-result.selected {
    border-color: var(--color-white);
}

body.dark-mode .result-title {
    color: var(--color-white);
}

body.dark-mode .search-result.selected .result-title {
    color: var(--color-white);
}

body.dark-mode .search-snippet {
    color: var(--color-white);
}

body.dark-mode .search-result.selected .search-snippet {
    color: var(--color-white);
}

body.dark-mode .search-snippet strong {
    background: var(--color-accent-3-dark);
    color: var(--color-white);
}

body.dark-mode .search-empty,
body.dark-mode .search-empty,
body.dark-mode .search-no-results {
    color: var(--color-text-dark);
    background: var(--color-bg-dark);
}

body.dark-mode .search-empty h3,
body.dark-mode .search-no-results h3 {
    color: var(--color-text-dark);
}

body.dark-mode .search-empty i,
body.dark-mode .search-empty i,
body.dark-mode .search-no-results i {
    color: var(--color-accent-dark);
}

body.dark-mode .search-empty p,
body.dark-mode .search-empty p,
body.dark-mode .search-no-results p {
    color: var(--color-text-muted-dark);
}

body.dark-mode .search-more-results {
    border-top-color: var(--color-white);
    color: var(--color-white);
}

body.dark-mode .key-icon {
    border: 1px solid var(--color-text-dark);
    color: var(--color-text-dark);
}

body.dark-mode .blog-image a,
body.dark-mode .blog-image a:hover {
    background-color: transparent;
}

body.dark-mode .blog-image p a {
    background-color: var(--color-accent-dark);
}

body.dark-mode .blog-image p a:hover {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .blog-image p {
    border: 5px solid var(--color-card-top-dark);
    background-color: var(--color-accent-4-dark);
}

body.dark-mode .opinion-card {
    background-color: var(--color-card-top-dark);
}

body.dark-mode .opinion-meta {
    color: var(--color-text-muted-dark);
}

body.dark-mode #cookie-consent button {
    background: var(--cookie-accept-dark);
    color: var(--color-white);
}

body.dark-mode #cookie-consent button:hover {
    background: var(--cookie-accept-hover-dark);
}

body.dark-mode #cookie-consent .decline {
    background: var(--cookie-decline-dark);
}

body.dark-mode #cookie-consent .decline:hover {
    background: var(--cookie-decline-hover-dark);
}

body.dark-mode #cookie-consent {
    background-color: rgba(209, 117, 166, 0.3);
    backdrop-filter: blur(10px);
}

/* loading-bar already handled above */

body.dark-mode .grid {
    border: 2px solid var(--color-accent-3-dark);
}

body.dark-mode .grid-item {
    border-bottom: 2px solid var(--color-accent-3-dark);
    background: var(--color-accent-2-dark);
}

body.dark-mode .grid-item:last-child {
    border-bottom: none;
}

body.dark-mode .grid-item a:hover {
    background-color: var(--color-accent-3-dark);
    border-radius: 0;
}

body.dark-mode #results a:hover {
    color: var(--color-text-dark);
}

body.dark-mode .verybig {
    color: var(--color-text-dark);
}

body.dark-mode .grid-item-sesit {
    border-color: var(--color-sesit-border);
    background-color: var(--color-sesit-bg);
}

body.dark-mode .grid-item-sesit:hover {
    border-color: var(--color-sesit-border);
}

body.dark-mode .grid-item-sesit a {
    background-color: var(--color-sesit-bg);
}

body.dark-mode .grid-item-sesit a:hover {
    background-color: var(--color-sesit-bg-dark);
}

body.dark-mode .intro {
    background-color: var(--intro-bg-dark);
    color: var(--color-text-dark);
}

body.dark-mode a:has(.navImg) {
    border-bottom: 3px solid var(--color-accent-dark);
}

body.dark-mode .answer-option {
    background-color: var(--color-accent-dark);
    border: 2px solid var(--color-accent-dark);
}

body.dark-mode .answer-option:hover {
    border-color: var(--color-white);
}

body.dark-mode .answer-option.selected {
    border-color: var(--color-white);
}


body.dark-mode .answer-option.correct {
    border-color: var(--success-2);
    background-color: var(--success-2);
    color: var(--color-white);
}

body.dark-mode .answer-option.incorrect {
    border-color: var(--danger-strong-dark);
    background-color: var(--danger-strong-dark);
    color: var(--color-white);
}

body.dark-mode .test-summary.excellent {
    background-color: var(--test-excellent-bg-dark);
    border: 2px solid var(--test-excellent-border-dark);
    color: var(--good);
}

body.dark-mode .test-summary.good {
    background-color: var(--test-good-bg-dark);
    border: 2px solid var(--test-good-border-dark);
    color: var(--test-good-text-dark);
}

body.dark-mode .test-summary.poor {
    background-color: var(--test-poor-bg-dark);
    border: 2px solid var(--test-poor-border-dark);
    color: var(--test-poor-text-dark);
}

/* Slightly reduce underline size on very small screens */
@media (max-width: 480px) {
    strong::after {
        height: 8px;
        background-size: auto 8px;
        bottom: -1px;
    }
}

body.dark-mode .progress-bar {
    height: 20px;
    background-color: var(--progress-bar-dark);
    border-radius: 10px;
    overflow: hidden;
    margin: 1rem 0;
}

body.dark-mode .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--color-accent-2-dark), var(--color-accent-dark));
    transition: width 0.3s ease;
    border-radius: 10px;
}

body.dark-mode .btn-success {
    background-color: var(--color-success-dark);
}

body.dark-mode .btn-success:hover {
    background-color: var(--color-success-hover-dark);
}

body.dark-mode .btn-danger {
    background-color: var(--color-danger);
}

body.dark-mode .btn-danger:hover {
    background-color: var(--color-danger-hover);
}

body.dark-mode .text-answer-input {
    border: 2px solid var(--color-accent-dark);
    background-color: var(--color-accent-dark);
    color: var(--color-text-dark);
}

body.dark-mode .text-answer-input:focus {
    border: 2px solid var(--color-text-dark);
    outline: none;
}

body.dark-mode .text-answer-input::placeholder {
    color: var(--muted-tan);
    opacity: 0.7;
}

body.dark-mode .user-text-answer.correct {
    border-color: var(--success-2);
    background-color: var(--success-2);
    color: var(--color-white);
}

body.dark-mode .user-text-answer.incorrect {
    border-color: var(--danger-strong-dark);
    background-color: var(--danger-strong-dark);
    color: var(--color-white);
}

body.dark-mode .correct-text-answer {
    border-color: var(--success-2);
    background-color: var(--test-excellent-bg-dark);
    color: var(--good);
}

body.dark-mode .calendar-grid {
    background-color: var(--color-accent-dark);
    border: 1px solid var(--color-accent-dark);
}

body.dark-mode .day-header {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .day-cell {
    background-color: var(--calendar-day-dark);
    border: 2px solid var(--calendar-day-dark);
}

body.dark-mode .day-cell.today {
    border-color: var(--color-white);
}

body.dark-mode .event-item {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
}

body.dark-mode .more-events {
    color: var(--color-text-muted);
}

body.dark-mode .detail-row i {
    color: var(--color-text-muted);
}

body.dark-mode .event-modal-content {
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .related-posts-div:hover {
    background-color: var(--intro-bg-dark);
}

/* Dark variants moved from component: AllQuestions */
body.dark-mode .questions-table th {
    background-color: var(--color-accent-2-dark) !important;
    color: var(--color-text-dark);
}

body.dark-mode .questions-table td {
    border-bottom: 1px solid var(--color-accent-dark);
}

body.dark-mode .questions-table tbody tr:hover:not(.question-detail-row) {
    background-color: var(--color-accent-dark) !important;
}

body.dark-mode .questions-table tbody tr.table-active {
    background-color: var(--color-accent-2-dark) !important;
    color: var(--color-text-dark);
}

body.dark-mode .question-detail-row {
    background-color: var(--color-accent-4-dark) !important;
}

body.dark-mode .question-detail-content {
    background-color: var(--color-accent-4-dark);
}

body.dark-mode .detail-section {
    background-color: var(--color-accent-dark);
}

body.dark-mode .detail-section h6 {
    color: var(--color-text-dark);
}

body.dark-mode .answer-item {
    background-color: var(--color-accent-2-dark);
    color: var(--color-text-dark);
}

body.dark-mode .answer-item.correct-answer {
    border-color: var(--success-2);
    background-color: var(--success-2);
    color: var(--color-white);
}

body.dark-mode .explanation-item {
    background-color: var(--color-accent-2-dark);
    border-left: 3px solid var(--color-text-dark);
    color: var(--color-text-dark);
}

body.dark-mode .question-text-full {
    color: var(--color-text-dark);
}

body.dark-mode .questions-table .badge.bg-primary {
    background-color: var(--color-accent-2-dark) !important;
    color: var(--color-text-dark);
}

body.dark-mode .questions-table .badge.bg-info {
    background-color: var(--color-accent-dark) !important;
    color: var(--color-text-dark);
}

body.dark-mode .text-muted {
    color: var(--color-text-muted-dark) !important;
}

body.dark-mode .filter-panel {
    background-color: var(--color-accent-4-dark);
}

body.dark-mode .filter-header {
    color: var(--color-text-dark);
    border-bottom: 2px solid var(--color-accent-2-dark);
}

body.dark-mode .category-item {
    background-color: var(--color-accent-dark);
}

body.dark-mode .category-item:hover {
    border-color: var(--color-text-dark);
}

body.dark-mode .category-item.selected {
    border-color: var(--color-text-dark);
    background-color: var(--color-accent-2-dark);
}

body.dark-mode .expand-toggle {
    color: var(--color-text-dark);
}

body.dark-mode .expand-toggle:hover {
    color: var(--color-white);
}

body.dark-mode .category-children {
    border-left: 2px solid var(--color-accent-2-dark);
}

body.dark-mode .post-item {
    background-color: var(--test-good-bg-dark);
}

body.dark-mode .post-item:hover {
    border-color: var(--good);
}

body.dark-mode .post-item.selected {
    border-color: var(--good);
    background-color: var(--test-good-border-dark);
}

body.dark-mode .post-icon {
    color: var(--good);
}

body.dark-mode .question-count {
    color: var(--color-text-muted-dark);
}

body.dark-mode .category-item .question-count {
    color: var(--muted-tan);
}

body.dark-mode .category-item.selected .question-count {
    color: var(--color-text-dark);
}

body.dark-mode .post-item .question-count {
    color: var(--good);
}

body.dark-mode .post-item.selected .question-count {
    color: var(--color-white);
}

body.dark-mode .related-posts-div:hover {
    background-color: var(--hover-bg-dark);
}

body.dark-mode strong {
    color: var(--color-accent-2);
    text-decoration-color: var(--color-accent-strong-dark);
}

body.dark-mode .tools {
    background-color: var(--intro-light-bg-dark);
}

body.dark-mode .tool button {
    background-color: transparent;
    color: var(--color-button-text-dark);
}

body.dark-mode .tool button:hover {
    background-color: var(--intro-light-button-dark);
}

body.dark-mode #app-install-banner {
    background-color: rgba(209, 117, 166, 0.3);
    backdrop-filter: blur(10px);
}

body.dark-mode .secondary {
    color: var(--color-button-text-dark);
    background-color: var(--color-accent-secondary-dark);
}

body.dark-mode .secondary:hover {
    background-color: var(--color-accent-secondary-hover-dark);
}

body.dark-mode .breadcrumb-nav a {
    color: var(--color-accent-strong-dark);
}

body.dark-mode .breadcrumb-nav a:hover {
    color: var(--color-accent-3-dark);
}
body.dark-mode .breadcrumb-nav .current {
    color: var(--color-text-dark);
    font-weight: 500;
}
body.dark-mode .mobile-menu-header, body.dark-mode .mobile-menu {
    background-color: var(--color-accent-2-dark);
}
body.dark-mode .menu-grid-item {
    background-color: var(--color-accent-3-dark);
}

body.dark-mode .menu-grid-item:hover {
    background-color: var(--color-accent-2-dark);
}
body.dark-mode .mobile-menu-header h5, body.dark-mode .section-title {
    color: var(--color-text-dark);
}