/* =====================================================
   SPARKD MEME OF THE MONTH
   ELECTRIC BLUE THEME
   ===================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    color: #ffffff;

    background:
        radial-gradient(
            circle at 50% -10%,
            rgba(0, 140, 255, 0.16),
            transparent 42%
        ),
        radial-gradient(
            circle at 10% 50%,
            rgba(0, 80, 255, 0.06),
            transparent 35%
        ),
        linear-gradient(
            180deg,
            #03050a 0%,
            #070b12 48%,
            #020307 100%
        );

    overflow-x: hidden;
}


/* =====================================================
   HEADER
   ===================================================== */

.motm-header {

    position: relative;

    text-align: center;

    padding:
        45px 20px
        35px;

    border-bottom:
        1px solid
        rgba(0, 140, 255, 0.3);

    background:
        radial-gradient(
            circle at center,
            rgba(0, 140, 255, 0.10),
            transparent 65%
        );

}


.motm-home {

    position: absolute;

    top: 22px;
    left: 22px;

    color: #00aaff;

    text-decoration: none;

    font-size: 18px;

    font-weight: 800;

    transition:
        transform 0.2s ease,
        text-shadow 0.2s ease;

}


.motm-home:hover {

    transform:
        scale(1.05);

    text-shadow:
        0 0 10px
        rgba(0, 170, 255, 0.9),

        0 0 25px
        rgba(0, 110, 255, 0.6);

}


.motm-header h1 {

    margin:
        15px 0 10px;

    font-size:
        clamp(32px, 6vw, 62px);

    letter-spacing:
        2px;

    color:
        #ffffff;

    text-shadow:

        0 0 8px
        rgba(0, 180, 255, 0.9),

        0 0 25px
        rgba(0, 100, 255, 0.7),

        0 0 50px
        rgba(0, 70, 255, 0.35);

}


.motm-header p {

    margin: 0;

    color:
        rgba(210, 235, 255, 0.65);

    font-size:
        17px;

}


/* =====================================================
   MAIN
   ===================================================== */

main {

    width:
        min(1100px, 94vw);

    margin:
        0 auto;

}


/* =====================================================
   SECTIONS
   ===================================================== */

section {

    margin:
        45px 0;

}


.section-label {

    display:
        inline-block;

    margin-bottom:
        12px;

    padding:
        7px 14px;

    border-radius:
        999px;

    background:
        rgba(0, 150, 255, 0.08);

    border:
        1px solid
        rgba(0, 170, 255, 0.35);

    color:
        #45c8ff;

    font-size:
        12px;

    font-weight:
        800;

    letter-spacing:
        1.5px;

    box-shadow:
        0 0 15px
        rgba(0, 130, 255, 0.08);

}


section h2 {

    margin:
        0 0 20px;

    font-size:
        clamp(26px, 4vw, 42px);

}


.section-description {

    max-width:
        700px;

    color:
        rgba(220, 235, 255, 0.68);

    line-height:
        1.7;

}


/* =====================================================
   CURRENT WINNER
   ===================================================== */

.winner-section {

    text-align:
        center;

    padding:
        35px 20px
        45px;

}


.winner-section h2 {

    color:
        #8edcff;

    letter-spacing:
        3px;

    text-shadow:
        0 0 15px
        rgba(0, 160, 255, 0.5);

}


.winner-display {

    position:
        relative;

    width:
        min(850px, 100%);

    min-height:
        430px;

    margin:
        25px auto;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    border-radius:
        28px;

    border:
        2px solid
        rgba(0, 170, 255, 0.55);

    background:
        linear-gradient(
            145deg,
            rgba(5, 20, 38, 0.96),
            rgba(3, 7, 14, 0.99)
        );

    box-shadow:

        0 0 20px
        rgba(0, 150, 255, 0.28),

        0 0 60px
        rgba(0, 80, 255, 0.12),

        inset 0 0 60px
        rgba(0, 140, 255, 0.07);

}


.winner-display::before {

    content: "";

    position: absolute;

    inset: 0;

    border-radius:
        inherit;

    pointer-events: none;

    background:
        linear-gradient(
            120deg,
            transparent 20%,
            rgba(0, 180, 255, 0.05),
            transparent 80%
        );

}


.winner-placeholder {

    position:
        relative;

    z-index: 1;

    max-width:
        600px;

    padding:
        40px 25px;

}


.winner-icon {

    font-size:
        90px;

    margin-bottom:
        20px;

    filter:
        drop-shadow(
            0 0 15px
            rgba(0, 180, 255, 0.8)
        );

}


.winner-placeholder h3 {

    margin:
        0 0 15px;

    font-size:
        clamp(22px, 4vw, 34px);

    text-shadow:
        0 0 12px
        rgba(0, 160, 255, 0.5);

}


.winner-placeholder p {

    margin: 0;

    color:
        rgba(210, 230, 255, 0.6);

    line-height:
        1.7;

}


.winner-info {

    display:
        flex;

    flex-direction:
        column;

    gap:
        6px;

}


.winner-info span {

    color:
        #ffd166;

    font-size:
        13px;

    text-transform:
        uppercase;

    letter-spacing:
        2px;

    text-shadow:
        0 0 10px
        rgba(255, 190, 70, 0.5);

}


.winner-info strong {

    font-size:
        25px;

}


/* =====================================================
   COMPETITION
   ===================================================== */

.competition-section {

    text-align:
        center;

    padding:
        40px 25px;

    border-radius:
        25px;

    background:
        rgba(5, 15, 28, 0.65);

    border:
        1px solid
        rgba(0, 150, 255, 0.18);

    box-shadow:
        inset 0 0 40px
        rgba(0, 100, 255, 0.035);

}


.competition-section
.section-description {

    margin:
        0 auto 30px;

}


/* =====================================================
   STAT CARDS
   ===================================================== */

.competition-stats {

    display:
        grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap:
        15px;

    max-width:
        750px;

    margin:
        30px auto;

}


.stat-card {

    padding:
        22px 12px;

    border-radius:
        18px;

    background:
        rgba(2, 8, 16, 0.75);

    border:
        1px solid
        rgba(0, 150, 255, 0.22);

    box-shadow:
        0 0 18px
        rgba(0, 100, 255, 0.05);

}


.stat-number {

    display:
        block;

    font-size:
        30px;

    font-weight:
        900;

    color:
        #31c5ff;

    text-shadow:
        0 0 12px
        rgba(0, 180, 255, 0.55);

}


.stat-label {

    display:
        block;

    margin-top:
        6px;

    font-size:
        11px;

    color:
        rgba(210, 230, 255, 0.55);

    letter-spacing:
        1px;

}


/* =====================================================
   BUTTON
   ===================================================== */

.motm-button {

    border:
        1px solid
        rgba(120, 220, 255, 0.8);

    border-radius:
        999px;

    padding:
        16px 28px;

    background:
        linear-gradient(
            135deg,
            #008cff,
            #0055ff
        );

    color:
        #ffffff;

    font-size:
        15px;

    font-weight:
        900;

    letter-spacing:
        0.5px;

    cursor:
        pointer;

    box-shadow:

        0 0 15px
        rgba(0, 150, 255, 0.45),

        0 0 35px
        rgba(0, 80, 255, 0.2);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;

}


.motm-button:hover {

    transform:
        translateY(-2px)
        scale(1.02);

    box-shadow:

        0 0 20px
        rgba(0, 190, 255, 0.7),

        0 0 50px
        rgba(0, 80, 255, 0.35);

}


.burn-note {

    margin:
        15px 0 0;

    color:
        rgba(210, 230, 255, 0.45);

    font-size:
        13px;

}


/* =====================================================
   SUBMISSIONS
   ===================================================== */

.submissions-section {

    padding:
        10px 0;

}


.submissions-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                220px,
                1fr
            )
        );

    gap:
        20px;

}


.empty-submissions {

    grid-column:
        1 / -1;

    text-align:
        center;

    padding:
        60px 20px;

    border:
        1px dashed
        rgba(0, 150, 255, 0.25);

    border-radius:
        20px;

    color:
        rgba(210, 230, 255, 0.5);

    background:
        rgba(0, 80, 150, 0.025);

}


.empty-submissions span {

    display:
        block;

    font-size:
        50px;

    margin-bottom:
        15px;

    filter:
        drop-shadow(
            0 0 12px
            rgba(0, 170, 255, 0.5)
        );

}


/* =====================================================
   HALL OF FAME
   ===================================================== */

.hall-section {

    padding:
        35px 0;

}


.hall-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(
                220px,
                1fr
            )
        );

    gap:
        20px;

}


.empty-hall {

    padding:
        45px 20px;

    text-align:
        center;

    border:
        1px dashed
        rgba(0, 150, 255, 0.2);

    border-radius:
        20px;

    color:
        rgba(210, 230, 255, 0.45);

    background:
        rgba(0, 70, 140, 0.025);

}


/* =====================================================
   FOOTER
   ===================================================== */

.motm-footer {

    margin-top:
        60px;

    padding:
        35px 20px;

    text-align:
        center;

    border-top:
        1px solid
        rgba(0, 150, 255, 0.15);

    color:
        rgba(210, 230, 255, 0.5);

}


.motm-footer a {

    color:
        #31c5ff;

    text-decoration:
        none;

    text-shadow:
        0 0 8px
        rgba(0, 170, 255, 0.35);

}


.motm-footer a:hover {

    text-decoration:
        underline;

}


/* =====================================================
   MOBILE
   ===================================================== */

@media (
    max-width: 700px
) {

    .motm-header {

        padding-top:
            70px;

    }


    .motm-home {

        top: 18px;
        left: 18px;

    }


    .winner-display {

        min-height:
            320px;

    }


    .competition-stats {

        grid-template-columns:
            1fr;

    }


    .motm-button {

        width:
            100%;

        max-width:
            400px;

    }

}

/* SPARKD MEME OF THE WEEK - COMMUNITY SUBMISSIONS */

.submission-card {
    width: 70px;
    max-width: 100%;
    margin: 0 auto;
}

.submission-image {
    width: 100%;
    max-height: 70px;
    overflow: hidden;
    border-radius: 8px;
}

.submission-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

/* SPARKD MEME OF THE WEEK - PREVIOUS CHAMPIONS */

.hall-card {
    width: 70px;
    max-width: 100%;
    margin: 0 auto;
}

.hall-image {
    width: 100%;
    max-height: 70px;
    overflow: hidden;
    border-radius: 8px;
}

.hall-image img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 70px;
    object-fit: contain;
}

/* SPARKD MEME OF THE WEEK - SCROLLABLE SUBMISSIONS */

#submissionsGrid {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;

    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 16px;

    padding: 12px;
}

////////////////////////////////////////////////////
// SPARKD MEME SUBMISSION VIEWER
////////////////////////////////////////////////////

#submissionViewer {
    position: fixed;
    inset: 0;
    z-index: 99999;
}


.submission-viewer-backdrop {
    position: fixed;
    inset: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(0, 0, 0, 0.88);

    cursor: zoom-out;
}


.submission-viewer-content {
    position: relative;

    max-width: 90vw;
    max-height: 90vh;

    display: flex;
    flex-direction: column;
    align-items: center;

    cursor: default;
}


.submission-viewer-content img {
    display: block;

    max-width: 85vw;
    max-height: 80vh;

    width: auto;
    height: auto;

    object-fit: contain;

    border-radius: 12px;
}


.submission-viewer-close {
    position: absolute;

    top: -18px;
    right: -18px;

    width: 42px;
    height: 42px;

    border: none;
    border-radius: 50%;

    background: #111;
    color: white;

    font-size: 22px;
    font-weight: bold;

    cursor: pointer;

    z-index: 2;
}


.submission-viewer-close:hover {
    transform: scale(1.08);
}


.submission-viewer-title {
    margin-top: 12px;

    color: white;

    font-size: 18px;
    font-weight: 600;

    text-align: center;
}

/* =====================================================
   MEME FORGE LINK — DIRECTLY BELOW TOP-LEFT SPARKD
   ===================================================== */

.motm-forge-link {
    position: absolute;
    top: 52px;
    left: 22px;

    color: #00aaff;
    text-decoration: none;
    font-size: 18px;
    font-weight: 800;

    transition:
        transform 0.2s ease,
        text-shadow 0.2s ease;
}

.motm-forge-link:hover {
    transform: scale(1.05);
    text-shadow:
        0 0 10px rgba(0, 170, 255, 0.9),
        0 0 25px rgba(0, 110, 255, 0.6);
}

@media (max-width: 700px) {
    .motm-forge-link {
        top: 48px;
        left: 18px;
    }
}

/* =========================================
   CONTEST GUIDE BUTTON
========================================= */

#currentWinner {
    position: relative;
}

.contest-guide-btn {
    position: absolute;

    /* Position beside left side of meme box */
    left: 40px;
    top: 165px;
    transform: translateX(-100%);

    width: 160px;
    padding: 14px 10px;

    background: #07101d;
    border: 2px solid #00aaff;
    border-radius: 12px;

    color: #ffffff;
    text-decoration: none;
    text-align: center;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.35;

    box-shadow: 0 0 20px rgba(0, 170, 255, 0.35);
    z-index: 20;
}

.contest-guide-btn span {
    display: block;
    margin-top: 5px;
    color: #8bd7ff;
    font-size: 11px;
    font-weight: 700;
}

.contest-guide-btn:hover {
    transform: translateX(-100%) scale(1.04);
    box-shadow: 0 0 28px rgba(0, 170, 255, 0.6);
}
