﻿/* Quest Level Shared CSS (L2-L4) */

/* =====================================================================
   LAYOUT
   ===================================================================== */

.level-container {
    min-height: 100vh;
    background: linear-gradient(180deg, #eef5ff, #ffffff);
    display: flex;
    flex-direction: column;
    gap: 25px;
    padding: 30px;
    box-sizing: border-box;
}


.bottom-section {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
    align-items: start;
}


.right-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
    position: sticky;
    top: 20px;
    align-self: start;
}

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

.code-card,
.visual-card,
.steps-card,
.lesson-card {
    background: white;
    border-radius: 20px;
    padding: 25px;
    box-shadow: 0 12px 30px rgba(0,0,0,.12);
    box-sizing: border-box;
}


/* =====================================================================
   HEADERS
   ===================================================================== */

.lion {
    font-size: 70px;
    text-align: center;
}
.lion-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.lion-status {
    font-size: 18px;
    font-weight: 400;
    color: #555;
}

h1 {
    text-align: center;
    color: #23408e;
    font-size: 42px;
    margin: 10px 0;
}


h2 {
    text-align: center;
    color: #2d5be3;
    font-size: 22px;
}


/* =====================================================================
   CODE
   ===================================================================== */

.code-card h3,
.steps-card h3,
.lesson-card h3 {
    color: #2d5be3;
    margin-top: 0;
    margin-bottom: 15px;
}


.code-card pre {
    background: #1e1e1e;
    color: white;
    padding: 20px;
    border-radius: 12px;
    overflow-x: auto;
    font-size: 14px;
    line-height: 1.5;
}


/* =====================================================================
   VISUAL STONES
   ===================================================================== */

.stones {
    display: flex;
    justify-content: center;
    gap: 36px;
    margin: 55px 0;
}

.stone-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 160px;
    position: relative;
    text-align: center;
}


.pointer {
    height: 45px;
    font-size: 22px;
    font-weight: bold;
    text-align: center;
}


.pointer-i,
.pointer-current {
    color: #2d5be3;
}


.pointer-j,
.pointer-next {
    color: #8e44ad;
}

.pointer-k {
    color: #00bcd4; /* teal/cyan blue */
}


.pointer-arrow {
    position: absolute;
    top: 22px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
}

.stone {
    position: relative;
    font-size: 65px;
    filter: drop-shadow(0 5px 8px rgba(0,0,0,.25));
    transition: transform .3s ease, filter .3s ease;
}


    .stone span {
        position: absolute;
        top: 30px;
        left: 0;
        width: 100%;
        text-align: center;
        color: #23408e;
        font-size: 24px;
        font-weight: 900;
    }


    .stone.active {
        transform: translateY(-20px) scale(1.15);
        animation: glow 1s infinite alternate;
    }


    .stone.duplicate-match {
        transform: scale(1.25);
        animation: duplicateGlow .5s infinite alternate;
    }


@keyframes glow {

    from {
        filter: drop-shadow(0 0 8px gold);
    }

    to {
        filter: drop-shadow(0 0 25px orange);
    }
}


@keyframes duplicateGlow {

    from {
        filter: drop-shadow(0 0 12px #8e44ad);
    }

    to {
        filter: drop-shadow(0 0 30px #2d5be3);
    }
}


/* =====================================================================
   TARGET
   ===================================================================== */

.target {
    text-align: center;
    font-size: 26px;
    font-weight: bold;
    color: #23408e;
}


.status-badge {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 30px;
    background: #eaeaea;
    color: #7f8c8d;
    font-size: 20px;
}


    .status-badge.found {
        background: #8e44ad;
        color: white;
    }


/* =====================================================================
   MESSAGE
   ===================================================================== */

.animation-message {
    margin-top: 25px;
    padding: 20px;
    border-radius: 15px;
    background: #eef5ff;
    text-align: center;
    font-size: 20px;
    font-weight: bold;
    color: #23408e;
}


/* =====================================================================
   ACTION CARD
   ===================================================================== */

.steps-card {
    display: flex;
    flex-direction: column;
}


.current-action {
    padding: 18px;
    background: #eef5ff;
    border-left: 5px solid #2d5be3;
    border-radius: 12px;
    color: #23408e;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 15px;
}


.action-button {
    width: 100%;
    padding: 14px 35px;
    border: none;
    border-radius: 15px;
    background: #2d5be3;
    color: white;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
}


/* =====================================================================
   LESSON
   ===================================================================== */

.remember-box {
    background: #fff9db;
    border-left: 5px solid #fcc419;
    padding: 15px;
    border-radius: 0 12px 12px 0;
    color: #665400;
    font-size: 16px;
    line-height: 1.6;
}


/* =====================================================================
   L4 OPTIONAL SHARED EXTENSIONS
   ===================================================================== */

.dictionary-card {
    margin-top: 20px;
    padding: 18px;
    background: #f8fbff;
    border: 2px solid #c9dcff;
    border-radius: 16px;
}


.dictionary-table {
    border-collapse: collapse;
}


    .dictionary-table td,
    .dictionary-table th {
        padding: 10px;
        text-align: center;
    }


    .dictionary-table th {
        background: #2d5be3;
        color: white;
    }

.lesson-text {
    margin: 0 0 12px 0;
    white-space: pre-line;
}

.complexity-metrics {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.metric-item {
    font-size: 15px;
}
.main-visual-column {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Enter Portal button and Reset button should appear side by side - Starts */
.action-buttons {
    display: flex;
    gap: 12px;
}

    .action-buttons .action-button {
        flex: 1;
        margin: 0;
    }
/* Enter Portal button and Reset button should appear side by side - Ends */
/* Added for Contains Duplicates problem - Starts */
.pebble-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Aligns all pebbles to the center */
    align-items: flex-end;
    gap: 15px;
    width: 100%;
}
/* Added for Contains Duplicates problem - Ends */
/* Keeps lengthier text in Current Action text readable while fitting within the card - Starts */
.current-action-squished {
    padding: 18px;
    background: #eef5ff;
    border-left: 5px solid #2d5be3;
    border-radius: 12px;
    color: #23408e;
    font-size: 17px;
    font-weight: 600;
    line-height: 1.6;
    white-space: pre-line;
    margin-bottom: 15px;
}
/* Keeps lengthier Current Action text readable while fitting within the card - Ends */
/* =====================================================================
   RESPONSIVE
   ===================================================================== */

@media(max-width:1100px) {

    .bottom-section {
        grid-template-columns: 1fr;
    }


    .stones {
        flex-wrap: wrap;
    }
}


@media(max-width:768px) {

    .level-container {
        padding: 20px;
    }


    h1 {
        font-size: 34px;
    }


    .stone {
        font-size: 55px;
    }
}
