html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: sans-serif;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: linear-gradient(180deg, white 0%, #eaeaea 128px);
}

header {
    padding: 4px 12px;
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}

header h1 {
    margin: 12px 0;
    border-bottom: 1px solid black;
}

header a {
    color: black;
    display: inline-block;
    font-weight: normal;
    text-decoration: none;
}

.main .container {
    display: flex;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
    padding: 0 12px 12px;
    gap: 12px;
}

.sidebar {
    width: 200px;
    flex: 0 0 200px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    height: fit-content;
    position: sticky;
    top: 12px;

    @media screen and (max-width: 740px) {
        display: none;
        position: fixed;
        top: 56px;
        background: lightgray;
        padding: 12px;
        border: 1px solid black;
        max-height: calc(100vh - 123px - 48px);
        overflow-y: scroll;
    }

    &.shown {
        display: flex !important;
    }
}

.nav-toggle {
    display: none;
    position: fixed;
    top: 16px;
    border-radius: 0;
    border: 1px solid black;
    font-size: 20px;
    height: 32px;
    width: 32px;
    cursor: pointer;

    @media screen and (max-width: 740px) {
        display: block;
    }
}

.nav-top {
    border-radius: 0;
    border: 1px solid black;
    text-decoration: none;
    color: black;
    font-weight: bold;
    font-size: 12px;
    padding: 3px;
    background: linear-gradient(0deg, #d4d4d4 0%, white 100%);
    text-align: center;
}

.nav-top:hover {
    background: linear-gradient(0deg, #d4d4d4 0%, #eaeaea 100%);
}

.nav-top:active {
    background: linear-gradient(0deg, #eaeaea 0%, #d4d4d4 100%);
}

nav {
    background: white;
    border: 1px solid black;
    box-sizing: border-box;
}

nav h3 {
    margin: 0;
    font-size: 12px;
    padding: 6px 12px;
    border-bottom: 1px solid gray;
    background: linear-gradient(0deg, #d4d4d4 0%, white 100%);
}

nav h3 input {
    margin-top: 2px;
    margin-right: -4px;
    padding: 0;
    cursor: pointer;
    float: right;
}

nav h3:has(input:checked) + ul {
    display: block;
}

/* when the input is not checked */
nav h3:not(:has(input:checked)) {
    border-bottom: none;
}

nav ul {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}



nav li {
    margin: 0;
    font-size: 11px;
    cursor: pointer;
}

nav li a {
    padding: 2px 8px;
    display: flex;
    text-decoration: none;
}

nav li a:hover {
    text-decoration: underline;
}

nav li.active a {
    background: #3d3d3d;
    color: white;
    font-weight: bold;
    cursor: default;
    text-decoration: none !important;
}

nav li.header {
    padding: 2px 8px;
    margin: 0;
    background: #d4d4d4;
    cursor: default;
    border: 1px solid gray;
    border-left: none;
    border-right: none;
}

main {
    background: white;
    border: 1px solid black;
    flex: 1;
    box-sizing: border-box;
    padding: 12px;
    min-width: 0;
    overflow-y: hidden;
}

main h2 {
    margin: 0 0 12px 0;
    padding-bottom: 6px;
    border-bottom: 1px solid gray;
}

main h2 a:nth-child(1) {
    text-decoration: none;
    color: black;
}

main h2 a:nth-child(2) {
    float: right;
    font-size: 12px;
    line-height: 28px;
    text-decoration: none;
}

main h2 a:nth-child(2):hover {
    text-decoration: underline;
}

section {
    background: white;
    width: 90%;
    max-width: 720px;
    margin: 12px auto;
    border: 1px solid black;
}

section h3 {
    margin: 0;
    font-size: 14px;
    padding: 6px 12px;
    border-bottom: 1px solid gray;
    background: linear-gradient(0deg, #d4d4d4 0%, transparent 100%);
}

div.roster {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 12px;
    align-items: center;
}

div.roster a {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid black;
    width: 96px;
    min-height: 150px;
    text-decoration: none;
}

div.roster a .name {
    padding: 4px 8px;
    box-sizing: border-box;
    border-bottom: 1px solid black;
    background: #e4e4e4;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
}

div.roster a .type {
    padding: 4px 8px;
    box-sizing: border-box;
    font-size: 12px;
    text-align: center;
    border-top: 1px solid black;
}

.overview .content {
    display: flex;
    @media screen and (max-width: 500px) {
        .info {
            width: 100%;
            min-width: 100%;
            margin: 0 0 12px;
        }
        flex-direction: column-reverse;
    }
}

.overview p {
    margin-top: 0;
    width: 100%;
    font-size: 14px;
}

.info {
    width: 240px;
    min-width: 240px;
    height: fit-content;
    margin: 0 0 0 12px;
    border-bottom: none;
}

.info img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 12px auto;
}

.info table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    border-top: 1px solid black;
}

.info td {
    padding: 4px 8px;
    border-bottom: 1px solid black;
    font-size: 11px;
}

.info td:nth-child(odd) {
    background: #e4e4e4;
    border-right: 1px solid black;
    font-weight: bold;
    width: 50%;
    vertical-align: top;
}

.mechanics {
    margin-bottom: 12px;
}

.mechanics p {
    margin: 0;
    font-size: 14px;
}

#command-normals, #mechanics, #specials, #supers {
    width: 100%;
}

.move {
    border: 1px solid black;
    display: flex;
    margin: 0 0 12px;
    width: 100%;
    min-height: fit-content;
    overflow: hidden;

    /* re-shifts sizing again when the screen is small enough to justify hiding the sidebar */
    @media screen and (width < 900px) and (width > 740px), screen and (width <= 700px) {
        flex-direction: column;
        .move-info {
            width: unset;
            border-right: none;
            border-bottom: 1px solid black;
        }
    }
}

.move-info {
    display: flex;
    flex-direction: column;
    background: #e4e4e4;
    border-right: 1px solid black;
    min-width: 230px;
    width: 240px;
    padding: 4px 8px;
    gap: 4px;
}

a:has(.move-name) {
    text-decoration: none;
}

.move-name {
    width: 100%;
    margin-bottom: 4px;
    color: black;
}

.move-info .move-input {
    text-align: center;
    width: 100%;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: bold;
}

.image-note {
    font-size: 12px;
    color: dimgray;
    text-align: center;
    font-style: italic;
}

em { font-style: normal }
[button=taunt] { color: darkgoldenrod }
[button=h] { color: crimson }
[button=s] { color: forestgreen }
[button=k] { color: steelblue }
[button=p] { color: #b22ea1 }
[button=x] { color: dimgray }
[button=or] { color: black }
[button=generic] { /* inherit from browser default */ }

.move-info img {
    max-width: 230px;
    height: auto;
    display: block;
    margin: 0 auto;
    font-size: 12px;
}

.move-details {
    font-size: 14px;
    width: 100%;
}

.move-details table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    text-align: center;
    font-size: 12px;
}

.move-details th {
    background: #e4e4e4;
    border-bottom: 1px solid black;
    border-right: 1px solid black;
}

.move-details th:last-child, .move-details td:last-child {
    border-right: none;
}

.move-details td {
    padding: 4px 0;
    font-size: 10px;
    border-bottom: 1px solid black;
    border-right: 1px solid black;
}

.move-details span {
    display: block;
    margin: 0;
    font-weight: normal;
    padding: 6px 12px;
}

.move-details ul {
    margin: 8px 0;
    padding-left: 24px;
}

.ref {
    text-decoration: underline;
    text-decoration-style: dotted;
    font-weight: bold;
}

.ref:hover {
    text-decoration-style: solid;
}

.btn {
    font-weight: bold;
}

footer {
    padding: 12px;
    font-size: 12px;
    text-align: center;
    width: 100%;
    border-top: 1px solid gray;
    box-sizing: border-box;
    margin-top: auto;
}