
/*Title*/

main h1
{
    text-align: center;
    font-size: clamp(24px, 5vw, 40px);
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
    padding: 0 20px;
}

/*Theory*/

.teory
{
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 20px;
    padding: 0 10px;
}

#teoryCard
{
    padding: 15px 20px;
    padding-top: 0;
    width: 100%;
    max-width: 800px;
    min-height: 180px;
    max-height: auto;
    background-color: #d0ebff;
    border: solid 3px #a5d8ff;
    border-radius: 20px;
    box-sizing: border-box;
    overflow-x: auto; /* permite scroll orizontal dacă conținutul e prea mare */
    word-wrap: break-word; /* previne ieșirea conținutului textual */
}

.teoryMenu
{
    height: 200px;
    padding: 15px 20px;
    min-width: 200px;
    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;
}

.teoryMenuButtons
{
    display: flex;
    justify-content: space-evenly;
    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*/

#cardsTitle
{
    padding: 30px 20px 20px;
    margin: 0;
    margin-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-family: Oswald, sans-serif;
}

#cardsTitle h3
{
    color: #1864ab;
    font-size: clamp(20px, 4vw, 30px);
    margin: 0;
}

#NInput
{
    width: 120px;
    height: 35px;
    border: 3px #1864ab solid;
    font-weight: 700;
    border-radius: 20px;
    text-align: center;
    font-size: clamp(16px, 3vw, 20px);
    box-sizing: border-box;
}

.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
{
    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;
}

.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;
    margin-bottom: 20px;
}

.cardFooterLeft
{
    display: flex;
    align-items: center;
    gap: 15px;
}

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

.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;
}

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

.footerIco:hover
{
    color: #1864ab;
}

#runBtn
{
    position: static;
    width: 80px;
    height: 35px;
    background-color: #1864ab;
    color: white;
    border: solid 3px #228be6;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    font-size: clamp(12px, 2vw, 14px);
}

#runBtn:hover
{
    transform: scale(1.05);
}

#grid
{
    padding: 15px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(30px, 1fr));
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.cell
{
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    border: solid 1.5px black;
    border-radius: 5px;
    transition: all 0.3s ease-in-out;
    font-size: clamp(10px, 2vw, 14px);
}

.cell.eliminated {
    background-color: #fa5252 !important;
    color: white;
}

/*Animation*/

.stepsContainer {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;
}

.stepRow {
    display: flex;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}

.stepIndex {
    font-weight: bold;
    margin-right: 8px;
    width: 30px;
    text-align: center;
    font-size: clamp(12px, 2vw, 16px);
}

.cellBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 25px;
    height: 40px;
    border-radius: 6px;
    font-size: clamp(9px, 1.5vw, 11px);
    justify-content: center;
    transition: background-color 0.2s ease;
    border: 1px solid #ccc;
}

.cellBox span {
    font-size: clamp(14px, 3vw, 20px);
}

.cellBox.green {
    background-color: #69db7c;
    color: black;
}

.cellBox.red {
    background-color: #fa5252;
    color: white;
}

.startButtons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    padding-top: 5px;
}

.GraficBtn
{
    width: 90px;
    height: 35px;
    background-color: #1864ab;
    color: white;
    border: solid 3px #228be6;
    border-radius: 20px;
    font-weight: 700;
    cursor: pointer;
    font-size: clamp(11px, 2vw, 14px);
    transition: all 0.3s ease;
}

.GraficBtn:disabled
{
    background-color: gray;
}

#GraficRight
{
    display: flex;
    align-items: center;
    gap: 10px;
}

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

