/* Shared shell, restrained motion, and consistently aligned recommendations. */
html, body { scroll-behavior: auto !important; }
*, *::before, *::after { transition-duration: 150ms !important; }
[data-reveal], .cs-reveal { opacity: 1 !important; transform: none !important; }
.cs-marquee-track, .cs-hero-spot, .cs-collage, .cs-cube, body::after { animation: none !important; }
body { padding-top: 80px !important; }
body .navbar.cs-shared-navbar { position: fixed !important; top: 0; left: 0; width: 100%; z-index: 1000; background: #101010 !important; border-bottom: 1px solid #292929; backdrop-filter: none !important; }
.cs-shared-navbar .nav-container { max-width: 1240px; margin: auto; padding: 14px 24px; display: flex; align-items: center; gap: 24px; min-height: 78px; }
.cs-shared-navbar .logo { flex-shrink: 0; }
.cs-shared-navbar .logo img { width: 132px; height: 40px; object-fit: contain; }
.cs-shared-navbar .nav-links { display: flex; align-items: center; justify-content: center; gap: 20px; flex: 1; padding: 0; margin: 0; list-style: none; }
.cs-shared-navbar .nav-links a { text-decoration: none; color: #b8b8b8; font-size: 14px; font-weight: 600; white-space: nowrap; }
.cs-shared-navbar .nav-links a.active, .cs-shared-navbar a:hover { color: #e8cd70; }
.cs-shared-navbar .nav-buttons { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.cs-shared-navbar .btn { min-height: 42px; padding: 10px 15px; font-size: 13px; border-radius: 10px; white-space: nowrap; text-decoration: none; display: inline-flex; align-items: center; }
.cs-shared-navbar .btn-outline { border: 1px solid #454545; color: #eee; background: #191919; }
.cs-shared-navbar .btn-primary { background: #d4b33f; color: #111; border: 1px solid #d4b33f; }
.cs-account { position: relative; }
.cs-account summary { cursor: pointer; color: #eee; list-style: none; padding: 10px 14px; border: 1px solid #444; border-radius: 10px; max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-account summary::after { content: ' ▾'; color: #d4b33f; }
.cs-account-links { position: absolute; right: 0; top: calc(100% + 10px); width: 180px; padding: 8px; background: #191919; border: 1px solid #444; border-radius: 12px; box-shadow: 0 12px 28px #0008; }
.cs-account-links a { display: block; padding: 10px; color: #eee; text-decoration: none; border-radius: 6px; }
.cs-account-links a:hover { background: #292929; }
.cs-shared-navbar .hamburger { display: none; }
.cs-shared-navbar .mobile-user-menu { display: none; }
.cs-recommendations { width: min(1200px, calc(100% - 40px)); margin: 36px auto 0; scroll-margin-top: 100px; }
#ai-movies-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 20px !important; align-items: stretch; }
.cs-recommendation-card { min-width: 0; box-shadow: none !important; }
.cs-recommendation-card .card-img-container { height: auto !important; aspect-ratio: 2 / 3; }
.cs-recommendation-card .movie-poster { display: block; width: 100%; height: 100%; object-fit: cover; }
.cs-recommendation-card h4 { line-height: 1.4; min-height: 2.8em; overflow-wrap: anywhere; white-space: normal !important; }
.cs-recommendation-card > div:last-child { flex: 1; display: flex; flex-direction: column; }
.cs-recommendation-card > div:last-child > div:last-child { margin-top: auto !important; padding-top: 14px; }
.cs-forum { max-width: 1100px; margin: 48px auto; padding: 0 24px; color: #eee; }
.cs-forum h1 { font-size: clamp(30px, 5vw, 48px); margin-bottom: 12px; }
.cs-forum p { color: #bbb; line-height: 1.65; }
.cs-forum-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 28px; margin-top: 32px; align-items: start; }
.cs-forum-form, .cs-post, .cs-forum-info { padding: 24px; border: 1px solid #343434; background: #181818; border-radius: 16px; margin-bottom: 18px; }
.cs-forum label { display: block; margin: 14px 0 8px; }
.cs-forum input[type=text], .cs-forum textarea { box-sizing: border-box; width: 100%; color: #eee; background: #101010; border: 1px solid #4a4a4a; padding: 12px; border-radius: 8px; font: inherit; }
.cs-forum button, .cs-forum .btn { border: 0; background: #d4b33f; color: #111; border-radius: 8px; padding: 12px 18px; cursor: pointer; font-weight: 700; }
.cs-forum button:disabled { opacity: .55; cursor: wait; }
.cs-post h3 { margin: 8px 0 12px; }
.cs-post .cs-post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.cs-post-meta { font-size: 13px; color: #b7b7b7; }
.cs-post details { margin-top: 12px; }
.cs-post summary { cursor: pointer; color: #e0c66e; }
.cs-forum-status { min-height: 24px; color: #e0c66e; margin-top: 16px; }
.cs-pending { border-color: #82712d; }
.cs-admin-actions { display: flex; gap: 12px; padding-top: 12px; }
@media (max-width: 1100px) {
    .cs-shared-navbar .nav-container { gap: 16px; }
    .cs-shared-navbar .nav-links { gap: 12px; }
    .cs-shared-navbar .nav-links a { font-size: 13px; }
    #ai-movies-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
}
@media (max-width: 900px) {
    .cs-shared-navbar .nav-container { flex-wrap: wrap; padding: 12px 18px; }
    .cs-shared-navbar .hamburger { display: flex; flex-direction: column; gap: 5px; padding: 8px; background: transparent; border: 0; cursor: pointer; }
    .cs-shared-navbar .hamburger span { display: block; width: 24px; height: 2px; background: #eee; }
    .cs-shared-navbar .nav-links { display: none; position: static !important; width: 100%; flex: auto; order: 4; transform: none !important; height: auto !important; background: transparent !important; padding: 12px 0 !important; }
    .cs-shared-navbar .nav-links.active { display: flex; flex-wrap: wrap; justify-content: flex-start; }
    .cs-shared-navbar .nav-buttons { display: flex !important; }
    .cs-forum-layout { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    #ai-movies-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
    .cs-recommendations { width: calc(100% - 24px); }
    .cs-shared-navbar .logo img { width: 104px; }
    .cs-shared-navbar .btn { padding: 9px 10px; font-size: 12px; }
    .cs-account summary { max-width: 120px; padding: 8px; }
    .cs-forum { padding: 0 16px; margin-top: 30px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* Keep the shared mobile header on one row despite legacy logo minimum widths. */
@media (max-width: 900px) {
    body .navbar.cs-shared-navbar .nav-container { flex-wrap: nowrap; gap: 10px; }
    body .navbar.cs-shared-navbar .nav-links.active { position: fixed !important; top: 80px; left: 0; right: 0; width: 100%; max-height: calc(100dvh - 80px); overflow-y: auto; flex-direction: column; flex-wrap: nowrap; align-items: stretch; gap: 0; padding: 16px 24px !important; box-sizing: border-box; background: #101010 !important; }
    body .navbar.cs-shared-navbar .hamburger { margin-left: 0; }
    body .navbar.cs-shared-navbar .hamburger span { margin: 0; }
}
@media (max-width: 600px) {
    body .navbar.cs-shared-navbar .nav-container { padding: 0 12px; gap: 8px; }
    body .navbar.cs-shared-navbar .logo img { width: 100px !important; min-width: 0 !important; height: 32px !important; object-fit: cover; }
    body .navbar.cs-shared-navbar .nav-buttons { gap: 6px; }
    body .navbar.cs-shared-navbar .nav-buttons .btn { padding: 9px 10px; font-size: 11px; min-height: 34px; }
    body .navbar.cs-shared-navbar .cs-account summary { max-width: 85px; padding: 8px; font-size: 12px; }
    body .navbar.cs-shared-navbar .hamburger { width: 36px; height: 40px; padding: 6px; }
    body .navbar.cs-shared-navbar .hamburger span { width: 24px; }
}
