html, body {
    height: 100%;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    background-color: orange;
    color: blue;
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    width: 100vw;
}

a {
    color: blue;
}

header {
    display: block;
    width: 100vw;
    background-color: blue;
    color: white;
    text-align: center;
    padding: 5px;
}

header * {
    margin: 5px;
}

main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 1rem;
    overflow: hidden;
}

footer {
    background-color: black;
    height: 15px;
    color: white;
    text-align: center;
    padding: 10px;
    width: 100vw;
    justify-content: center;
}

footer p {
    margin: auto;
}

#link-list {
    border-radius: 10px;
    background-color: white;
    display: grid;
    grid-template-columns: 2fr 1.2fr;
    margin: 1rem auto;
    padding: 1rem 2rem 1rem 2rem;
    max-width: 50vw;
    gap: 1.25rem;
}

#root #guestbook-app {
    background-color: white;
}

.content-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    overflow: hidden;
}

.guestbook-wrapper {
    border-radius: 10px;
    background-color: #f4f6f8;
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
}

#left-blocks,
#right-blocks {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    bottom: -30px;
    pointer-events: none;
    z-index: 1;
}

/* Mobile styles */
@media (max-width: 768px) {
    body {
        overflow-x: hidden;
        overflow-y: auto;
    }

    body, html {
        overflow: auto;
    }

    main {
        padding: 10px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header h2 {
        font-size: 1rem;
    }

    #link-list {
        border-radius: 10px;
        background-color: white;
        display: flex;
        justify-content: center;
        max-width: 100vw;
        gap: 0.25rem;
        padding: 0 10px;
    }

    #link-list > div {
        margin-bottom: 1rem;
    }

    #link-list > div:last-child {
        margin-bottom: 0;
    }

    #link-list a {
        word-break: break-all;
    }

    .guestbook-wrapper {
        padding: 1rem;
        margin-top: 1rem;
    }

    #left-blocks,
    #right-blocks {
        display: none;
    }

    footer {
        position: relative;
        height: auto;
        padding: 10px;
    }
}
