body { font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; margin: 0; background: #0b1220; color: #e5e7eb; }
.container { max-width: 420px; margin: 56px auto; padding: 28px; background: #111827; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
h1 { margin: 0 0 18px; font-size: 24px; color: #f9fafb; }
p.sub { margin: 0 0 26px; color: #9ca3af; }
label { display: block; margin: 12px 0 6px; font-weight: 600; font-size: 14px; }
input { width: 100%; padding: 12px; border-radius: 8px; border: 1px solid #374151; background: #0b1220; color: #e5e7eb; margin-bottom: 12px; }
button { width: 100%; padding: 13px; margin-top: 18px; border: 0; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #7c3aed); color: white; font-weight: 600; cursor: pointer; }
button:hover { filter: brightness(1.05); }
button.btn-loading { position: relative; pointer-events: none; opacity: .85; }
button.btn-loading .spinner { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin 1s linear infinite; }
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 12px; }
.alert-error { background: #7f1d1d; color: #fecaca; border: 1px solid #b91c1c; }
.alert-success { background: #064e3b; color: #bbf7d0; border: 1px solid #047857; }
.helper { font-size: 13px; color: #9ca3af; margin-top: 8px; }
.footer { text-align: center; margin-top: 18px; color: #9ca3af; }
.footer a { color: #93c5fd; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.success-wrap { display: flex; align-items: center; gap: 10px; }
.success-wrap .spinner-lg { width: 18px; height: 18px; border: 3px solid rgba(255,255,255,.35); border-top-color: #a7f3d0; border-radius: 50%; animation: spin .9s linear infinite; }
.shake { animation: shake .35s ease; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 10%, 90% { transform: translateX(-1px); } 20%, 80% { transform: translateX(2px); } 30%, 50%, 70% { transform: translateX(-4px); } 40%, 60% { transform: translateX(4px); } }

/* ---- Home (index.php) styles ---- */
header { position: sticky; top: 0; z-index: 20; background: #f5c518; color: #000; padding: 14px 24px; display: flex; align-items: center; justify-content: space-between; box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.logo { font-size: 2rem; font-weight: bold; letter-spacing: 2px; }
nav a { color: #000; text-decoration: none; margin-left: 20px; font-weight: 600; opacity: .9; transition: opacity .2s ease, transform .2s ease; }
nav a:hover { opacity: 1; transform: translateY(-1px); }
.logout-form { display: inline-block; margin-left: 16px; }
.logout-btn { background: #111827; color: #e5e7eb; border: 1px solid #1f2937; padding: 8px 12px; border-radius: 8px; font-weight: 700; cursor: pointer; }
.logout-btn:hover { filter: brightness(1.1); }

.search-bar { margin: 28px auto; max-width: 680px; display: flex; padding: 0 16px; }
.search-bar input { flex: 1; padding: 12px 14px; border: none; border-radius: 10px 0 0 10px; font-size: 1rem; background: #111827; color: #e5e7eb; outline: 1px solid #2a3344; transition: box-shadow .2s ease, outline-color .2s ease; }
.search-bar input:focus { box-shadow: 0 0 0 3px rgba(37,99,235,.35); outline-color: #2563eb; }
.search-bar button { width: auto; padding: 12px 18px; margin-top: 0; border-radius: 0 10px 10px 0; background: #f5c518; color: #000; font-weight: 800; }

.filters { display: flex; gap: 10px; justify-content: center; margin: 8px 0 24px; }
.filter-btn { background: #111827; color: #e5e7eb; border: 1px solid #1f2937; padding: 8px 12px; border-radius: 999px; cursor: pointer; font-weight: 600; }
.filter-btn:hover { filter: brightness(1.1); }
.filter-btn.active { background: #2563eb; border-color: #2563eb; }

.movie-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 28px; max-width: 1200px; margin: 0 auto 56px auto; padding: 0 16px; }
.movie-card { background: #111827; border: 1px solid #1f2937; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.25); transform: translateY(4px); opacity: 0; animation: cardIn .35s ease forwards; transition: transform .2s ease, box-shadow .2s ease; appearance: none; text-align: left; cursor: pointer; }
.movie-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: 0 12px 28px rgba(0,0,0,0.35); }
.movie-card img { width: 100%; height: 320px; object-fit: cover; display: block; }
.movie-info { padding: 14px; }
.movie-title { font-size: 1.05rem; font-weight: 700; margin-bottom: 6px; color: #f9fafb; }
.movie-year { color: #f5c518; font-size: 0.95rem; }
footer { background: #0f172a; color: #9ca3af; text-align: center; padding: 18px 0; font-size: 0.95rem; border-top: 1px solid #1f2937; }

@keyframes cardIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Modal */
.modal.hidden { display: none; }
.modal { position: fixed; inset: 0; z-index: 50; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(2px); }
.modal-content { position: relative; max-width: 900px; margin: 60px auto; background: #0b1220; border: 1px solid #1f2937; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.5); animation: modalIn .2s ease; }
.modal-close { position: absolute; top: 8px; right: 10px; background: transparent; border: 0; color: #9ca3af; font-size: 28px; cursor: pointer; line-height: 1; z-index: 3; }
.modal-close:hover { color: #e5e7eb; }
.modal-body { display: grid; grid-template-columns: 300px 1fr; gap: 18px; padding: 18px; }
.modal-poster img { width: 100%; height: auto; border-radius: 8px; display: block; }
.modal-info h2 { margin: 0 0 8px; font-size: 22px; color: #f9fafb; }
.modal-meta { color: #9ca3af; margin-bottom: 8px; }
.modal-ratings { color: #fde68a; font-weight: 700; margin-bottom: 10px; }
.modal-plot { line-height: 1.6; color: #e5e7eb; }

/* Reviews */
.reviews { margin-top: 14px; }
.reviews h3 { margin: 12px 0 6px; font-size: 16px; color: #f9fafb; }
.review-item { border-top: 1px solid #1f2937; padding: 8px 0; }
.review-meta { color: #9ca3af; font-size: 13px; margin-bottom: 4px; }
.review-text { color: #e5e7eb; white-space: pre-wrap; }
.review-form { display: grid; grid-template-columns: 80px 1fr auto; gap: 8px; align-items: start; margin-top: 10px; }
.review-form select, .review-form textarea { background: #0b1220; color: #e5e7eb; border: 1px solid #1f2937; border-radius: 8px; padding: 8px; }
.review-form textarea { min-height: 70px; }

@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

/* Game */
.game-wrap { max-width: 720px; margin: 40px auto 56px; padding: 22px; background: #111827; border-radius: 12px; border: 1px solid #1f2937; box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.game-title { margin: 0 0 12px; font-size: 22px; color: #f9fafb; text-align: center; }
.meta { color: #9ca3af; margin-bottom: 8px; text-align: center; }
.poster { display: block; width: 220px; height: 320px; object-fit: cover; border-radius: 10px; margin: 14px auto; box-shadow: 0 6px 18px rgba(0,0,0,.35); }
.plot { color: #e5e7eb; line-height: 1.6; margin: 10px 0 14px; }
.game-form { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
.game-form label { margin: 0; }
.game-hint { color: #9ca3af; font-size: 13px; text-align: center; margin-top: 6px; }
.result { margin-top: 12px; font-weight: 700; text-align: center; }
.btn-row { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.small { font-size: 14px; padding: 10px 12px; }
.score-bar { display: flex; justify-content: space-between; color: #9ca3af; margin-bottom: 8px; }
.leaderboard { margin-top: 22px; }
.leaderboard h2 { font-size: 18px; margin: 0 0 8px; color: #f9fafb; }
.leaderboard table { width: 100%; border-collapse: collapse; }
.leaderboard th, .leaderboard td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #1f2937; }
.leaderboard th { color: #9ca3af; font-weight: 600; }