/* Base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin-block-end: 0px;
    /* margin-block-start: 0px; */
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
    width: 100%;
    color: #1a202c;
    font-size: 16px;
    /* Base for rem */
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    padding: 1rem 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header.scrolled .nav-link {
    color: #333;
}

.header.scrolled .hamburger span {
    background-color: #333;
}

/* Logo */
.logo {
    height: 5rem;
}

/* Hamburger Menu */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    z-index: 101;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Hamburger animation */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

@media (min-width: 768px) {
    .hamburger {
        display: none;
    }
}

/* Navigation */
/* Navigation Dropdown for Mobile */
.nav {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 5.5rem;
    /* Adjusted to sit below header */
    right: -100%;
    width: 14rem;
    height: auto;
    background: #ffffff;
    padding: 2rem;
    gap: 1.5rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 100;
    border-radius: 1rem;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    color: #333;
}

.nav.active {
    right: 1.5rem;
    /* Rectangular dropdown position */
}

@media (min-width: 768px) {
    .nav {
        position: static;
        flex-direction: row;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        padding: 0;
        right: 0;
        box-shadow: none;
        color: #ffffff;
        /* White links for desktop background */
    }
}

/* Nav links */
.nav-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: color 0.2s;
    font-weight: 600;
}

.nav-link:hover {
    color: #82d616;
}

/* Button */
.explore-button {
    background: linear-gradient(135deg, #82d616 0%, #4caf50 100%);
    color: #ffffff;
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 2rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(130, 214, 22, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.explore-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(130, 214, 22, 0.6);
}



/* --- Instruction Page Specific Styles --- */

.instruction-section {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-top: 7rem;
    padding-bottom: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Background */
/* Background */
.instruction-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6rem;
    pointer-events: none;
    /* Allow clicks to pass through to content if needed */
}

.bg-instruction {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

/* Header (Standalone) */
.instruction-header {
    text-align: center;
    margin-bottom: 2rem;
    color: #002549;
    z-index: 10;
}

.inst-title-main {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1.8rem, 5vw, 3.5rem);
    font-weight: 900;
    margin: 0;
    color: #002549;
    /* Dark blue/black title */
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
    pointer-events: auto;
    text-align: center;
    padding: 0 1rem;
}

.inst-subtitle-main {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.8rem, 1.5vw, 1.2rem);
    font-weight: 700;
    margin-top: 0.5rem;
    color: #002549;
    letter-spacing: 1px;
    pointer-events: auto;
    text-align: center;
    padding: 0 1rem;
    line-height: 1.3;
}

@media (max-width: 768px) {
    .inst-title-main {
        font-size: clamp(1.4rem, 4vw, 2.5rem);
        padding: 0 0.5rem;
    }

    .inst-subtitle-main {
        font-size: clamp(0.7rem, 2.5vw, 1rem);
        padding: 0 0.5rem;
        margin-top: 0.3rem;
    }
}

/* Content Wrapper */
/* Content Wrapper */
.instruction-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    width: 95%;
    max-width: 55rem;
    align-items: center;
    z-index: 10;
    margin-top: 10rem;
    position: relative;
}

/* Footer */
.simple-footer {
    width: 100%;
    margin-top: 0rem;
    padding-bottom: 0rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* gap: 1.5rem; */
    z-index: 10;
}

.footer-line {
    width: 100%;
    height: 1px;
    background-color: rgba(0, 37, 73, 0.2);
    /* Subtle dark line */
    max-width: 90%;
}

.footer-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: #002549;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 1200px) {
    .instruction-content {
        margin-top: 8rem;
        width: 97%;
        max-width: 50rem;
    }
}

@media (max-width: 992px) {
    .instruction-content {
        margin-top: 6rem;
        width: 98%;
        gap: 1.5rem;
    }
}

.inst-step-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
}

.inst-step-img {
    width: 100%;
    height: auto;
    display: block;
    /* Images likely have shadows/rounded corners baked in or added via CSS */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.15));
}

.inst-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.inst-overlay.top-center {
    display: flex;
    justify-content: center;
    padding-top: 8%;
    /* Percentage based on image height usually */
}

.inst-card-title {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.8rem);
    font-weight: 800;
    color: #002549;
    text-align: center;
}

/* --- Specific Card Layouts --- */

/* Card 1: Getting Started */
.s1-title-pos {
    position: absolute;
    top: 0%;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.bottom-labels-s1 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: flex-start;
    /* Align closer to icons */
    padding-top: 30%;
    /* Based on image aspect ratio approx */
    padding-left: 0%;
    padding-right: 5%;
    width: 100%;
    text-align: center;
    gap: 0.5rem;
}

.inst-label-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0.25rem;
}

.label-heading {
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.5rem, 1.2vw, 0.95rem);
    font-weight: 700;
    line-height: 1.1;
    color: #002549;
    text-align: center;
}

.label-sub {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.5rem, 1.1vw, 0.9rem);
    font-weight: 600;
    color: #002549;
    margin-top: 0.2rem;
}

@media (max-width: 768px) {
    .bottom-labels-s1 {
        /* padding-top: 50%;
        padding-bottom: 8%; */
        gap: 0.2rem;
    }

    .inst-label-box {
        padding: 0 0.1rem;
    }

    .label-heading {
        font-size: clamp(0.4rem, 2.5vw, 0.7rem);
        line-height: 1.05;
    }
}

@media (max-width: 480px) {
    .bottom-labels-s1 {
        padding-top: 30%;
        padding-bottom: 10%;
    }

    .label-heading {
        font-size: clamp(0.35rem, 2.2vw, 0.6rem);
    }
}


/* Card 2: Two Paths */
.s2-title-pos {
    position: absolute;
    top: 1%;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.middle-path-labels {
    display: flex;
    justify-content: space-between;
    padding-top: 35%;
    padding-left: 6%;
    padding-right: 6%;
    /* Adjust based on image layout */
    align-items: flex-start;
    gap: 1rem;
}

.path-label {
    width: 48%;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: clamp(0.5rem, 1.1vw, 1.9rem);
    font-weight: 600;
    color: #002549;
    line-height: 1.2;
}

.path-label span {
    font-family: 'Rajdhani', sans-serif;
    font-weight: 700;
    font-size: 0.9em;
}

.bottom-bar-tip {
    position: absolute;
    bottom: 6%;
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 0 1rem;
}

.pro-tip-box {
    /* background: transparent; */
    /* border: 1px solid #b3e0ff; */
    padding: 0.4rem 1rem;
    border-radius: 0.5rem;
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.6rem, 1.2vw, 2rem);
    color: #002549;
    text-align: center;
    /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); */
    max-width: 90%;
}

@media (max-width: 768px) {
    .middle-path-labels {
        /* padding-top: 50%;
        padding-left: 4%;
        padding-right: 4%; */
        /* flex-direction: column; */
        align-items: center;
        gap: 1.5rem;
    }

    .path-label {
        width: 80%;
        font-size: clamp(0.45rem, 2.5vw, 0.9rem);
    }

    .bottom-bar-tip {
        bottom: 6%;
    }

    .pro-tip-box {
        font-size: clamp(0.5rem, 2.2vw, 0.8rem);
        padding: 0.3rem 0.8rem;
        max-width: 95%;
    }
}



.yellow-tip {
    /* background: #1565c0; */
    /* Dark blue background */
    color: #fff;
    border: none;
    width: 96%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.5rem 0.8rem;
}

.yellow-tip strong {
    color: #ffca28;
    /* Yellow text for label */
    font-family: 'Orbitron', sans-serif;
}

.tip-icon {
    color: #ffca28;
    /* Yellow star */
    font-size: 1.2em;
}

@media (max-width: 768px) {
    .yellow-tip {
        gap: 0.4rem;
        padding: 0.3rem 0.6rem;
        width: 98%;
    }

    .tip-icon {
        font-size: 1.1em;
    }
}

@media (max-width: 480px) {
    .yellow-tip {
        gap: 0.3rem;
        padding: 0.25rem 0.5rem;
        flex-direction: column;
    }

    .tip-icon {
        font-size: 1em;
    }
}


/* Card 3: Battle Arena */
.s3-title-pos {
    position: absolute;
    top: 0%;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.s3-screen-text-pos {
    position: absolute;
    top: 33%;
    /* Adjust to fit inside the bubble */
    left: 23%;
    width: 30%;
    z-index: 6;
    color: #1a1a1a;
    pointer-events: none;
}

.question-text {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: clamp(0.45rem, 1.1vw, 1rem);
    /* Slightly smaller to fit */
    margin-top: 0;
    margin-bottom: 0.3rem;
    line-height: 1.2;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.options-list p {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(0.4rem, 0.95vw, 0.9rem);
    margin: 0;
    line-height: 1.15;
    color: #1a1a1a;
}

.right-content-s3 {
    position: absolute;
    top: 16%;
    right: 1%;
    width: 39%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 5;
}

@media (max-width: 768px) {
    .s3-screen-text-pos {
        /* top: 30%;
        left: 20%; */
        width: 35%;
    }

    .question-text {
        font-size: clamp(0.35rem, 2vw, 0.7rem);
        margin-bottom: 0.2rem;
        line-height: 1.1;
    }

    .options-list {
        gap: 0.1rem;
    }

    .options-list p {
        font-size: clamp(0.3rem, 1.8vw, 0.6rem);
        line-height: 1.1;
    }

    .right-content-s3 {
        /* top: 18%;
        right: 2%; */
        width: 42%;
    }
}

@media (max-width: 480px) {
    .s3-screen-text-pos {
        top: 35%;
        left: 25%;
        width: 38%;
    }

    .question-text {
        font-size: clamp(0.3rem, 1.8vw, 0.6rem);
    }

    .options-list p {
        font-size: clamp(0.28rem, 1.6vw, 0.55rem);
    }

    .right-content-s3 {
        width: 44%;
        top: 20%;
        right: 2%;
        /* Move slightly left to ensure it's on screen */
    }
}

.s3-text-group {
    text-align: left;
    /* margin-bottom: 1rem; */
    width: 100%;
}

.feature-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(0.6rem, 1.3vw, 1.1rem);
    color: #002549;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    font-weight: 600;
}

.feature-text strong {
    font-family: 'Orbitron', sans-serif;
    font-weight: 700;
}

.inst-vid-btn {
    background: #FF0000c2;
    color: #fff;
    border: 1px solid #3f0606;
    padding: 0.8rem 1.2rem;
    border-radius: 0.9rem;
    font-family: 'Orbitron', sans-serif;
    font-weight: 800;
    font-size: clamp(0.6rem, 1.2vw, 1.1rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    text-align: left;
    line-height: 1.2;
    transform: translateY(0);
    transition: transform 0.1s, box-shadow 0.1s;
    width: 90%;
    pointer-events: auto;
}

.inst-vid-btn i {
    font-size: 1.5em;
    background: #fff;
    color: #FF0000;
    border-radius: 50%;
    padding: 4px;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .feature-text {
        font-size: clamp(0.5rem, 2vw, 0.85rem);
        margin-bottom: 0.6rem;
        line-height: 1.25;
    }

    .inst-vid-btn {
        font-size: clamp(0.5rem, 1.8vw, 0.8rem);
        padding: 4px 0.8rem;
        gap: 0.5rem;
        width: fit-content;
    }

    .inst-vid-btn i {
        width: 30px;
        height: 30px;
    }

    .right-content-s3,
    .right-content-s4 {
        padding-top: 0%;
        /* Adjusted padding 2% */
        align-items: center;
    }

    .s3-text-group,
    .s4-text-group {
        width: 66%;
        text-align: left;
    }
}

@media (max-width: 480px) {
    .feature-text {
        font-size: clamp(0.45rem, 1.8vw, 0.75rem);
        margin-bottom: 0.5rem;
    }

    .inst-vid-btn {
        font-size: clamp(0.45rem, 1.6vw, 0.7rem);
        padding: 0.3rem 0.6rem;
        gap: 0.4rem;
        width: fit-content;
        /* Prevent it from being too wide if container is small */
        max-width: 100%;
        border-radius: 0.5rem;
    }

    .inst-vid-btn i {
        font-size: 1em;
        width: 20px;
        height: 20px;
    }
}



.inst-vid-btn:active {
    transform: translateY(4px);
    box-shadow: 0 0 0 #b71c1c;
}


/* Card 4: Ranking */
.s4-title-pos {
    position: absolute;
    top: 0%;
    width: 100%;
    text-align: center;
    z-index: 2;
}

.s4-leaderboard-pos {
    position: absolute;
    top: 25%;
    left: 40%;
    /* Centerish based on typical image layout */
    width: 15%;
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    /* Adjusted gap .3 */
    z-index: 5;
    font-family: 'Outfit', sans-serif;
}

.lb-row {
    display: flex;
    align-items: center;
    /* background: #e3f2fd; */
    padding: 0.15rem 0.3rem;
    border-radius: 0.2rem;
    font-size: clamp(0.4rem, 0.9vw, 0.95rem);
    color: #002549;
    font-weight: 700;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .s4-leaderboard-pos {
        top: 26%;
        /* left: 38%; */
        width: 18%;
        gap: 0.3rem;
        /* Adjusted gap .35 */
    }

    .lb-row {
        font-size: clamp(0.35rem, 1.5vw, 0.7rem);
        padding: 0.1rem 0.2rem;
    }
}

@media (max-width: 480px) {
    .s4-leaderboard-pos {
        top: 26%;
        left: 40%;
        width: 20%;
    }

    .lb-row {
        font-size: clamp(0.3rem, 1.3vw, 0.6rem);
    }
}

/* .lb-rank-1 {
    background: #fff9c4;
    
    border: 1px solid #ffecb3;
}

.lb-rank-2 {
    background: #eceff1;
    
}

.lb-rank-3 {
    background: #fbe9e7;
   
} */

.rank-num {
    width: 1.2rem;
    text-align: center;
    margin-right: 0.4rem;
    color: #555;
    font-weight: 800;
}

.system-note-text {
    width: 100%;
    text-align: center;
    /* margin: 3rem 0; */
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1rem, 3.5vw, 2.2rem);
    color: #002549;
    font-weight: 700;
    line-height: 1.3;
    padding: 0 1rem;
}

/* Enter Base Camp Button */
.inst-btn-wrapper {
    position: relative;
    width: 40%;
    min-width: 200px;
    max-width: 350px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: transform 0.2s;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .system-note-text {
        font-size: clamp(0.85rem, 3vw, 1.5rem);
        padding: 0 0.5rem;
        margin: 1.5rem 0;
    }

    .inst-btn-wrapper {
        width: 60%;
        min-width: 180px;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .system-note-text {
        font-size: clamp(0.75rem, 2.8vw, 1.3rem);
        line-height: 1.25;
    }

    .inst-btn-wrapper {
        width: 70%;
        min-width: 160px;
    }
}

.inst-btn-wrapper:hover {
    transform: scale(1.05);
}

.inst-btn-img {
    width: 100%;
    height: auto;
    display: block;
}

.inst-btn-text {
    position: absolute;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: clamp(1rem, 1.5vw, 1.5rem);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    letter-spacing: 1px;
}

.lb-rank-1 .rank-num {
    color: #fbc02d;
    font-size: 1.1em;
}

.lb-rank-2 .rank-num {
    color: #78909c;
}

.lb-rank-3 .rank-num {
    color: #8d6e63;
}

.lb-avatar {
    margin-right: 0.5rem;
    font-size: 1.25em;
}

.lb-name {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.right-content-s4 {
    position: absolute;
    top: 30%;
    right: 3%;
    width: 38%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    z-index: 5;
}

.s4-text-group {
    text-align: left;
    width: 100%;
}


/* Footer CTA Section */
.footer-cta-section {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 1rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.final-sys-text {
    font-family: 'Rajdhani', sans-serif;
    font-size: clamp(1rem, 1.3vw, 1.2rem);
    color: #002549;
    margin-bottom: 2rem;
    line-height: 1.5;
    max-width: 50rem;
    font-weight: 600;
}

.enter-base-btn {
    background: linear-gradient(180deg, #43a047 0%, #2e7d32 100%);
    color: #fff;
    padding: 1rem 3.5rem;
    border: none;
    border-radius: 0.5rem;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 1px;
    box-shadow: 0 0 20px rgba(76, 175, 80, 0.6);
    cursor: pointer;
    transition: transform 0.2s;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
}

.enter-base-btn:hover {
    transform: scale(1.05);
}

.footer-copyright {
    margin-top: 1rem;
}

.footer-copyright p {
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.9rem;
    color: #002549;
    opacity: 0.7;
    letter-spacing: 1px;
    margin: 0;
    font-weight: 500;
}

/* Additional Mobile Adjustments */
@media (max-width: 600px) {
    .instruction-section {
        padding-top: 7rem;
    }

    .instruction-bg {
        padding-top: 8rem;
    }

    .instruction-content {
        margin-top: 5rem;
        gap: 1rem;
    }

    .inst-step-img {
        filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.15));
    }
}

@media (max-width: 360px) {
    .instruction-content {
        width: 100%;
        padding: 0 0.5rem;
    }

    .inst-card-title {
        font-size: clamp(0.8rem, 3vw, 1.2rem);
    }

    .system-note-text {
        font-size: clamp(0.7rem, 2.5vw, 1.1rem);
    }

    .inst-btn-wrapper {
        width: 80%;
        min-width: 140px;
    }

    .inst-btn-text {
        font-size: clamp(0.8rem, 2vw, 1.2rem);
    }
}

@media (max-width:2048px) {
    .pro-tip-box {
        font-size: clamp(0.6rem, 1.2vw, 1.2rem)
    }
    
}
@media (max-width:3072px) {
    .pro-tip-box {
        font-size: clamp(0.6rem, 1.2vw, 1.2rem)
    }
    .path-label {
        font-size: clamp(0.5rem, 1.1vw, 1.4rem);
    }
    
}

@media (max-width: 480px) {
    .middle-path-labels {
        padding-top: 35%;
        flex-direction: row;
        gap: 1rem;
    }

    .path-label {
        width: 90%;
        font-size: clamp(0.4rem, 2.2vw, 0.8rem);
        line-height: 1.1;
    }

    .pro-tip-box {
        font-size: clamp(0.45rem, 2vw, 0.7rem);
    }
}