/* Reset & Font Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* Retro off-white dengan dot matrix pattern */
    background-color: #f4f0ea;
    background-image: radial-gradient(#d1cdcd 1px, transparent 0);
    background-size: 20px 20px;
    color: #111;
    font-family: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    line-height: 1.6;
    padding: 40px 20px;
}

/* Header bergaya retro brutalist */
header {
    max-width: 1000px;
    margin: 0 auto 40px auto;
    text-align: center;
    background: #ffc900;
    border: 4px solid #111;
    border-radius: 16px;
    box-shadow: 8px 8px 0 #111;
    padding: 30px 20px;
}

header h1 {
    font-size: 2.2rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
}

header p {
    font-size: 1rem;
    font-weight: 600;
}

/* Tag Nav (Pills) */
.tags-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

.tag-pill {
    background: #fff;
    border: 3px solid #111;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    box-shadow: 4px 4px 0 #111;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
    cursor: default;
}

.tag-pill:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
    background: #111;
    color: #fff;
}

/* Container Grid Bento */
.container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    /* Grid dinamis: otomatis menyesuaikan kolom dengan minimal lebar 400px */
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 32px;
}

/* Bento Box (Media Section) */
.media-section {
    background: #fff;
    border: 4px solid #111;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 8px 8px 0 #111;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.media-section:hover {
    transform: translate(-4px, -4px);
    box-shadow: 12px 12px 0 #111;
}

/* Warna pastel retro unik untuk masing-masing Bento Box */
.media-section:nth-child(1) { background-color: #ffd1dc; } /* Pink */
.media-section:nth-child(2) { background-color: #bdfcc9; } /* Hijau */
.media-section:nth-child(3) { background-color: #c2e2ff; } /* Biru */
.media-section:nth-child(4) { background-color: #fff0b3; } /* Kuning */
.media-section:nth-child(5) { background-color: #e6c2ff; } /* Ungu */
.media-section:nth-child(6) { background-color: #ffdbb3; } /* Oranye */

/* Header Card */
.media-section h2 {
    font-size: 1.3rem;
    font-weight: 800;
    border-bottom: 3px solid #111;
    padding-bottom: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.badge {
    background: #111;
    color: #fff;
    padding: 6px 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

/* Inner Box untuk Media */
.media-content {
    background: #fff;
    border: 3px solid #111;
    border-radius: 12px;
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Elemen Media */
img, video, iframe, canvas, svg {
    border: 3px solid #111;
    border-radius: 8px;
    max-width: 100%;
}

/* Audio Customization */
audio {
    width: 100%;
    outline: none;
    margin-top: 10px;
    border-radius: 30px;
    border: 3px solid #111;
    background: #f4f0ea;
}

/* Iframe Khusus */
.iframe-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
}

iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Teks Keterangan Bawah */
.link-desc {
    margin-top: 16px;
    font-size: 0.85rem;
    font-weight: 700;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    background: #ffc900;
    padding: 4px 10px;
    border: 2px solid #111;
    border-radius: 6px;
}

/* Kontrol Media (Play/Stop/Ganti Source) */
.media-controls {
    display: flex;
    gap: 12px;
    margin-top: 16px;
    width: 100%;
    justify-content: center;
}

.retro-btn {
    background: #fff;
    border: 3px solid #111;
    padding: 8px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 800;
    font-family: 'Courier New', Courier, monospace;
    text-transform: uppercase;
    box-shadow: 4px 4px 0 #111;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.retro-btn:hover {
    transform: translate(2px, 2px);
    box-shadow: 2px 2px 0 #111;
}

#btnPlay {
    background: #bdfcc9;
}

#btnStop {
    background: #ffd1dc;
}

#btnVid1 {
    background: #c2e2ff;
}

#btnVid2 {
    background: #e6c2ff;
}
