/* MAIN LAYOUT */

main {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

/* TITLU */

main h1 {
    text-align: center;
    font-size: clamp(24px, 5vw, 40px);
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin-bottom: 0px;
    padding: 0 20px;
}

/* SUBTITLU */

#subTitle {
    display: flex;
    justify-content: center;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    margin-bottom: 30px;
    font-size: clamp(16px, 3vw, 20px);
    padding: 0 10px;
    text-align: center;
}

/* TEORIE */

.teory {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    padding: 0 10px;
}

#teoryCard {
    padding: 15px 20px;
    width: 100%;
    max-width: 800px;
    min-height: 180px;
    background-color: #d0ebff;
    border: solid 3px #a5d8ff;
    border-radius: 20px;
    box-sizing: border-box;
    overflow-x: auto;
    word-wrap: break-word;
}

.teoryMenu {
    height: 200px;
    padding: 15px 20px;
    width: 100%;
    max-width: 300px;
    background-color: #d0ebff;
    border: solid 3px #a5d8ff;
    border-radius: 20px;
    box-sizing: border-box;
}

.teoryMenu h2 {
    display: flex;
    justify-content: center;
    font-size: clamp(18px, 3vw, 24px);
    margin: 10px 0;
}

#teoryCard h2 {
    font-size: clamp(16px, 2.5vw, 24px);
    line-height: 1.4;
}

/* BUTOANE TEORIE */

.teoryMenuButtons {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.teoryMenuButtons button {
    width: 120px;
    height: 45px;
    color: white;
    border: solid 3px #228be6;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: clamp(12px, 2vw, 16px);
    transition: all 0.3s ease;
}

#previousButton {
    background-color: gray;
}

#nextButton {
    background-color: #1864ab;
}

/* CARDS - HEADER */

#cardsTitle {
    padding: 30px 20px 20px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#cardsTitle h3 {
    color: #1864ab;
    font-size: 20px;
    margin: 0;
}

#vectorInput
{
    height: 35px;
    border: 3px #1864ab solid;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
    font-size: clamp(14px, 3vw, 20px);
    box-sizing: border-box;
    padding: 0 10px;
}
#deCautatInput 
{
    height: 35px;
    border: 3px #1864ab solid;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
    font-size: clamp(14px, 3vw, 20px);
    box-sizing: border-box;
    padding: 0 10px;  
    width: 100px;
}

/* CONTAINER & CARDURI */

.container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 10px;
}

.card {
    display: grid;
    row-gap: 15px;
    width: 100%;
    max-width: 900px;
}

.card h2 {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    color: #0b7285;
    margin: 0;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    font-size: clamp(18px, 3vw, 24px);
    padding: 0 10px;
}

.cardContent {
    background-color: #d0ebff;
    width: 100%;
    height: 400px;
    min-height: 300px;
    border: solid 3px #a5d8ff;
    border-radius: 20px;
    box-sizing: border-box;
    position: relative;
}

.code,
#code {
    border: none;
    outline: none;
    resize: none;
    width: 100%;
    height: 100%;
    border-radius: 20px;
    padding: 15px;
    background-color: transparent;
    font-size: clamp(12px, 2vw, 18px);
    font-family: monospace;
    box-sizing: border-box;
}

/* CARD FOOTER */

.cardFooter {
    background-color: #a5d8ff;
    border-radius: 20px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    box-sizing: border-box;
}

.cardFooterLeft,
.cardFooterRight {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footerIco {
    color: #1864ab;
    font-size: clamp(20px, 4vw, 30px);
    cursor: pointer;
}

/* TOOLTIP */

.ico-container {
    position: relative;
    display: inline-block;
}

.details-box {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #1864ab;
    padding: 10px;
    border: 1px solid #ccc;
    z-index: 10;
    min-width: 200px;
    max-width: 300px;
    box-shadow: 0px 4px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    color: white;
}

.ico-container:hover .details-box {
    display: block;
}

/* VECTOR BOX */

.vector-box {
    width: 60px;
    height: 60px;
    background-color: #f1f3f5;
    border: 3px solid #1864ab;
    border-radius: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 20px;
    font-weight: bold;
    transition: background-color 0.5s, transform 0.3s;
}

.vector-box.active {
    background-color: #ffd43b;
    transform: scale(1.1);
}

.vector-box.found {
    background-color: #51cf66 !important;
}

.vector-box.not-found {
    background-color: #ff6b6b !important;
}

.vector-box.eliminated {
    background-color: #ff4d4d;
    color: white;
    opacity: 0.6;
}

/* FULLSCREEN SUPPORT */

.cardContent:fullscreen #code {
    height: 100vh;
    width: 100%;
}

/* RESPONSIVE – PENTRU TELEFOANE */

@media (max-width: 768px) {
    main {
        padding: 15px;
        gap: 20px;
    }

    #teoryCard,
    .teoryMenu,
    .card {
        width: 100%;
        max-width: 100%;
    }

    .cardContent {
        height: auto;
        min-height: 300px;
    }

    .teoryMenuButtons {
        justify-content: center;
    }

    .cardFooter {
        flex-direction: column;
        height: auto;
        padding: 10px;
        gap: 10px;
    }

    .cardFooterLeft,
    .cardFooterRight {
        justify-content: center;
        flex-wrap: wrap;
    }

    .vector-box {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}
