.terminal{
    margin: 0 auto;
    border: 3px solid #ac8ef6;
    backdrop-filter: blur(4px);
    box-shadow: 0 0 15px 0 #6e3ce9;
    background: rgba(110, 60, 233, 0.05);
    font-family: 'Cascadia Code', sans-serif;
    font-size: clamp(12px, 2vw, 20px);
    width: 100%;
    max-width: 1200px;
    overflow-x: auto;
}

.terminal-top{
    display: flex;
    flex-direction: column;
}

.terminal-top div{
    display: flex;
    padding-left: clamp(5px, 2vw, 10px);
    align-items: center;
}

.terminal-top div p{
    margin-left: clamp(5px, 1vw, 10px);
    font-size: clamp(10px, 1.5vw, 16px);
}

.terminal-block{
    padding: clamp(8px, 1.5vw, 10px) clamp(10px, 2vw, 18px);
    display: flex;
    flex-direction: column;
}

.loading{
    background-color: #ac8ef6;
    box-shadow: 0 0 15px 0 #6e3ce9;
}

.ctf-image{
    font-weight: 700;
    font-size: clamp(14px, 2.5vw, 24px);
    line-height: 1.2;
}

.ctf{
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-direction: column;
    margin: clamp(15px, 3vw, 20px) 0;
    padding: clamp(20px, 5vw, 30px) clamp(20px, 10vw, 60px);
}

.ctf p{
    line-height: 1.5;
    font-family: 'Pixel', sans-serif;
    font-size: clamp(11px, 1.8vw, 16px);
}

.ctf-profile{
    display: flex;
    flex-direction: column;
    margin: clamp(15px, 4vw, 20px) auto;
    align-items: center;
}

.ctf-profile p{
    margin-left: 8px;
    font-family: 'Pixel', sans-serif;
    font-size: clamp(11px, 1.8vw, 16px);
    text-align: center;
}

.ctf-profile img{
    width: clamp(200px, 40vw, 400px);
    height: auto;
    aspect-ratio: 8/1;
    max-width: 100%;
}

.ctf-info{
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-top: clamp(40px, 8vw, 70px);
    padding: 0 clamp(20px, 10vw, 120px);
    flex-wrap: wrap;
    gap: 30px;
}

.information{
    position: relative;
    width: 100%;
    max-width: 100%;
    flex: 1;
}

.information-block{
    backdrop-filter: blur(4px);
    background: rgba(0, 153, 69, 0.05);
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    width: 100%;
}

.information-border-side{
    border-left: 3px solid #0dbe3e;
    box-shadow: 0 0 7px 0 #009945;
    min-height: 100%;
    flex-shrink: 0;
}

.information-block > div:nth-child(2){
    flex: 1;
    padding: 0 clamp(15px, 3vw, 30px);
}

.information-block p{
    padding: clamp(20px, 4vw, 25px) 0;
    font-size: clamp(11px, 1.8vw, 16px);
    line-height: 1.6;
    width: 100%;
}

.information-title, .score-title{
    z-index: 1000;
    position: absolute;
    margin-top: -18px;
}

.information-title{
    margin-left: 50px;
}

.scores{
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    min-width: clamp(230px, 30vw, 350px);
}

.score-list{
    display: flex;
    margin-top: 20px;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: clamp(11px, 1.8vw, 16px);
    gap: clamp(20px, 5vw, 60px);
}

.scores-title, .score{
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.helpers-top{
    display: flex;
    width: clamp(280px, 60vw, 500px);
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.helpers{
    margin-top: clamp(40px, 8vw, 70px);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(20px, 5vw, 60px);
}

.helper{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(5px, 1.5vw, 10px) clamp(15px, 3vw, 40px);
    cursor: pointer;
    border: 3px solid #00000000;
    border-bottom: 0;
    font-size: clamp(12px, 2vw, 16px);
}

.helper-content img{
    width: clamp(100px, 20vw, 155px);
    height: auto;
    aspect-ratio: 155/200;
    max-width: 100%;
}

.helper-content{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: clamp(20px, 4vw, 50px) clamp(15px, 3vw, 30px);
    width: clamp(290px, 80vw, 900px);
    flex-wrap: wrap;
    gap: 20px;
}

#help p{
    font-size: clamp(14px, 2.5vw, 20px);
    line-height: 1.5;
}

.helper.active-tab{
    box-shadow: 0 0 7px 0 #009945;
    border: 3px solid #0dbe3e;
    border-bottom: 0;
    background: rgba(0, 153, 69, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0s;
}

#help span{
    color: #eee;
}

#help.ron-mode .green-text {
    color: #ac8ef6;
    text-shadow: 0 0 7px #6e3ce9;
}

#help.ron-mode span {
    text-shadow: 0 0 7px #6e3ce9;
}

#help.ron-mode .container-line {
    border-top: 3px solid #ac8ef6;
    box-shadow: 0 0 15px 0 #6e3ce9;
}

.helper[id="ron"].active-tab {
    box-shadow: 0 0 7px #6e3ce9;
    border: 3px solid #ac8ef6;
    border-bottom: 0;
    background: rgba(110, 60, 233, 0.05);
    backdrop-filter: blur(4px);
    transition: all 0s;
}

.helper-info-line{
    padding: clamp(8px, 2vw, 10px) clamp(20px, 4vw, 40px);
    width: clamp(250px, 50vw, 400px);
    border: 3px solid #00000000;
    margin: 15px 0;
    font-size: clamp(12px, 2vw, 16px);
}

.helper-info-line:hover{
    box-shadow: 0 0 7px 0 #009945;
    border: 3px solid #0dbe3e;
    background: rgba(0, 153, 69, 0.05);
    backdrop-filter: blur(4px);
}

#help.ron-mode .helper-info-line:hover{
    border: 3px solid #ac8ef6;
    box-shadow: 0 0 15px 0 #6e3ce9;
    background: rgba(110, 60, 233, 0.05);
    backdrop-filter: blur(4px);
}

#helper-info{
    display: flex;
    flex-direction: column;
    align-items: center;
}

#helper-info p{
    width: clamp(200px, 40vw, 350px);
    height: auto;
    min-height: 80px;
    margin-top: 10px;
    text-align: center;
    font-size: clamp(12px, 2vw, 16px);
}

.rules{
    backdrop-filter: blur(4px);
    box-shadow: 0 0 7px 0 #009945;
    background: rgba(0, 153, 69, 0.05);
    border: 3px solid #0dbe3e;
    margin: 0 clamp(20px, 5vw, 60px) 20px clamp(20px, 5vw, 60px);
}

.rules-content{
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: space-around;
    margin: clamp(10px, 2vw, 20px) clamp(15px, 3vw, 30px);
}

.rules-line{
    display: flex;
    text-align: left;
    font-size: clamp(12px, 2.5vw, 20px);
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

.rules-line p{
    margin: clamp(10px, 2vw, 20px) 0;
    padding: 0 clamp(10px, 2vw, 20px);
    line-height: 1.5;
}

.rules-top{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 3vw, 30px) 0;
}

.rules-top h2{
    font-size: clamp(20px, 4vw, 32px);
}

.comic{
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    margin: clamp(30px, 6vw, 60px) 0;
    padding: 0 15px;
}

.comic-container {
    width: 100%;
    max-width: 1000px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    margin-bottom: 20px;
    position: relative;
}

.comic-page {
    display: none;
    animation: fadeIn 0.5s ease;
}

.comic-page.active {
    display: block;
}

.comic-image {
    width: 100%;
    height: auto;
    display: block;
}

.navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 1000px;
    padding: 0 10px;
}

.nav-btn {
    background: transparent;
    border: none;
    padding: clamp(10px, 2vw, 20px);
    cursor: pointer;
    font-size: clamp(16px, 3vw, 24px);
    font-family: 'Pixel';
    color: #eee;
}

.nav-btn:disabled {
    display: none;
}

.page-counter {
    font-size: clamp(14px, 2.5vw, 24px);
    padding: 8px 16px;
    color: #eee;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(3, 15, 15, 0);
    backdrop-filter: blur(0px);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
    background: rgba(3, 15, 15, 0.85);
    backdrop-filter: blur(8px);
}

#menu {
    display: flex;
    list-style: none;
    align-items: center;
}

#menu.active-nav {
    display: flex;
    padding: 20px;
    flex-direction: column;
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-20px) scale(0.95);
    right: auto;
    width: 90%;
    max-width: 400px;
    background: rgba(3, 15, 15, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1001;
    border: 2px solid #0dbe3e;
    box-shadow: 0 0 40px rgba(13, 190, 62, 0.4), 0 20px 60px rgba(0, 0, 0, 0.8);
    border-radius: 16px;
    opacity: 0;
    animation: menuSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#menu.active-nav li {
    margin: 8px 0;
    width: 100%;
    text-align: center;
    opacity: 0;
    transform: translateX(-20px);
    animation: menuItemSlideIn 0.3s ease forwards;
}

#menu.active-nav li:nth-child(1) { animation-delay: 0.1s; }
#menu.active-nav li:nth-child(2) { animation-delay: 0.15s; }
#menu.active-nav li:nth-child(3) { animation-delay: 0.2s; }
#menu.active-nav li:nth-child(4) { animation-delay: 0.25s; }
#menu.active-nav li:nth-child(5) { animation-delay: 0.3s; }

#menu.active-nav li a {
    display: block;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

#menu.active-nav li a:hover {
    background: rgba(13, 190, 62, 0.1);
    box-shadow: 0 0 15px rgba(13, 190, 62, 0.2);
    transform: translateX(5px);
}

#menu.active-nav .btn-reg {
    margin: 10px auto 0 auto;
    width: 100%;
    max-width: 250px;
}

@keyframes menuSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
}

@keyframes menuItemSlideIn {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

#menu.closing {
    animation: menuSlideOut 0.3s ease forwards;
}

@keyframes menuSlideOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px) scale(0.95);
    }
}

.nav-toggle {
    display: none;
    cursor: pointer;
    width: 55px;
    height: 42px;
    position: relative;
    z-index: 1002;
}

.nav-toggle span {
   display: block;
   position: absolute;
   top: 19px;
   left: 8px;
   right: 8px;
   height: 2px;
   background: #0DBE3E;
   box-shadow: 0 0 7px 0 #009945;
   transition: all 0.3s ease;
}

.nav-toggle span:before, .nav-toggle span:after {
   content: "";
   position: absolute;
   display: block;
   left: 0;
   width: 100%;
   height: 2px;
   background: #0DBE3E;
   box-shadow: 0 0 7px 0 #009945;
   transition: all 0.3s ease;
}

.nav-toggle span:before {
   top: -10px;
}

.nav-toggle span:after {
   bottom: -10px;
}

.nav-toggle.active span {
   background: transparent;
   box-shadow: none;
}

.nav-toggle.active span:before {
   top: 0;
   transform: rotate(45deg);
   background: #ac8ef6;
   box-shadow: 0 0 7px #6e3ce9;
}

.nav-toggle.active span:after {
   bottom: 0;
   transform: rotate(-45deg);
   background: #ac8ef6;
   box-shadow: 0 0 7px #6e3ce9;
}

@media screen and (max-width: 1024px){
    .ctf-info{
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    .information{
        width: 100%;
    }

    .information-block{
        width: 100%;
    }

    .information-block > div:nth-child(2){
        padding: 0 20px;
    }

    .helpers-top{
        width: 80%;
        justify-content: center;
    }

    .helper-content{
        flex-direction: column-reverse;
        width: 100%;
        align-items: center;
    }

    .helper-info-line{
        width: 80%;
    }
}

@media screen and (max-width: 768px){
    .terminal{
        font-size: 16px;
        border-width: 2px;
    }

    .terminal-top img{
        width: clamp(60px, 12vw, 80px);
        height: auto;
    }

    .terminal-top div p{
        margin-left: 5px;
    }

    .ctf-image{
        font-size: 14px;
    }

    .ctf{
        padding: 20px 40px;
    }

    .ctf-profile{
        margin: 30px auto;
    }

    .ctf-info{
        margin-top: 50px;
        padding: 0 20px;
        gap: 30px;
    }

    .information-block > div:nth-child(2){
        padding: 0 15px;
    }

    .information-block p{
        padding: 15px 0;
    }

    .scores{
        margin-top: 20px;
        width: 100%;
        max-width: 300px;
    }

    .score-list{
        width: 100%;
        gap: 30px;
    }

    .helpers-top{
        width: 90%;
    }

    .helper-content{
        padding: 30px 20px;
    }

    .helper-info-line{
        width: 90%;
        padding: 10px 25px;
    }

    .rules-top h2{
        font-size: 24px;
    }

    .rules{
        border-width: 2px;
    }

    .nav-toggle {
        display: block;
    }

    #menu{
        display: none;
    }
}

@media screen and (max-width: 480px){
    .terminal{
        font-size: 11px;
        border-width: 2px;
    }

    .terminal-top div{
        padding-left: 5px;
    }

    .terminal-top img{
        width: 50px;
    }

    .ctf-image{
        font-size: 8px;
        line-height: 1.2;
        align-self: center;
        margin: 10px 0;
    }

    .terminal-block{
        padding: 8px;
    }

    .terminal-block p{
        line-height: 1.5;
        text-wrap: wrap;
        width: 100%;
        font-size: 11px;
    }

    .terminal-top div p{
        margin-left: 3px;
    }

    .ctf, .ctf-profile{
        align-items: center;
        padding: 10px;
    }

    .ctf p, .ctf-profile p{
        line-height: 1.5;
        text-align: center;
        text-wrap: wrap;
        width: 100%;
        font-size: 11px;
    }

    .ctf{
        padding: 0;
    }

    .ctf-profile{
        margin: 15px auto;
    }

    .ctf-profile img{
        width: 180px;
        height: auto;
    }

    .ctf-profile p{
        margin: 0 auto;
    }

    .information{
        width: 100%;
    }

    .information-block p{
        padding: 15px 0;
        font-size: 11px;
    }

    .information-block > div:nth-child(2){
        padding: 0 10px;
    }

    .ctf-info{
        margin-top: 30px;
        padding: 0;
        gap: 25px;
    }

    .scores{
        min-width: unset;
        width: 100%;
        max-width: 260px;
    }

    .score-list{
        width: 100%;
        font-size: 11px;
        gap: 20px;
    }

    .helper-content{
        flex-direction: column-reverse;
        width: 100%;
        padding: 15px 10px;
    }

    .helper-info-line{
        width: 100%;
        padding: 8px 15px;
        margin: 10px 0;
        font-size: 12px;
    }

    #help p{
        font-size: 13px;
    }

    .helpers-top{
        width: 100%;
        gap: 5px;
    }

    .helper{
        padding: 5px 15px;
        font-size: 12px;
    }

    .helpers{
        margin-top: 30px;
        padding: 0 10px;
    }

    #help .container-line {
        width: 100%;
    }

    #helper-info p{
        width: 100%;
        font-size: 12px;
    }

    .helper-content img{
        width: 100px;
        height: auto;
    }

    .rules-top h2{
        font-size: 18px;
    }

    .rules-line{
        font-size: 11px;
    }

    .rules-line p{
        margin: 8px 0;
        padding: 0 10px;
    }

    .rules{
        margin: 0 0 15px 0;
        border-width: 2px;
    }

    .rules-content{
        margin: 8px;
    }

    .rules-top{
        padding: 15px 0;
    }

    .comic{
        margin: 20px 0;
    }

    .nav-btn {
        font-size: 14px;
    }

    .page-counter {
        font-size: 14px;
    }

    #menu.active-nav {
        top: 70px;
        width: 95%;
        padding: 15px;
    }

    #menu.active-nav li a {
        font-size: 14px;
        padding: 10px 15px;
    }
}

@media screen and (max-width: 320px){
    .terminal{
        font-size: 10px;
    }

    .ctf-image{
        font-size: 6px;
    }

    .ctf-profile img{
        width: 150px;
    }

    .rules-top h2{
        font-size: 16px;
    }

    .information-block p{
        font-size: 10px;
    }

    .score-list{
        font-size: 10px;
    }
}