* { box-sizing: border-box; }
body { font-family: system-ui, -apple-system, Helvetica, Arial; margin: 0; background: #111; color: #eee; min-height: 100vh; display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
header { padding: 16px; background: #1a1a1a; }
header h1 { margin: 0 0 16px 0; font-size: 24px; text-align: center; }

.nav-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-bottom: 12px; }
.nav-row.hidden { display: none; }
.nav-btn { padding: 10px 18px; background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%); color: #eee; border: 1px solid #444; border-radius: 24px; cursor: pointer; font-size: 13px; font-weight: 500; transition: 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.nav-btn.active { background: linear-gradient(135deg, #0084ff 0%, #005bb5 100%); border-color: #004499; box-shadow: 0 4px 12px rgba(0, 132, 255, 0.4); transform: scale(1.05); }
.nav-btn:hover:not(.active) { background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%); border-color: #555; box-shadow: 0 3px 10px rgba(0,0,0,0.4); }
.nav-btn:active { transform: scale(0.98); }

main { flex: 1; display: flex; flex-direction: column; padding: 0 16px 50vh 16px; }
.controls { display: flex; gap: 12px; justify-content: center; margin-bottom: 16px; margin-top: 16px; flex-wrap: wrap; }
button { padding: 8px 14px; background: linear-gradient(135deg, #2a2a2a 0%, #1a1a1a 100%); color: #eee; border: 1px solid #444; border-radius: 8px; cursor: pointer; font-weight: 500; font-size: 13px; transition: 0.3s ease; box-shadow: 0 2px 8px rgba(0,0,0,0.3); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
button:hover { background: linear-gradient(135deg, #3a3a3a 0%, #2a2a2a 100%); border-color: #555; box-shadow: 0 4px 12px rgba(0,0,0,0.4); transform: translateY(-2px); }
button:active { transform: translateY(0); }

.slideshow { align-self: center; display: inline-block; position: relative; max-width: 100%; border-radius: 6px; background: #000; box-shadow: 0 6px 24px rgba(0,0,0,0.6); overflow: hidden; }
#slide { max-width: 100%; max-height: 100vh; display: block; object-fit: contain; }
#caption { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,0.7); padding: 6px 16px; border-radius: 20px; font-size: 14px; color: #ccc; pointer-events: none; white-space: nowrap; }

/* Fullscreen tweaks */
:fullscreen { background: #000; overflow: hidden; display: flex; align-items: center; justify-content: center; }
:fullscreen main { padding: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
:fullscreen .slideshow { border-radius: 0; box-shadow: none; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; background: #000; }
:fullscreen #slide { max-height: 100%; object-fit: contain; }
