:root {
    --yellow: #ffd600;
    --red: #ff3d00;
    --blue: #2979ff;
    --bg-dot: #ffffff;
    --font-heading: 'Bangers', cursive;
    --font-marker: 'Permanent Marker', cursive;
    --font-text: 'Kalam', cursive;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    background-color: var(--yellow);
    background-image: radial-gradient(var(--bg-dot) 15%, transparent 16%);
    background-size: 16px 16px;
    padding: 3rem 1.5rem;
    font-family: var(--font-text);
}

.comic-container { max-width: 1100px; margin: 0 auto; }

/* Comic style borders */
.card-border {
    border: 5px solid #000;
    box-shadow: 10px 10px 0px #000;
    background: white;
}

.comic-header { text-align: center; padding: 2rem; margin-bottom: 3rem; transform: rotate(-1deg); }
.comic-title { font-family: var(--font-heading); font-size: 5rem; color: var(--red); -webkit-text-stroke: 2px #000; letter-spacing: 2px; }
.sub-bubble { display: inline-block; background: var(--blue); color: white; padding: 0.5rem 1.5rem; font-family: var(--font-marker); font-size: 1.3rem; transform: rotate(2deg); margin-top: 1rem; border: 3px solid #000; }

/* Grid */
.comic-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }

.comic-panel { position: relative; min-height: 400px; overflow: hidden; padding: 1.5rem; display: flex; flex-direction: column; justify-content: flex-end; }
.comic-panel.yellow-bg { background-color: var(--yellow); }
.comic-panel.cyan-bg { background-color: #00e5ff; }
.comic-panel.red-bg { background-color: var(--red); color: white; justify-content: center; text-align: center; }

.panel-img { position: absolute; inset: 0; z-index: 1; }
.panel-img img { width: 100%; height: 100%; object-fit: cover; filter: contrast(1.3) saturate(1.4); }

/* Speech Bubbles */
.speech-bubble {
    position: relative; z-index: 5; background: white; border: 3px solid #000;
    border-radius: 30px; padding: 1rem; max-width: 80%; align-self: flex-start;
    font-family: var(--font-marker); font-size: 1.2rem; color: #000;
}
.speech-bubble.right { align-self: flex-end; }
.speech-bubble::before {
    content: ''; position: absolute; bottom: -15px; left: 30px;
    border-width: 15px 15px 0; border-style: solid; border-color: #000 transparent; display: block; width: 0;
}
.speech-bubble::after {
    content: ''; position: absolute; bottom: -10px; left: 33px;
    border-width: 11px 11px 0; border-style: solid; border-color: #fff transparent; display: block; width: 0;
}
.speech-bubble.right::before { left: auto; right: 30px; }
.speech-bubble.right::after { left: auto; right: 33px; }

/* Text Panel */
.text-panel { transform: rotate(1deg); }
.panel-meta { font-family: var(--font-marker); font-size: 1rem; color: var(--yellow); margin-bottom: 1rem; }
.text-panel h2 { font-family: var(--font-heading); font-size: 3.5rem; -webkit-text-stroke: 1.5px #000; margin-bottom: 1rem; letter-spacing: 1px; }
.text-panel p { font-size: 1.3rem; margin-bottom: 2rem; line-height: 1.4; color: white; }

.btn-bubble {
    display: inline-block; background: var(--yellow); color: #000;
    font-family: var(--font-marker); font-size: 1.3rem; text-decoration: none;
    padding: 0.8rem 2rem; border-radius: 50px; border: 3px solid #000;
    transition: transform 0.2s;
}
.btn-bubble:hover { transform: scale(1.1) rotate(-3deg); }

@media (max-width: 800px) {
    .comic-grid { grid-template-columns: 1fr; }
    .comic-title { font-size: 3.5rem; }
}