/* ============================================================
   GALLERY.CSS — Boredom Eraser
   Art frames, discover button, content cards, retro buttons,
   discovery log sidebar
   ============================================================ */

/* ------------------------------------------------------------
   1. ART FRAMES / IMAGE STYLING
------------------------------------------------------------ */
.art-frame {
    border: 6px solid var(--text-color, #00FF00);
    border-radius: 4px;
    padding: 8px;
    background: var(--bg-color, #000);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
    max-width: 100%;
}

.art-frame img,
.art-frame iframe {
    display: block;
    width: 100%;
    height: auto;
}

/* Polaroid style frame */
.polaroid-frame {
    background: #fff;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    border-radius: 2px;
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
    color: #222;
}
.polaroid-frame:hover {
    transform: rotate(0deg) scale(1.03);
}
.polaroid-frame .polaroid-caption {
    text-align: center;
    margin-top: 10px;
    font-family: 'Courier Prime', monospace;
    font-size: 0.9rem;
    color: #333;
}

/* Gallery wall scatter effect */
.scatter-frame:nth-child(odd) { transform: rotate(-3deg); }
.scatter-frame:nth-child(even) { transform: rotate(2deg); }
.scatter-frame:hover { transform: rotate(0deg) scale(1.05); z-index: 5; }

/* Museum plaque style caption */
.museum-plaque {
    background: var(--card-bg, #111);
    border: 1px solid var(--border-color, #00FF00);
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 0.85rem;
    text-align: center;
    margin-top: 6px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Ornate gold-ish frame (using gradients, no images) */
.ornate-frame {
    border: 10px solid transparent;
    border-image: linear-gradient(45deg, #b8860b, #ffd700, #b8860b) 1;
    padding: 6px;
    background: var(--bg-color, #000);
}

/* Neon-glow frame */
.neon-frame {
    border: 3px solid var(--accent, #ff0000);
    border-radius: 8px;
    box-shadow:
        0 0 6px var(--accent, #ff0000),
        0 0 14px var(--accent, #ff0000),
        inset 0 0 6px var(--accent, #ff0000);
    padding: 8px;
}

/* ------------------------------------------------------------
   2. CONTENT CARDS
------------------------------------------------------------ */
.content-card {
    background: var(--card-bg, #111);
    border: 1px solid var(--border-color, #00FF00);
    border-radius: 10px;
    padding: 16px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.content-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}
.content-card h3 {
    margin-bottom: 8px;
    font-size: 1.1rem;
}
.content-card p {
    font-size: 0.9rem;
    color: var(--muted, #888);
}

/* Card with thumbnail */
.content-card.with-thumb {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.content-card.with-thumb img,
.content-card.with-thumb iframe {
    width: 100%;
    border-radius: 6px;
    border: none;
}

/* Card tag/badge */
.card-tag {
    display: inline-block;
    background: var(--accent, #ff0000);
    color: #fff;
    font-size: 0.7rem;
    font-weight: bold;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.card-tag.tag-useful { background: #2e7d32; }
.card-tag.tag-useless { background: #666; }
.card-tag.tag-art { background: #aa00ff; }
.card-tag.tag-video { background: #ff0000; }
.card-tag.tag-game { background: #ff8c00; }

/* Card grid layout */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

/* ------------------------------------------------------------
   3. DISCOVER BUTTON (bottom of screen)
------------------------------------------------------------ */
#discover-button {
    position: fixed;
    bottom: 16px;
    left: 16px;
    z-index: 1001;
    background: var(--bg-color, #000);
    color: var(--accent, #ff0000);
    border: 3px solid var(--accent, #ff0000);
    border-radius: 8px;
    padding: 12px 18px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    font-size: 0.95rem;
    cursor: pointer;
    box-shadow: 0 0 12px rgba(255,0,0,0.4);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
#discover-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 4px 16px rgba(255,0,0,0.6);
}
#discover-button:active {
    transform: translateY(1px) scale(0.98);
}

/* Discover button pulse to draw attention */
#discover-button.pulse {
    animation: discoverPulse 1.6s ease-in-out infinite;
}
@keyframes discoverPulse {
    0%, 100% { box-shadow: 0 0 12px rgba(255,0,0,0.4); }
    50% { box-shadow: 0 0 24px rgba(255,0,0,0.8); }
}

/* Confirmation toast for "discovery saved" */
#discover-toast {
    position: fixed;
    bottom: 70px;
    left: 16px;
    background: var(--card-bg, #111);
    border: 1px solid var(--accent, #ff0000);
    color: var(--text-color, #00FF00);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 1002;
}
#discover-toast.show {
    opacity: 1;
    transform: translateY(0);
}

/* ------------------------------------------------------------
   4. RETRO ARCADE BUTTONS
------------------------------------------------------------ */
.retro-button {
    background: linear-gradient(180deg, #ffcc00, #cc9900);
    border: 4px solid #806600;
    border-radius: 10px;
    color: #2a1a00;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    padding: 10px 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    box-shadow: 0 6px 0 #806600, 0 10px 12px rgba(0,0,0,0.4);
    transition: all 0.1s ease;
}
.retro-button:active {
    transform: translateY(5px);
    box-shadow: 0 1px 0 #806600, 0 3px 6px rgba(0,0,0,0.4);
}

/* Retro neon arcade button */
.retro-button.neon {
    background: #111;
    color: #0ff;
    border-color: #0ff;
    box-shadow:
        0 0 8px #0ff,
        0 6px 0 #033,
        0 10px 12px rgba(0,0,0,0.4);
}
.retro-button.neon:active {
    box-shadow: 0 0 8px #0ff, 0 1px 0 #033;
}

/* Pixel-style button (sharp corners, stepped shadow) */
.pixel-button {
    background: var(--accent, #ff0000);
    color: #fff;
    border: none;
    padding: 10px 18px;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    cursor: pointer;
    box-shadow:
        4px 0 0 0 var(--accent-dark, #8b0000),
        0 4px 0 0 var(--accent-dark, #8b0000),
        4px 4px 0 0 var(--accent-dark, #8b0000);
    image-rendering: pixelated;
}
.pixel-button:active {
    transform: translate(2px, 2px);
    box-shadow:
        2px 0 0 0 var(--accent-dark, #8b0000),
        0 2px 0 0 var(--accent-dark, #8b0000),
        2px 2px 0 0 var(--accent-dark, #8b0000);
}

/* Joystick-style round button */
.joystick-button {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, #ff5555, #aa0000);
    border: 4px solid #550000;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 8px 0 #330000, 0 12px 16px rgba(0,0,0,0.5);
    transition: transform 0.1s ease;
}
.joystick-button:active {
    transform: translateY(6px);
    box-shadow: 0 2px 0 #330000, 0 4px 8px rgba(0,0,0,0.5);
}

/* ------------------------------------------------------------
   5. DISCOVERY LOG SIDEBAR
------------------------------------------------------------ */
#discovery-log {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100vh;
    background: var(--card-bg, #111);
    border-left: 2px solid var(--border-color, #00FF00);
    padding: 60px 16px 16px;
    overflow-y: auto;
    transition: right 0.35s ease;
    z-index: 1100;
}
#discovery-log.open {
    right: 0;
}
#discovery-log h2 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    border-bottom: 1px solid var(--border-color, #00FF00);
    padding-bottom: 8px;
}
#discovery-log .log-entry {
    font-size: 0.85rem;
    padding: 8px 0;
    border-bottom: 1px dashed var(--muted, #444);
    word-break: break-word;
}
#discovery-log .log-entry:last-child {
    border-bottom: none;
}
#discovery-log .log-entry .log-time {
    display: block;
    font-size: 0.7rem;
    color: var(--muted, #888);
    margin-top: 2px;
}

/* Toggle handle for the sidebar */
#discovery-log-toggle {
    position: fixed;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    background: var(--accent, #ff0000);
    color: #fff;
    border: none;
    padding: 14px 8px;
    border-radius: 6px 0 0 6px;
    cursor: pointer;
    font-family: 'Courier Prime', monospace;
    font-weight: bold;
    z-index: 1101;
    writing-mode: vertical-rl;
    text-orientation: mixed;
}

/* Empty log placeholder */
#discovery-log .log-empty {
    font-size: 0.85rem;
    color: var(--muted, #888);
    text-align: center;
    margin-top: 30px;
    font-style: italic;
}

/* ------------------------------------------------------------
   6. PROGRESS / EXPLORATION METER
------------------------------------------------------------ */
#exploration-meter {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255,255,255,0.08);
    z-index: 1200;
}
#exploration-meter .meter-fill {
    height: 100%;
    width: 0%;
    background: var(--accent, #ff0000);
    transition: width 0.4s ease;
}

/* ------------------------------------------------------------
   7. TOOLTIP / HINT BUBBLES
------------------------------------------------------------ */
.hint-bubble {
    position: relative;
    display: inline-block;
}
.hint-bubble .hint-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card-bg, #111);
    border: 1px solid var(--border-color, #00FF00);
    color: var(--text-color, #00FF00);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    transition: opacity 0.25s ease;
    z-index: 1300;
}
.hint-bubble:hover .hint-text {
    visibility: visible;
    opacity: 1;
}

/* ------------------------------------------------------------
   8. MISC GALLERY UTILITIES
------------------------------------------------------------ */
.grayscale-on-hover {
    filter: grayscale(1);
    transition: filter 0.4s ease;
}
.grayscale-on-hover:hover {
    filter: grayscale(0);
}

.zoom-on-hover {
    overflow: hidden;
}
.zoom-on-hover img,
.zoom-on-hover iframe {
    transition: transform 0.4s ease;
}
.zoom-on-hover:hover img,
.zoom-on-hover:hover iframe {
    transform: scale(1.08);
}

.caption-overlay {
    position: relative;
}
.caption-overlay .overlay-text {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 6px 10px;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.caption-overlay:hover .overlay-text {
    opacity: 1;
}
