/* =========================
   Global
========================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

img {
    max-width: 100%;
}

#logo {
    display: block;
    width: min(2000px, 80%);
    height: auto;
    margin: 20px auto;
}

body {
    background: #181818;
    color: white;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

/* =========================
   Header
========================= */

header {
    text-align: center;
    padding: 40px 20px;
    background: #242424;
    border-bottom: 2px solid #333;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

header p {
    color: #aaaaaa;
}


/* =========================
   Main Content
========================= */

main {
    width: min(1350px, calc(100% - 32px));
    margin: auto;
    padding: 30px 0;
}

#list-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

#side-panel {
    background: #242424;
    width: min(100%, 600px);
    padding: 10px 10px;
    border-radius: 10px;
    margin: 0;
    margin-bottom: 20px;
    text-align: center;
}

#side-panel h2,
#side-panel p,
#side-panel navalt {
    text-align: center;
}

#gddl-link {
    color: #8a2be2;
}

#aredl-link {
    color: #e91818;
}

.line {
    padding: 5px 0;
    border: none;
}

.linebig {
    padding: 10px 0;
    border: none;
}

/* =========================
   Navigation
========================= */

nav {
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    padding: 10px;
    background: #202020;
    border-radius: 10px;
    margin: -15px auto 30px;
}

nav button {
    background: #3b3b3b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

navalt button {
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: 0;
    background: #3b3b3b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
    display: inline-block;
}

nav button:hover {
    background: #5c5c5c;
}

navalt button:hover {
    background: #5c5c5c;
}

/* =========================
   Search
========================= */

#search-section {
    margin: 0 0 20px;
    width: min(100%, 1000px);
}

#searchBox {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    border: none;
    border-radius: 8px;
    background: #2b2b2b;
    color: white;
    margin-bottom: -100px;
}

#searchBox:focus {
    outline: 2px solid #4da3ff;
}

/* =========================
   Demon List
========================= */

#demon-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 0;
    width: min(100%, 1000px);
}

/* This is what every level card will use */

.level-card {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    background: #242424;
    padding: 18px;
    border-radius: 10px;
    transition: 0.2s;
}

.level-thumbnail {
    width: min(300px, 100%);
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.level-card:hover {
    background: #303030;
}

.level-rank {
    font-size: 2rem;
    font-weight: bold;
    width: 80px;
    text-align: center;
    flex-shrink: 0;
}

.level-info {
    flex: 1 1 280px;
    min-width: 0;
}

.level-info h2 {
    margin-bottom: 6px;
}

.level-info p {
    color: #bbbbbb;
}

.level-title {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.difficulty-icon {
    width: 40px;
    height: 40px;
    object-fit: contain;
    margin-top: 10px;
}

.gddlTier {
    background: #8a2be2;
    color: white;

    font-size: 0.8rem;
    font-weight: bold;

    padding: 4px 8px;

    border-radius: 5px;

    margin-bottom: 10px;
}

#submit-page iframe {
    width: 100%;
    height: 85vh;

    border: none;

    border-radius: 10px;

    background: white;
}

.level-name {
    margin-top: 10px;
}

.level-creator {
    margin-top: 7.5px;
}

.hardest-box {
    margin-top: 10px;
}

.completion-count {
    display: inline-flex;
    width: fit-content;
    align-self: flex-start;
    margin-top: 10px;
    background: #3b3b3b;
    color: #cfcfcf;
    padding: 6px 10px;
    border-radius: 5px;
}

.completion-count p {
    margin: 0;
}

.view-level-btn {
    margin-top: 10px;
    background: #3b3ecf;
    padding: 8px 12px;
    border-radius: 5px;
    border: none;
    font-size: 1rem;
    font-weight: bold;
}

.view-level-btn:hover {
    background: #0b1fda;
    cursor: pointer;
}

.overview-thumbnail {
    width: min(100%, 400px);
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 10px;
}

#backToList {
    margin-top: 5px;
    margin-bottom: 5px;
    margin-left: -1px;
    background: #3b3b3b;
    color: white;
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: 0.2s;
}

#backToList:hover {
    background: #5c5c5c;
}

.overviewHeading {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.overviewDifficultyText {
    margin-top: 10px;
}

.overviewGDDLTier {
    background: #8a2be2;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    margin-top: 10px;
}

.overviewLevelName {
    color: #ffffff;
    font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.overviewCreator {
    color: #2844c2;
    margin-bottom: 10px;
}

#level-content {
    margin-top: 20px;
    background: #242424;
    padding: 10px 15px;
    border-radius: 10px;
    overflow-x: auto;
}

.overviewSubheading {
    margin: 20px 0 10px;
    font-size: 1.2rem;
}

.completion-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 8px;
}

.completion-table th,
.completion-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #3b3b3b;
    white-space: nowrap;
}

.completion-table th {
    background: #2f2f2f;
    color: #e4e4e4;
}

.completion-table tr:hover {
    background: #303030;
}

.completion-table a {
    color: #4da3ff;
    text-decoration: none;
}

.completion-table a:hover {
    text-decoration: underline;
}

/* =========================
   Footer
========================= */

footer {
    margin-top: 100px;
    text-align: center;
    padding: 20px;
    color: #888;
}

@media (max-width: 900px) {
    #list-page {
        grid-template-columns: 1fr;
    }

    #side-panel,
    #search-section,
    #demon-list {
        grid-column: 1;
    }

    #search-section {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    header {
        padding: 24px 16px;
    }

    main {
        width: min(100%, calc(100% - 20px));
        padding: 20px 0;
    }

    nav {
        width: 100%;
        margin-bottom: 20px;
    }

    .level-card {
        padding: 14px;
    }

    .level-rank {
        width: 100%;
        text-align: left;
        font-size: 1.5rem;
    }

    .view-level-btn {
        width: 100%;
    }

    .completion-table {
        min-width: 460px;
    }
}