/* === Base Styles === */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #121212;
    color: #e0e0e0;
    margin: 0;
    padding: 0;
    text-align: center;
}

body::-webkit-scrollbar {
    display: none;
}

/* === Heading === */
h1 {
    color: #3fa9f5;
    font-size: 50px;
    font-weight: bold;
    text-align: left;
    margin: 40px 0 20px 40px;
}

/* === Layout Containers === */
.main-container {
    padding: 0 40px;
}

.grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 30px;
}

/* === Canvas Container + Buttons === */
.canvas-container {
    background-color: #1a1a1a;
    border-radius: 16px;

    padding: 20px;
}

/* === Canvas Styles === */
canvas {
    background-color: #000;
    display: block;
    margin: 30px auto;
    border: 4px solid #ffffff;
    max-width: 100%;
}

/* === Buttons and Input Section === */
.buttons {
    margin-top: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.input-value, button {
    padding: 6px 20px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    transition: all 0.2s ease;
    height: 50px;
}

.input-value {
    background-color: #2b2b2b;
    color: #ffffff;
    width: 250px;
}

/* === Button Styles === */
.push-btn {
    background-color: #3fa9f5;
    color: #fff;
}

.pop-btn {
    background-color: #f53f3f;
    color: #fff;
}

.clear-btn,
.top-btn {
    background-color: #ffffff;
    color: #121212;
}

button:hover {
    box-shadow: 0 0 6px #3fa9f5;
    transform: scale(1.02);
}

.pop-btn:hover {
    box-shadow: 0 0 6px #f53f3f;
}

/* === Log Area Below === */
#log {
    color: #e0e0e0;
    background-color: #1e1e1e;
    font-size: 18px;
    padding: 20px;
    border-radius: 10px;
    margin: 30px auto 0;
    width: 90%;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-line;

}

/* === Text Context Section (Stack Info) === */
.context {
    background-color: #1a1a1a;
    border-radius: 16px;
    box-shadow: 0 0 20px rgba(86, 86, 86, 0.1);
    padding: 30px;
    text-align: left;
}

.context h2 {
    color: #3fa9f5;
    font-size: 28px;
}

.context p {
    font-size: 18px;
    font-weight: 500;
    color: #e0e0e0;
}

.tag {
    color: #3fa9f5;
    text-decoration: none;
}

/* === Responsive Design === */
@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: 1fr;
    }

    h1 {
        font-size: 40px;
        text-align: center;
        margin-left: 0;
    }
}

@media (max-width: 768px) {
    canvas {
        width: 95%;
    }

    .buttons {
        flex-direction: column;
        align-items: center;
    }

    .input-value, button {
        width: 90%;
    }

    h1 {
        font-size: 32px;
    }

    .context {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 26px;
    }

    .input-value, button {
        font-size: 14px;
        padding: 10px;
    }

    .context h2 {
        font-size: 22px;
    }

    .context p {
        font-size: 16px;
    }
}
