:root {
    --padding: 32px;
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 50% -10%, rgb(94 96 231 / 40%), transparent 60%),
        repeating-linear-gradient(45deg, rgb(255 255 255 / 3%) 0 2px, transparent 2px 8px),
        linear-gradient(180deg, #0a0e2e 0%, #060b1a 40%, #030512 100%);
    background-attachment: fixed;
    color: white;
    font-family: Verdana, Geneva, sans-serif;
    padding: 0 var(--padding);
}

a {
    display: inline-block;
    color: #4db8ff;
}

a:visited {
    color: #4db8ff;
}

a:hover {
    color: #00e5ff;
    text-shadow: 0 0 6px rgb(0 229 255 / 60%);
    animation: link-shake 0.4s ease;
}

@keyframes link-shake {
    0% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(6px);
    }

    40% {
        transform: translateX(-4px);
    }

    60% {
        transform: translateX(3px);
    }

    80% {
        transform: translateX(-2px);
    }

    100% {
        transform: translateX(0);
    }
}

.topbar {
    background: linear-gradient(180deg, #8688ff 0%, #5e60e7 45%, #4143c4 100%);
    border-bottom: 3px solid #00e5ff;
    box-shadow:
        0 0 20px rgb(0 229 255 / 50%),
        inset 0 1px 0 rgb(255 255 255 / 40%);
    margin-left: calc(-1 * var(--padding));
    width: 100vw;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
}

.brand {
    font-size: 22px;
    font-weight: 900;
    font-family: "Arial Black", Impact, sans-serif;
    letter-spacing: 1px;
    color: #fff;
    text-shadow:
        0 0 8px #00e5ff,
        2px 2px 0 #2a2ba0;
}

.level {
    margin-bottom: 24px;
}

.level-bar {
    width: 100%;
    border: 1px solid #363890;
    font: inherit;
    color: inherit;
    text-align: left;
    background: linear-gradient(180deg, #7476f2 0%, #5e60e7 50%, #4749c9 100%);
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 50%),
        inset 0 -2px 4px rgb(0 0 0 / 30%),
        0 2px 4px rgb(0 0 0 / 40%);
    text-shadow: 1px 1px 0 rgb(0 0 0 / 30%);
    padding: 12px 16px;
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}

.level-bar:hover {
    background: linear-gradient(180deg, #8688ff 0%, #6b6df0 50%, #5153d6 100%);
}

.toggle-icon {
    width: 20px;
    text-align: center;
    font-weight: 700;
}

.level-content {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 0.3s ease;
}

.level-content-inner {
    overflow: hidden;
    min-height: 0;
}

.level.collapsed .level-content {
    grid-template-rows: 0fr;
}

.level.collapsed .level-bar {
    margin-bottom: 0;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.card {
    padding: 12px;
    background: linear-gradient(180deg, rgb(94 96 231 / 8%), rgb(0 0 0 / 20%));
    border: 2px solid #3a4b7a;
    border-radius: 4px;
    box-shadow: inset 0 1px 0 rgb(255 255 255 / 5%);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}

.card:hover {
    border-color: #00e5ff;
    box-shadow: 0 0 12px rgb(0 229 255 / 60%);
    transform: translateY(-2px);
}

.card-name {
    font-weight: 700;
    color: #b0b2ff;
}

.card-video-wrap {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #0b1020;
    border-radius: 0;
}

.card-video-wrap.no-video,
.video-wrap.no-video {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #0b1020;
    color: rgb(255 255 255 / 40%);
}

.video-wrap.no-video {
    aspect-ratio: 4 / 3;
}

.no-video-x {
    font-size: 48px;
    line-height: 1;
}

.no-video-label {
    font-size: 14px;
}

.card-video-wrap video {
    max-width: 100%;
    max-height: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.trick-refs {
    margin: 1em 0;
}

.trick-refs ul {
    margin: 4px 0 0;
    padding-left: 1.5em;
}

.sidebar {
    position: fixed;
    top: 0;
    right: 0;
    box-sizing: border-box;
    width: 420px;
    height: 100vh;
    background: linear-gradient(180deg, #0d1330, #060a1a);
    padding: 12px;
    border-left: 3px solid #5e60e7;
    box-shadow:
        -8px 0 24px rgb(0 0 0 / 60%),
        inset 1px 0 0 rgb(255 255 255 / 5%);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 9999;
    overflow-y: auto;
}

.sidebar.open {
    transform: translateX(0);
}

@media (width <= 480px) {
    .sidebar {
        width: 100%;
    }
}

.close-btn {
    background: none;
    color: white;
    font-size: 24px;
    border: none;
    cursor: pointer;
    padding: 12px;
}

.video-wrap {
    position: relative;
    margin: 16px 0;
}

.video-wrap video {
    width: 100%;
    display: block;
}

.play-overlay {
    display: none;
    position: absolute;
    inset: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgb(0 0 0 / 45%);
    border: none;
    color: white;
    cursor: pointer;
    padding: 0;
}

.play-overlay.visible {
    display: flex;
}

.play-overlay-icon {
    font-size: 48px;
    line-height: 1;
}

.play-overlay-label {
    font-size: 14px;
}

.search-bar {
    position: relative;
}

.search-bar input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border-radius: 4px;
    border: 2px solid #4749c9;
    background: linear-gradient(180deg, #0b1220, #050810);
    box-shadow:
        inset 0 2px 4px rgb(0 0 0 / 60%),
        0 0 8px rgb(94 96 231 / 30%);
    color: #fff;
    font-size: 14px;
    margin: 1em 0;
}

.search-bar input:focus {
    outline: none;
    border-color: #00e5ff;
    box-shadow:
        inset 0 2px 4px rgb(0 0 0 / 60%),
        0 0 12px rgb(0 229 255 / 60%);
}

.search-bar input::placeholder {
    color: rgb(255 255 255 / 50%);
}

.search-suggestions {
    display: none;
    position: absolute;
    z-index: 10;
    top: 100%;
    left: 0;
    right: 0;
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 240px;
    overflow-y: auto;
    background: #0b1220;
    border: 1px solid rgb(255 255 255 / 25%);
}

.search-suggestions.visible {
    display: block;
}

.search-suggestions li {
    padding: 8px 12px;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
}

.search-suggestions li.active {
    background: #9a9cff;
    color: #060b1a;
    font-weight: bold;
}

.download-bar {
    padding: 6px 12px;
    display: inline-block;
    background: linear-gradient(180deg, #7476f2, #4749c9);
    border: 1px solid #9a9cff;
    border-radius: 6px !important;
    box-shadow:
        inset 0 1px 0 rgb(255 255 255 / 40%),
        0 2px 6px rgb(0 0 0 / 40%);
    cursor: pointer;
}

.download-bar:hover {
    background: linear-gradient(180deg, #9092ff, #6b6df0);
}

.download-bar a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    text-shadow: 1px 1px 0 rgb(0 0 0 / 40%);
}

.download-bar a:hover {
    text-decoration: underline;
}

.topbar-nav {
    display: flex;
    gap: 16px;
}

.topbar-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    text-shadow: 1px 1px 0 rgb(0 0 0 / 30%);
}

.topbar-nav a:hover {
    text-decoration: underline;
    color: #00e5ff;
    text-shadow: 0 0 6px rgb(0 229 255 / 70%);
}

.section-divider {
    height: 2px;
    margin: 16px 0;
    border: none;
    background: linear-gradient(90deg, transparent, #00e5ff, transparent);
}

section {
    padding: 8px 0;
    line-height: 1.5;
}

section h2 {
    margin: 0;
}

.about-content a {
    color: #9a9cff;
}

.about-content a:hover {
    color: #00e5ff;
    text-shadow: 0 0 6px rgb(0 229 255 / 60%);
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #060b1a;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #7476f2, #4749c9);
    border: 2px solid #060b1a;
}

footer {
    text-align: center;
    padding-bottom: 1em;
}

footer p {
    margin: 5px 0;
}
