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

body {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    min-height: 100vh;
    background-color: white;
    background-image: 
        radial-gradient(circle, #cccccc 1px, transparent 1px),
        radial-gradient(circle, #cccccc 1px, transparent 1px);
    background-size: 20px 20px;
    background-position: 0 0, 10px 10px;
    font-family: 'Bangers', 'Trebuchet MS', Arial, sans-serif;
    overflow: hidden;
}

.comic-container {
    width: 95%;
    max-width: 1200px;
    padding: 10px;
    margin-top: 10px;
    margin-left: 10px;
}

.comic-strip {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    width: 100%;
}

.panel {
    flex: 1;
    height: 0;
    padding-bottom: 15%;
    background-color: white;
    border: 3px solid black;
    box-shadow: 5px 5px 0px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.panel-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    cursor: pointer;
}

.panel iframe {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
    transform: translate(-50%, -50%) scale(1);
    transform-origin: center center;
}

/* Comic-style ink splatter for panel borders */
.panel::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    border: 3px solid black;
    transform: rotate(-0.5deg);
}

@media (max-width: 768px) {
    .comic-strip {
        flex-wrap: wrap;
    }
    
    .panel {
        padding-bottom: 25%;
    }
    
    .panel.expanded {
        flex: 1 0 100%;
        padding-bottom: 25%;
        z-index: 10;
        margin-left: 0;
        position: absolute;
        left: 0;
        width: 100%;
    }
    
    .panel.hidden {
        flex: 0;
        width: 0;
        padding: 0;
        margin: 0;
        opacity: 0;
        pointer-events: none;
    }
}

@media (min-width: 769px) {
    .comic-container {
        width: 99%;
        max-width: 1600px;
    }
    
    .panel {
        padding-bottom: 7%; 
    }
}
