@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&display=swap');

.biscottini {
    margin: 0;
    margin-top: 110px;
    font-family: 'Comic Neue', 'Comic Sans MS', cursive, sans-serif;
    background-color: #f0f4f8;
    color: #333;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    text-transform: uppercase;
    text-shadow: -2px -2px 0px #fff, -2px -2px 0px #000;
    margin-bottom: 30px;
}

.comic-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 96vw;
    width: 100%;
}

.panel {
    background-color: #fff;
    border: 4px solid #000;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    min-height: 250px;
    box-shadow: 8px 8px 0px #000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
}

/* Panel Backgrounds */
.panel:nth-child(1) { background-color: #e3f2fd; }
.panel:nth-child(2) { background-color: #ffebee; }
.panel:nth-child(3) { background-color: #fff3e0; }
.panel:nth-child(4) { background-color: #e8f5e9; }

/* Speech Bubbles */
.bubble {
    background: #fff;
    border: 3px solid #000;
    border-radius: 20px;
    padding: 15px;
    position: relative;
    font-weight: 700;
    font-size: 1.1rem;
    box-shadow: 3px 3px 0px rgba(0,0,0,0.2);
    margin-top: 15px;
    margin-bottom: 15px;
}

.bubble.left::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 30px;
    border-width: 15px 15px 0 0;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
}

.bubble.right {
    align-self: flex-end;
    background: #fff9c4;
}

.bubble.right::after {
    content: '';
    position: absolute;
    bottom: -15px;
    right: 30px;
    border-width: 15px 0 0 15px;
    border-style: solid;
    border-color: #000 transparent transparent transparent;
}

.action-text {
    background: #ffeb3b;
    border: 2px dashed #000;
    padding: 5px 10px;
    font-weight: bold;
    transform: rotate(-5deg);
    align-self: center;
    margin: 10px 0;
    box-shadow: 2px 2px 0px #000;
}

/* Characters */
.character-area {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    margin-top: auto;
}

.user, .server {
    font-size: 4rem;
    line-height: 1;
}

.server {
    transform: scaleX(-1); /* Flip the server horizontally */
}

/* The Cookie */
.technical-cookie {
    position: absolute;
    top: 10px;
    right: -10px;
    background-color: #d7ccc8;
    border: 2px solid #5d4037;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.8rem;
    font-weight: bold;
    color: #3e2723;
    box-shadow: inset -3px -3px 0px rgba(0,0,0,0.1);
}

.technical-cookie::before, .technical-cookie::after {
    content: '.';
    position: absolute;
    font-size: 30px;
    color: #4e342e;
}
.technical-cookie::before { top: -18px; left: 8px; }
.technical-cookie::after { top: -8px; left: 20px; }

/* Narration */
.narration {
    background: #000;
    color: #fff;
    padding: 5px 10px;
    position: absolute;
    top: 0;
    left: 0;
    font-size: 0.9rem;
    font-family: monospace;
}

.explanation {
    max-width: 800px;
    background: #fff;
    border: 3px solid #333;
    padding: 20px;
    margin-top: 40px;
    border-radius: 8px;
    box-shadow: 5px 5px 0px #ccc;
}