* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Permanent Marker', cursive, sans-serif;
    background: #8b3a3a;
    background-image:
        linear-gradient(0deg, rgba(0,0,0,0.28) 2px, transparent 2px),
        linear-gradient(90deg, rgba(0,0,0,0.28) 2px, transparent 2px);
    background-size: 120px 30px, 120px 30px;
    color: #2c2c2c;
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Global Elements ===== */
button {
    transition: all 0.2s ease;
    font-family: 'Permanent Marker', cursive, sans-serif;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    transition: color 0.2s ease;
    color: #ffd700;
}

a:hover {
    color: #fff;
}

::selection {
    background: rgba(255, 215, 0, 0.35);
    color: #4a2e14;
}

::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #4a2e14;
}

::-webkit-scrollbar-thumb {
    background: #ffd700;
    border-radius: 6px;
    border: 2px solid #4a2e14;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
}

/* ===== Detail Page Shared Header ===== */
.detail-header {
    background:
        repeating-linear-gradient(90deg, #8b5a2b 0px, #6b4220 2px, #8b5a2b 4px, #8b5a2b 22px),
        linear-gradient(180deg, #8b5a2b, #6b4220);
    border-bottom: 5px solid #4a2e14;
    padding: 14px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(0,0,0,0.5);
}

.header-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.brand-logo {
    font-family: 'Permanent Marker', cursive;
    font-size: 22px;
    font-weight: 700;
    color: #ffd700;
    text-decoration: none;
    letter-spacing: 1px;
    text-shadow: 2px 2px 0 rgba(0,0,0,0.5);
}

.brand-logo:hover {
    color: #fff;
}

.back-btn {
    color: #f4e5c3;
    text-decoration: none;
    font-size: 13px;
    letter-spacing: 1px;
    padding: 7px 18px;
    border: 2px solid #ffd700;
    transition: all 0.2s;
    font-family: 'Permanent Marker', cursive;
    border-radius: 4px;
    background: rgba(0,0,0,0.25);
}

.back-btn:hover {
    background: #ffd700;
    color: #4a2e14;
}

/* ===== Cave Ad ===== */
.cave-ad {
    border: 2px dashed rgba(255,235,100,0.4);
    background: rgba(0,0,0,0.25);
    padding: 12px;
    margin: 24px 0;
    text-align: center;
    border-radius: 4px;
}

.cave-ad-label {
    font-family: 'Courier Prime', monospace;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d8c8a0;
    margin-bottom: 8px;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
    .detail-header {
        padding: 10px 16px;
    }
    .header-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    .brand-logo {
        font-size: 18px;
    }
}