@import url('https://fonts.googleapis.com/css2?family=Geist+Mono:wght@100..900&family=JetBrains+Mono:ital,wght@0,100..800;1,100..800&display=swap');



* {
    font-family: 'JetBrains Mono', monospace;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
    overscroll-behavior: none;
    transition: all 0.3s;
}

@property --background {
    syntax: "<color>";
    inherits: false;
    initial-value: #131313;
}

@property --table-head {
    syntax: "<color>";
    inherits: false;
    initial-value: #090909;
}

@property --table-body {
    syntax: "<color>";
    inherits: false;
    initial-value: #151515;
}

@property --primary {
    syntax: '<color>';
    inherits: false;
    initial-value: #EEF4ED;
}

@property --secondary {
    syntax: '<color>';
    inherits: false;
    initial-value: #696969;
}

@property --highlight {
    syntax: '<color>';
    inherits: false;
    initial-value: #32c743;
}

@property --black {
    syntax: '<color>';
    inherits: false;
    initial-value: #000000;
}

@property --beginner {
    syntax: '<color>';
    inherits: false;
    initial-value: #33a828;
}

@property --beginner-background {
    syntax: '<color>';
    inherits: false;
    initial-value: #091c09;
}

@property --intermediate {
    syntax: '<color>';
    inherits: false;
    initial-value: #d6a938;
}

@property --intermediate-background {
    syntax: '<color>';
    inherits: false;
    initial-value: #261f0c;
}

@property --advanced {
    syntax: '<color>';
    inherits: false;
    initial-value: #e31806;
}

@property --advanced-background {
    syntax: '<color>';
    inherits: false;
    initial-value: #321010;
}

@property --code {
    syntax: '<color>';
    inherits: false;
    initial-value: #ccd3d4;
}

@property --code-background {
    syntax: '<color>';
    inherits: false;
    initial-value: #0f0f0f;
}




::selection {
    color: var(--highlight);
}

body {
    background-color: var(--background);
}


@media screen and (min-width: 320px) {


    #transition-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: var(--table-head);
        z-index: 9999;
        pointer-events: none;
        /* Prevent interactions during idle state */
        opacity: 0;
        /* Default invisible state */
    }

    /* Show animation */
    @keyframes fadeIn {
        from {
            opacity: 0;
        }

        to {
            opacity: 1;
        }
    }

    /* Hide animation */
    @keyframes fadeOut {
        from {
            opacity: 1;
        }

        to {
            opacity: 0;
        }
    }

    /* Active state with animation */
    #transition-overlay.active {
        pointer-events: auto;
        /* Allow interactions when active */
        animation: fadeIn 2s forwards;
        /* Apply fadeIn when active */
    }

    /* Exit state */
    #transition-overlay.exiting {
        animation: fadeOut 2s forwards;
        /* Apply fadeOut when exiting */
    }




    .hide-on-mobile {
        display: none;
    }

    .hide-on-desktop {
        display: block;
    }

    .space-150 {
        margin-top: 150px;
    }

    .space-100 {
        margin-top: 100px;
    }

    .space-50 {
        margin-top: 50px;
    }

    .space-300 {
        margin-top: 300px;
    }

    .break-line {
        width: 100%;
        height: 1px;
        background-color: var(--secondary);
        margin: 10px 0;
    }

    .general-list {
        list-style: disc;
        padding: 0 0 0 20px;

        li {
            margin: 10px 0;
        }

        img {
            width: 100%;
            height: auto;
        }

        .general-list-inner {
            list-style: disc;
            padding: 0 0 0 30px;
        }

    }

    .numbered-list {
        list-style: decimal-leading-zero;
        padding: 0 0 0 40px;

        li {
            margin: 10px 0;
        }

        img {
            width: 100%;
            height: auto;
        }

        .numbered-list-inner {
            list-style: disc;
            padding: 0 0 0 10px;
        }

    }

    .nav-link {
        text-decoration: none;
        color: var(--primary);
        font-weight: 600;
        font-size: 42px;
        text-transform: uppercase;
        position: relative;
        overflow: hidden;

        span {
            display: inline-block;
            position: relative;
            transition: transform 0.2s ease, opacity 0.2s ease;
        }

        &::after {
            content: "";
            display: block;
            position: absolute;
            bottom: 0;
            left: 0;
            height: 2px;
            background: var(--primary);
            width: 0;
            transition: width 0.2s ease;
            /* Smooth underline animation */
        }

        &:hover::after {
            width: 100%;
            color: var(--primary);
            /* Extend the underline on hover */
        }
    }



    .nav-link.active {
        color: inherit;
        /* Retain the original color */
        box-shadow: var(--highlight) 0px 2px 0px 0px;
        padding: 2px;

    }

    .nav-link.active:hover {
        color: inherit;
        /* Retain the original color on hover */
        box-shadow: none;
        /* Remove the underline on hover */
    }

    .breadcrumbs {
        display: flex;
        list-style: none;
        padding: 0;
        margin: 10px 0;
        font-size: 14px;
    }

    /* Individual breadcrumb items */
    .breadcrumbs li {
        display: flex;
        align-items: center;
        color: var(--primary);
    }

    /* Breadcrumb link styling */
    .breadcrumbs a {
        text-decoration: none;
        color: var(--secondary);
        transition: color 0.3s;
    }

    .breadcrumbs a:hover {
        color: var(--highlight);
    }

    /* Separator styling */
    .breadcrumbs li+li::before {
        content: " > ";
        margin: 0 5px;
        color: var(--secondary);
    }

    .h1 {
        font-size: 60px;
        color: var(--primary);

    }

    .h2 {
        font-size: 45px;
        text-transform: uppercase;
        font-weight: 800;
        color: var(--primary);

    }

    .h3 {
        font-size: 35px;
        color: var(--primary);

    }

    .h4 {
        font-size: 25px;
        color: var(--primary);
        text-transform: uppercase;
        font-weight: 600;
        margin: 0 0 10px 0;
    }

    .paragraph {
        font-size: 14px;
        font-family: 'Geist Mono', monospace;
        font-weight: 400;
        color: var(--primary);
        margin: 0 0 5px 0;
    }

    .paragraph-secondary {
        font-size: 14px;
        font-family: 'Geist Mono', monospace;
        font-weight: 500;
        color: var(--secondary);
        line-height: 1.5;
    }

    .code-snippet {
        background-color: var(--code-background);
        color: var(--code);
        padding: 20px;
        border-radius: 5px;
        font-size: 14px;
        font-family: 'Geist Mono', monospace;
        margin: 10px 0;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        display: block;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .inline-code-snippet {
        background-color: var(--code-background);
        color: var(--code);
        padding: 5px 8px;
        border-radius: 5px;
        font-size: 13px;
        font-family: 'Geist Mono', monospace;
        line-height: 2.4;
        font-weight: 300;
    }

    .image {
        width: 100%;
        height: auto;
        margin: 20px 0;
    }

    .button-container {
        display: flex;
        justify-content: end;
        margin: 20px 0;

        .standard-button {
            position: relative;
            height: 50px;
            padding: 0 30px;
            border: 2px solid var(--secondary);
            background: var(--black);
            color: var(--primary);
            user-select: none;
            white-space: nowrap;
            transition: all .05s linear;
            font-family: inherit;

            &:before,
            &:after {
                content: "";
                position: absolute;
                background: var(--black);
                transition: all .2s linear;
            }

            &:before {
                width: calc(100% + 6px);
                height: calc(100% - 16px);
                top: 8px;
                left: -3px;
            }

            &:after {
                width: calc(100% - 16px);
                height: calc(100% + 6px);
                top: -3px;
                left: 8px;
            }

            &:hover {
                cursor: crosshair;
            }

            &:active {
                transform: scale(0.95);
            }

            &:hover:before {
                height: calc(100% - 32px);
                top: 16px;
            }

            &:hover:after {
                width: calc(100% - 32px);
                left: 16px;
            }

            span {
                font-size: 15px;
                z-index: 3;
                position: relative;
                font-weight: 600;
                color: var(--secondary);
            }
        }


        /* .flapper-link is a class if you want a scrambling effect*/

        .link {
            text-decoration: none;
            color: var(--primary);
            font-weight: 600;
            font-size: 42px;
            text-transform: uppercase;
            position: relative;
            overflow: hidden;

            span {
                display: inline-block;
                position: relative;
                transition: transform 0.2s ease, opacity 0.2s ease;
            }

            &::after {
                content: "";
                display: block;
                position: absolute;
                bottom: 0;
                left: 0;
                height: 2px;
                background: var(--primary);
                width: 0;
                transition: width 0.2s ease;
                /* Smooth underline animation */
            }

            &:hover::after {
                width: 100%;
                /* Extend the underline on hover */
            }
        }
    }



    @keyframes scramble {
        0% {
            transform: translateX(100%);
            opacity: 0;
        }

        50% {
            transform: translateX(-10%);
            opacity: 1;
        }

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

    main {
        background-color: var(--black);
    }


    .header {
        position: sticky;
        top: 0;
        z-index: 2;
    }

    .navbar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 20px;
        background-color: var(--black);
        color: var(--primary);
        position: relative;
        z-index: 2;


        .nav-logo img {
            height: 55px;
            margin: 15px 0 0 0;

            &:hover {
                cursor: pointer;
                transform: scale(1.1);
            }
        }

        .nav-menu {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: var(--black);
            flex-direction: column;
            align-items: center;
            transform: translateY(100%);
            transition: transform 0.3s ease;
            list-style: none;
            z-index: 1;

            .nav-item {
                margin: 20px 0;
                text-decoration: none;
            }
        }

        .nav-menu.open {
            display: flex;
            transform: translateY(0);

        }

        /* Hamburger Styles */
        .hamburger {
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            width: 32px;
            height: 24px;
            cursor: pointer;
            z-index: 3;

            /* Ensure it stays above the menu */
            .line {
                width: 100%;
                height: 2px;
                background-color: var(--primary);
                transition: all 0.4s ease;
                border-radius: 2px;
                transform-origin: center;
            }
        }

    }

    /* Hamburger Animation */
    .hamburger.open .line:nth-child(1) {
        transform: rotate(45deg) translate(2px, 13px);
    }

    .hamburger.open .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger.open .line:nth-child(3) {
        transform: rotate(-45deg) translate(2px, -14px);
    }

    /* Keyframe for Links Animation */
    @keyframes fadeIn {
        to {
            opacity: 1;

        }
    }

    .page-content {
        padding: 0 10px;
    }

    .front-page {
        display: flex;
        flex-direction: column;
        padding: 0 10px;
    }

    .quick-links-sidebar {
        display: none;
        /* Hidden on mobile */
    }

    .grid-background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        /* Create a large grid for a smoother effect */
        height: 100%;
        display: grid;
        grid-template-columns: repeat(50, 40px);
        grid-template-rows: repeat(50, 40px);
        background-size: 300px 300px;
        background-image: linear-gradient(rgba(0, 255, 0, 0.1) 1px, transparent 1px),
            linear-gradient(90deg, rgba(0, 255, 0, 0.1) 1px, transparent 1px);
        filter: hue-rotate(120deg) brightness(1);
        opacity: 0.9;
        pointer-events: none;
    }

    .activities {
        .container {

            .activity-cards {
                margin: 20px 0;
                display: flex;
                flex-wrap: wrap;



                .activity-card {
                    border: 1px solid var(--background);
                    backdrop-filter: blur(10px);
                    -webkit-backdrop-filter: blur(10px);
                    margin: 10px 0;
                    padding: 20px;
                    border-radius: 10px;

                    img {
                        width: 100%;
                        height: auto;
                        border-radius: 6px;
                    }

                    &:hover {
                        transform: translateY(-4px);
                        box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.5);
                    }

                    a {
                        text-decoration: none;

                    }

                    .h3 {
                        margin: 0 0 20px 0;
                    }
                }
            }

        }

    }

    .icon-container {
        display: flex;
        flex-direction: row;
        margin: 20px 0;
        position: relative;

        .icon-link {
            display: flex;
            flex-direction: column;
            width: 110px;
            text-align: center;
            border: 1px solid var(--background);
            padding: 10px;
            border-radius: 5px;
            margin: 0 10px;
            box-shadow: inset 10px 2px 50px 0 rgba(46, 46, 46, 0.4);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);

            &:hover {
                cursor: pointer;
                transform: scale(0.95);
                box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.125);

            }
        }
    }

    .footer {
        background-color: var(--background);
        color: var(--primary);
        padding: 20px;
        border-top: 2px solid var(--background);
        z-index: 0;
        position: relative;

        .container {
            display: flex;
            flex-direction: row;
        }

        .footer-content {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            width: 100%;
            gap: 50px;
        }

        .footer-left {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }

        .footer-powered {
            text-align: center;
            width: 100%;
            
            p {
                display: flex;
                align-items: center;
                justify-content: center;
                flex-wrap: wrap;
                gap: 1px;
            }

            .upcloud-logo {
                height: 30px;
                margin: 10px 0 0 10px;
            }
        }

        img {
            height: 60px;
            margin: 0 0 10px 0;
        }

    }


    /* 
    Front page ends here
------------------------------------------------------------------------------------------------------------------------------
    säännöt page starts here
*/

    .rules-section {

        .h1 {
            margin: 0 0 20px 0;
            font-size: 25px;
        }

        .h2 {
            margin: 70px 0 20px 0;
            font-size: 20px;
        }

        .paragraph {
            margin: 10px 0 5px 0;
            font-size: 14px;
        }

        .paragraph-secondary {
            margin: 0 0 0 15px;
            font-size: 14px;
        }

    }


    /* 
    säännöt page ends here
------------------------------------------------------------------------------------------------------------------------------
    resurssit page starts here
*/

    .teams {

        .container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;

            .red-team {

                width: 100%;
                text-align: center;
                padding: 80px 0;
                background-image: url('/H-T8/assets/red_team.webp');
                background-size: cover;
                background-position: center;
                background-blend-mode: multiply;
                background-color: rgba(109, 59, 59, 1);
                filter: grayscale(100%);
                text-decoration: none;

                &:hover {
                    filter: grayscale(0%);
                    background-color: rgba(255, 0, 0, 0.9);
                    scale: 1.02;
                }


            }

            .blue-team {
                width: 100%;
                text-align: center;
                padding: 80px 0;
                background-image: url('/H-T8/assets/blue_team.webp');
                background-size: cover;
                background-position: center;
                filter: grayscale(100%);
                background-color: rgba(144, 144, 247, 0);
                /* Blue color with 50% opacity */
                background-blend-mode: multiply;
                /* Blend the blue overlay with the image */
                text-decoration: none;

                &:hover {

                    filter: grayscale(0%);
                    background-color: rgb(0, 255, 238);
                    scale: 1.02;
                }

            }

            .general {
                width: 100%;
                background-image: url("/H-T8/assets/general.webp");
                text-align: center;
                text-decoration: none;
                padding: 80px 0;
                background-size: cover;
                background-position: center;
                background-color: rgba(59, 59, 59, 0.9);
                background-blend-mode: multiply;


                &:hover {
                    background-color: rgba(167, 167, 167, 0.9);
                    color: var(--black);
                    scale: 1.02;

                }



            }
        }

    }

    .card-container {
        display: flex;
        flex-direction: column;

        .card {
            text-decoration: none;
            border: 2px solid var(--background);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            margin: 10px 0;
            padding: 20px;
            border-radius: 10px;

            &:hover {
                cursor: pointer;
                transform: translateY(-2px);
                box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.5);
            }

            .card-content {
                display: flex;
                flex-direction: column;

                .h3 {
                    margin: 0 0 20px 0;
                }

                .paragraph-secondary {
                    margin: 0 0 15px 0;
                }

                .tags {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    margin: 10px 0 0 0;

                    .tag {
                        margin: 0 10px 10px 0;
                        padding: 5px 10px;
                        border-radius: 5px;
                        background-color: var(--highlight);
                        color: var(--black);
                        font-size: 14px;
                        font-weight: 600;
                        text-transform: uppercase;
                    }
                }
            }
        }
    }



    .table-container {
        margin: 20px auto;
        border-radius: 5px;
        background-color: rgba(21, 20, 20, 0.715);
        scrollbar-color: var(--table-body) var(--table-head);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);


        .scrollable {
            overflow-x: auto;
            scrollbar-width: thin;

            border-radius: 5px;

        }

        table {
            width: 100%;
            border-collapse: collapse;
            white-space: nowrap;
        }
    }



    th {
        padding: 12px 16px;
        border: 1px solid var(--background);
        color: var(--primary);
        position: sticky;
        top: 0;
    }

    td {
        padding: 12px 16px;
        font-weight: 300;
        border: 1px solid var(--background);
        color: var(--secondary);


    }

    .advanced {
        color: var(--advanced);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);

        span {
            background-color: var(--advanced-background);
            border-radius: 10px;
            padding: 4px 10px;
            font-size: 14px;
            display: inline-block;
        }
    }

    .intermediate {
        color: var(--intermediate);

        span {
            background-color: var(--intermediate-background);
            border-radius: 10px;
            padding: 4px 10px;
            font-size: 14px;
            display: inline-block;
        }
    }

    .beginner {
        color: var(--beginner);

        span {
            background-color: var(--beginner-background);
            border-radius: 10px;
            padding: 4px 10px;
            font-size: 14px;
            display: inline-block;
        }
    }

    thead {
        background-color: var(--table-head);
    }

    tbody tr:nth-child(even) {
        background-color: var(--table-head);
    }

    tbody tr:hover {
        color: var(--primary);
        background-color: var(--table-body);
    }

    a {
        color: var(--highlight);
        text-decoration: none;

        &:hover {
            text-decoration: underline;
        }
    }

    /* Pagination */
    .pagination {
        position: sticky;
        overflow: show;
        top: 0;
        left: 0;
        /* Start at the left of the container */
        background: var(--black);
        padding: 10px;
        justify-content: center;
        align-items: center;
        box-sizing: border-box;
        /* Ensure padding doesn't affect width */



        button {
            padding: 8px 12px;
            margin: 0 5px;
            border: 1px solid var(--background);
            background-color: var(--table-body);
            color: var(--secondary);
            border-radius: 4px;
            cursor: pointer;

            &.disabled,
            &[disabled] {
                background-color: var(--background);
                cursor: not-allowed;
            }

            &.active {
                background-color: var(--highlight);
                color: var(--primary)
            }

            &:hover:not(.active):not([disabled]) {
                background-color: var(--highlight);
                color: var(--primary);
            }
        }
    }

}

/* ===== PROGRESS TRACKER STYLES ===== */

.progress-container {
    background: var(--table-head);
    border: 1px solid var(--background);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;

    .progress-header {
        display: flex;
        justify-content: space-between;
        margin-bottom: 15px;

        .progress-title {
            font-size: 1.2rem;
            font-weight: 600;
            color: var(--primary);
        }

        .progress-stats {
            font-size: 0.9rem;
            color: var(--secondary);
        }
    }

    .progress-bar {
        width: 100%;
        height: 20px;
        background: var(--background);
        border-radius: 10px;
        overflow: hidden;
        border: 1px solid var(--table-body);

        .progress-fill {
            height: 100%;
            background: linear-gradient(90deg, var(--highlight), var(--beginner));
            width: 0%;
            transition: width 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;

            .progress-text {
                color: var(--primary);
                font-weight: 600;
                font-size: 0.8rem;
                text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
            }
        }
    }

}

.section-completion {
    display: flex;
    flex-direction: row-reverse;
    align-items: end;
    gap: 10px;
    margin: 20px 0;
    padding: 15px;

    .section-completion-checkbox {
        width: 20px;
        height: 20px;
        cursor: pointer;
        accent-color: var(--highlight);

    }

    .section-completion-label {
        color: var(--secondary);
        cursor: pointer;
        user-select: none;
    }
}

.navigation-buttons {
    display: flex;
    justify-content: space-between;

    .nav-button {
        padding: 8px 12px;
        margin: 0 5px;
        border: 1px solid var(--background);
        background-color: var(--table-body);
        color: var(--secondary);
        border-radius: 4px;
        cursor: pointer;
        text-decoration: none;


        &.disabled,
        &[disabled] {
            background-color: var(--background);
            cursor: not-allowed;
        }

        &.active {
            background-color: var(--highlight);
            color: var(--primary)
        }

        &:hover:not(.active):not([disabled]) {
            background-color: var(--highlight);
            color: var(--primary);
        }
    }
}

/* Custom animated checkbox styles */
.section-completion .container {
    display: flex;
    align-items: center;
    justify-content: center;
}

.section-completion .check {
    cursor: pointer;
    position: relative;
    margin: auto;
    width: 18px;
    height: 18px;
    -webkit-tap-highlight-color: transparent;
    transform: translate3d(0, 0, 0);
}

.section-completion .check:before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(34, 50, 84, 0.03);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.section-completion .check svg {
    position: relative;
    z-index: 1;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke: #c8ccd4;
    stroke-width: 1.5;
    transform: translate3d(0, 0, 0);
    transition: all 0.2s ease;
}

.section-completion .check svg path {
    stroke-dasharray: 60;
    stroke-dashoffset: 0;
}

.section-completion .check svg polyline {
    stroke-dasharray: 22;
    stroke-dashoffset: 66;
}

.section-completion .check:hover:before {
    opacity: 1;
}

.section-completion .check:hover svg {
    stroke: var(--highlight);
}

.section-completion .section-completion-checkbox:checked+.check svg {
    stroke: var(--highlight);
}

.section-completion .section-completion-checkbox:checked+.check svg path {
    stroke-dashoffset: 60;
    transition: all 0.3s linear;
}

.section-completion .section-completion-checkbox:checked+.check svg polyline {
    stroke-dashoffset: 42;
    transition: all 0.2s linear;
    transition-delay: 0.15s;
}

/* ===== COMPLETION BADGE POPUP STYLES ===== */

.completion-badge-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;

    &.show {
        opacity: 1;
        visibility: visible;
    }

    .completion-badge-content {
        background: linear-gradient(135deg, var(--table-body), var(--background));
        border: 1px solid var(--code-background);
        border-radius: 20px;
        padding: 40px;
        max-width: 500px;
        width: 90%;
        text-align: center;
        transform: scale(0.8);
        transition: transform 0.3s ease;
        position: relative;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);

        .completion-badge-header {
            margin-bottom: 20px;

            .completion-icon {
                font-size: 4rem;
                margin-bottom: 10px;
                display: block;
                animation: bounce 1s infinite alternate;
            }

            .completion-title {
                font-size: 1.8rem;
                font-weight: 700;
                color: var(--highlight);
                margin-bottom: 10px;
            }

            .completion-subtitle {
                font-size: 1.1rem;
                color: var(--primary);
                opacity: 0.9;
            }
        }

        .completion-message {
            color: var(--secondary);
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 30px;

            .completion-stats {
                background: var(--background);
                border: 1px solid var(--secondary);
                border-radius: 8px;
                padding: 15px;
                margin: 20px 0;
                font-weight: 600;
                color: var(--highlight);
            }
        }

        .completion-actions {
            display: flex;
            gap: 15px;
            justify-content: center;
            flex-wrap: wrap;

            .completion-btn {
                padding: 12px 20px;
                border: none;
                border-radius: 8px;
                font-weight: 600;
                cursor: pointer;
                transition: all 0.3s ease;
                text-decoration: none;
                display: inline-block;

                &.primary {
                    background: var(--highlight);
                    color: var(--primary);

                    &:hover {
                        background: #28a745;
                        transform: translateY(-2px);
                    }
                }

                &.secondary {
                    background: var(--table-body);
                    color: var(--secondary);
                    border: 1px solid var(--secondary);

                    &:hover {
                        background: var(--secondary);
                        color: var(--primary);
                    }
                }
            }
        }

        .close-btn {
            position: absolute;
            top: 15px;
            right: 15px;
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--secondary);
            cursor: pointer;
            transition: color 0.3s ease;

            &:hover {
                color: var(--primary);
            }
        }
    }

    &.show .completion-badge-content {
        transform: scale(1);
    }
}

@keyframes bounce {
    0% {
        transform: translateY(0px);
    }

    100% {
        transform: translateY(-10px);
    }
}

/* Mobile responsiveness for completion badge popup */
@media (max-width: 768px) {
    .completion-badge-popup .completion-badge-content {
        padding: 30px 20px;
        width: 95%;
    }

    .completion-badge-popup .completion-icon {
        font-size: 3rem;
    }

    .completion-badge-popup .completion-title {
        font-size: 1.5rem;
    }

    .completion-badge-popup .completion-actions {
        flex-direction: column;
    }

    .completion-badge-popup .completion-btn {
        width: 100%;
        margin: 5px 0;
    }

    /* Vulnerability cards */
    .vulnerability-grid {
        gap: 15px;
    }
    
    .vulnerability-card {
        padding: 15px;
    }
}

/*
    resurssit page ends here
------------------------------------------------------------------------------------------------------------------------------
toiminta page starts here
*/

.indent {
    margin: 0 0 0 15px;
    line-height: 25px;
}

.events-container-all {
    display: flex;
    flex-direction: row;
    padding: 20px 5px 20px 0px;
    gap: 20px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    scroll-snap-align: start;
    scrollbar-width: thin;
    scrollbar-color: var(--background) var(--table-head);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.events-container-2 {
    display: flex;
    flex-direction: row;
    padding: 20px 5px 20px 0px;
    gap: 20px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
    scroll-snap-align: start;
    scrollbar-width: thin;
    scrollbar-color: var(--background) var(--table-head);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.event-link {
    text-decoration: none;
    color: inherit;
}


.event {
    border-radius: 8px;
    padding: 25px;
    min-width: 420px;
    border: 1px solid var(--background);
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);

    &:hover {
        transform: translateY(-4px);
        box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.325);
    }

    p {
        margin: 10px 0;
        font-size: 16px;
        color: var(--secondary);
    }

    .tags {
        margin-top: 20px;
    }

    .tag {
        display: inline-block;
        background-color: var(--beginner-background);
        color: var(--beginner);
        padding: 5px 10px;
        border-radius: 5px;
        font-size: 14px;
        margin: 0 0 10px 0;
    }

    .event-icon {

        svg {
            height: 30px;
            width: auto;
            fill: var(--highlight);

            &:hover {
                cursor: pointer;
                transform: scale(1.2);
            }
        }

    }

}


/*
toiminta page ends here
------------------------------------------------------------------------------------------------------------------------------
yhteystiedot page starts here
*/

.club-board {

    .container {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        flex-wrap: wrap;
        width: 100%;


    }


    .board-member {
        border: 1px solid var(--background);
        border-radius: 5px;
        padding: 0 20px;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);


        &:hover {
            box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.5);
        }


        .board-member-image {
            margin: 0 0 10px 0;
            display: flex;
            justify-content: center;
            filter: brightness(0.8);

            img {
                width: 100px;
            }
        }

        .board-member-info {

            h3 {
                margin: 0;
            }

            .board-member-contact {
                display: flex;
                flex-direction: row;
                margin: 0 0 20px 0;

                svg {
                    height: 30px;
                    width: auto;
                    fill: var(--secondary);
                    margin: 0 10px 0 0;

                    &:hover {
                        cursor: pointer;
                        transform: scale(1.2);
                    }
                }

            }

        }


    }

}

/*
yhteystiedot page ends here
------------------------------------------------------------------------------------------------------------------------------
honor board page starts here
*/


#tableBody {
    font-size: 14px;
}

.tooltip {
    position: fixed;
    /* Position relative to the viewport */
    z-index: 1000;
    /* Ensure it's above other elements */
    background-color: var(--black);
    color: var(--secondary);
    padding: 8px;
    border-radius: 4px;
    text-align: left;
    min-width: 200px;
    max-width: 500px;
    white-space: normal;
    overflow-wrap: break-word;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}

.badge-item {
    display: inline-block;
    margin-right: 10px;

    img.badge {
        display: block;
        max-height: 50px;
        max-width: 70px;
    }
}

/* Rank cell styling */
.rank-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.rank-number {
    font-weight: bold;
    font-size: 16px;
    min-width: 25px;
    text-align: right;
}

.rank-indicator {
    font-size: 14px;
    font-weight: bold;
    display: inline-block;
    min-width: 20px;
    text-align: center;
}

.rank-up {
    color: #22c55e; /* Green for moving up */
}

.rank-down {
    color: #ef4444; /* Red for moving down */
}

.rank-same {
    color: #64748b; /* Gray for no change */
}

.rank-new {
    color: #3b82f6; /* Blue for new entry */
    font-size: 10px;
}

.th-nic {
    width: 15%;
}


#searchInput {
    width: 100%;
    padding: 20px 10px;
    border: 1px solid var(--background);
    background-color: var(--table-head);
    color: var(--primary);
    border-radius: 5px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

#searchInput:focus {
    border-color: var(--highlight);
}


.carousel-container {
    position: relative;
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    border-radius: 8px;

    &:hover {
        transform: scale(1.01);
        box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.5);
    }

    .carousel-track {
        display: flex;
        transition: transform 0.5s ease;

        .carousel-slide {
            min-width: 100%;
            box-sizing: border-box;
            padding: 15px;
            background-color: var(--background);
            color: var(--secondary);
            border-radius: 8px;
            font-size: 14px;

            .none-link {
                text-decoration: none;
                color: var(--secondary);
            }

            img {
                width: 100%;
                height: auto;
                border-radius: 8px;
            }

            .throphy {
                position: absolute;
                top: 15px;
                width: 60px;
                height: auto;
                border-radius: 8px;
            }

            h3 {
                margin: 10px 0 25px 0;
            }

            p {
                margin: 10px 0;

            }

            .space {
                margin: 5px 0 20px 0;
            }


            .prev {
                left: 10px;
            }

            .next {
                right: 10px;
            }

            .tags {
                margin-top: 20px;
            }

            .tag {
                display: inline-block;
                background-color: var(--beginner-background);
                color: var(--beginner);
                padding: 5px 10px;
                border-radius: 5px;
                font-size: 14px;
                margin: 5px 5px 0 0;
            }

        }
    }

    /* Vulnerability cards mobile styles */
    .vulnerability-card {
        padding: 12px;
    }


}

@media screen and (min-width: 768px) {

    .hide-on-desktop {
        display: none;
    }

    .hide-on-mobile {
        display: block;
    }

    .h1 {
        font-size: 45px;
    }

    .h2 {
        font-size: 40px;
    }

    .h3 {
        font-size: 35px;
    }

    .paragraph {
        font-size: 14px;
    }

    .paragraph-secondary {
        font-size: 14px;
    }


    .navbar {


        .nav-logo img {
            height: 65px;
            margin: 15px 0 0 0;

            &:hover {
                cursor: pointer;
                transform: scale(1.1);
            }
        }

    }


    .about {
        padding: 20px;
        margin: 40px 0 0 0;
        background-color: var(--black);
        position: relative;



        .introduction {
            display: flex;
            flex-direction: row;

            .h2 {
                margin: 0 10px 0 0;
            }

            .paragraph-secondary {
                margin: 0 0 0 10px;
            }
        }

    }

    .page-content {
        margin: 0 20px;
    }

    .front-page {
        display: flex;
        flex-direction: column;
        padding: 0 10px;
    }

    .main-content {
        width: 100%;
    }


    .activities {



        .container {


            .activity-cards {
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));


                .activity-card {
                    border: 1px solid var(--background);
                    backdrop-filter: blur(10px);
                    -webkit-backdrop-filter: blur(10px);
                    margin: 10px;
                    padding: 20px;
                    border-radius: 10px;

                    &:hover {
                        cursor: default;
                        transform: translateY(-4px);
                        box-shadow: inset 20px 2px 70px 0 rgba(36, 36, 36, 0.5);
                    }

                    a {
                        text-decoration: none;

                    }

                    .h3 {
                        margin: 0 0 20px 0;
                    }
                }
            }

        }

    }

    /* 
    Front page ends here
------------------------------------------------------------------------------------------------------------------------------
    säännöt page starts here
*/

    .rules-section {

        .h1 {
            margin: 0 0 20px 0;
            font-size: 35px;
        }

        .h2 {
            margin: 70px 0 20px 0;
            font-size: 30px;
        }

        .paragraph {
            margin: 10px 0 5px 0;
            font-size: 20px;
        }

        .paragraph-secondary {
            margin: 0 0 0 15px;
            font-size: 14px;
        }

    }


    /* 
säännöt page ends here
------------------------------------------------------------------------------------------------------------------------------
resurssit page starts here
*/

    .teams {

        .container {
            display: flex;
            flex-direction: row;
            align-items: center;
            justify-content: center;

            .red-team {

                width: 100%;
                text-align: center;
                padding: 250px 0;
                background-size: cover;
                background-color: rgba(255, 0, 0, 1);
                /* Red color with 50% opacity */
                background-blend-mode: multiply;
                /* Blend the red overlay with the image */
                filter: grayscale(100%);
                text-decoration: none;
                margin: 20px 0 0 0;

                &:hover {
                    filter: grayscale(0%);
                    background-color: rgba(255, 0, 0, 0.9);
                    transform: translateX(5px);
                }




            }

            .blue-team {
                width: 100%;
                text-align: center;
                padding: 250px 0;
                background-size: cover;
                background-position: center;
                filter: grayscale(100%);
                background-color: rgba(144, 144, 247, 0);
                /* Blue color with 50% opacity */
                background-blend-mode: multiply;
                /* Blend the blue overlay with the image */
                text-decoration: none;
                margin: 20px 0 0 0;

                &:hover {

                    filter: grayscale(0%);
                    background-color: rgb(0, 255, 238);
                    transform: translateX(-5px);
                }



            }

            .general {
                width: 100%;
                text-align: center;
                text-decoration: none;
                padding: 250px 0;
                background-size: cover;
                margin: 20px 0 0 0;


                &:hover {
                    color: var(--black);
                    scale: 1.02;
                }



            }
        }

    }

    .card-container {
        display: flex;
        flex-direction: column;

        .card {
            text-decoration: none;
            border: 2px solid var(--background);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            margin: 10px 0;
            padding: 20px;
            border-radius: 10px;
            display: flex;
            flex-direction: row;

            &:hover {
                cursor: pointer;
                transform: translateY(-2px);
                box-shadow: inset 20px 2px 70px 0 rgba(46, 46, 46, 0.5);
            }

            .card-image {

                img {
                    height: 200px;
                    width: auto;
                    margin: 0 20px 0 0;

                }
            }

            .card-content {
                display: flex;
                flex-direction: column;

                .h3 {
                    margin: 0 0 20px 0;
                }

                .paragraph-secondary {
                    margin: 0 0 15px 0;
                }

                .tags {
                    display: flex;
                    flex-direction: row;
                    flex-wrap: wrap;
                    margin: 10px 0 0 0;

                    .tag {
                        margin: 0 10px 10px 0;
                        padding: 5px 10px;
                        border-radius: 5px;
                        background-color: var(--highlight);
                        color: var(--black);
                        font-size: 14px;
                        font-weight: 600;
                        text-transform: uppercase;
                    }
                }
            }
        }
    }


    /*
    resurssit page ends here
------------------------------------------------------------------------------------------------------------------------------
    yhteystiedot page starts here
*/

    .contacts {

        .container {

            .h2 {
                font-size: 45px;
            }

            b,
            a,
            p {
                font-size: 16px;
            }
        }
    }

    /* Vulnerability cards tablet styles */
    .vulnerability-grid {
        gap: 15px;
    }
    
    .vulnerability-card {
        padding: 15px;
    }

    /* Footer tablet styles */
    .footer {
        .footer-content {
            flex-direction: row;
            justify-content: space-between;
            align-items: flex-end;
        }

        .footer-left {
            align-items: flex-start;
        }

        .footer-powered {
            margin-top: 0;
            align-self: flex-end;
            width: auto;

            .upcloud-logo {
                height: 35px;
            }
            
            p {
                justify-content: center;
                align-self: center;
            }
        }
    }



}


@media screen and (min-width: 1024px) {

    .link {
        font-size: 18px;
    }

    .page-content {
        margin: 0 10%;
    }

    .navbar {
        padding: 0 15px;
        z-index: 2;


        .nav-logo img {
            height: 70px;
            margin: 10px 0 0 0;

            &:hover {
                cursor: pointer;
                transform: scale(1.1);
            }
        }

        .nav-menu {
            display: flex;
            position: relative;
            transform: translateY(0);
            background-color: transparent;
            height: 60px;
            flex-direction: row-reverse;

            .nav-item {
                margin: 0 20px;


                .nav-link {
                    color: var(--primary);
                    font: 18px 'JetBrains Mono', monospace;
                    font-weight: 600;

                }
            }
        }

        .hamburger {
            display: none;
        }
    }

    /* 
    Front page ends here
------------------------------------------------------------------------------------------------------------------------------
    säännöt page starts here
*/

    .rules-section {

        .h1 {
            margin: 0 0 20px 0;
            font-size: 35px;
        }

        .h2 {
            margin: 70px 0 20px 0;
            font-size: 30px;
        }

        .paragraph {
            margin: 20px 0 5px 0;
            font-size: 22px;
        }

        .paragraph-secondary {
            margin: 0 0 0 20px;
            font-size: 16px;
        }

    }


    /* 
säännöt page ends here
------------------------------------------------------------------------------------------------------------------------------
resurssit page starts here
*/


    .teams {

        .container {


            .red-team {
                padding: 300px 0;
                background-image: url('/H-T8/assets/red_team.webp');


            }

            .blue-team {
                padding: 300px 0;
                background-image: url('/H-T8/assets/blue_team.webp');
            }

            .general {
                padding: 300px 0;
                background-image: url("/H-T8/assets/general.webp");
            }
        }
    }



    /*
resurssit page ends here
------------------------------------------------------------------------------------------------------------------------------
honor board page starts here

*/

    #tableBody {
        font-size: 16px;
    }

    .carousel-container {

        .carousel-track {


            .carousel-slide {
                font-size: 16px;

                .throphy {
                    top: 15px;
                    width: 80px;
                    filter: brightness(0.9);
                }

                h3 {
                    margin: 10px 0 25px 0;
                }

                p {
                    margin: 10px 0;
                }

                .space {
                    margin: 5px 0 20px 0;
                }


                .prev {
                    left: 10px;
                }

                .next {
                    right: 10px;
                }
            }
        }
    }

    /* Two-column layout for desktop */
    .front-page {
        display: flex;
        flex-direction: row;
        gap: 40px;

    }

    .quick-links-sidebar {
        display: block;
        width: 255px;


        .container {
            background-color: var(--black);
            padding: 20px;

            ul {
                list-style: none;
                padding: 0;
                margin: 20px 0 30px 0;
            }

            li {
                text-transform: uppercase;
                position: relative;

                &::before {
                    content: '';
                    position: absolute;
                    left: 0;
                    top: 50%;
                    width: 16px;
                    height: 16px;
                    background-image: url('https://img.icons8.com/?size=100&id=INeaBoVvLWKi&format=png&color=5D5D5D');
                    background-size: contain;
                    background-repeat: no-repeat;
                    transform: translateY(-50%) scaleY(-1) rotate(90deg) translateX(15px);
                    opacity: 0;
                    transition: all 0.1s cubic-bezier(0.25, 0.46, 0.45, 0.94);
                }

                &:hover::before {
                    opacity: 1;
                    transform: translateY(-50%) scaleY(-1) rotate(90deg) translateX(0);
                }

                &:hover .flapper-link {
                    padding-left: 30px;
                }
            }

            .flapper-link {
                color: var(--secondary);
                text-decoration: none;
                font-size: 16px;
                display: block;
                padding: 8px 0 8px 5px;
                border-bottom: 1px solid transparent;
                transition: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
            }

            .quick-links-nav {

                h2 {
                    margin: 0 0 20px 0;
                    text-transform: uppercase;
                }
            }
        }

    }

    .main-content {
        width: 75%;
        flex: 1;
    }

}

@media screen and (min-width: 1480px) {

    .page-content {
        margin: 0 20%;
    }

    .about {
        padding: 150px 0 150px 0;
        margin: 40px 0 0 0;

    }

    .activities {

        .container {

            .activity-cards {
                margin: 30px 0;
                display: grid;
                grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));


                .activity-card {
                    border: 1px solid var(--background);
                    padding: 25px;
                    border-radius: 10px;



                    a {
                        text-decoration: none;

                    }

                    .h3 {
                        margin: 0 0 20px 0;
                        font-weight: 800;
                    }
                }
            }

        }

    }

    .h1 {
        font-size: 45px;
    }

    .h2 {
        font-size: 50px;
    }

    .h3 {
        font-size: 45px;
    }

    .paragraph {
        font-size: 16px;
    }

    .paragraph-secondary {
        font-size: 16px;
    }

    .link {
        font-size: 20px;
    }

    .advanced {


        span {
            font-size: 16px;

        }
    }

    .intermediate {

        span {
            font-size: 16px;

        }
    }

    .beginner {

        span {
            font-size: 16px;

        }
    }

}

/* Vulnerability Cards */
.vulnerability-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.vulnerability-card {
    background: var(--table-head);
    border: 1px solid var(--background);
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    height: fit-content;
}

.vulnerability-card:hover {
    transform: translateY(-2px);
}

.vulnerability-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--table-body);
}

.vulnerability-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vulnerability-example {
    font-size: 0.9rem;
    color: var(--secondary);
    line-height: 1.4;
    background: var(--code-background);
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid var(--highlight);
    margin-top: 15px;
    border: 1px solid var(--background);
}

.vulnerability-example strong {
    color: var(--highlight);
    font-weight: 600;
}