/* RESET & VARS */
:root { --cav-primary: #0073e6; --cav-dark: #1a1a1a; --cav-light: #ffffff; --cav-gray: #f4f7f6; --cav-border: #e0e0e0; }
body { background: var(--cav-gray); font-family: 'Poppins', sans-serif; color: #333; }

/* LAYOUT */
.cav-movie-page-container { max-width: 1100px; margin: 30px auto; padding: 0 15px; }
.cav-movie-layout-grid { display: flex; gap: 25px; flex-wrap: wrap; }
.cav-movie-sidebar { flex: 0 0 300px; }
.cav-movie-main-content { flex: 1; min-width: 0; }

/* HEADER */
.cav-header-section { background: #fff; padding: 20px; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.05); margin-bottom: 25px; }
.cav-movie-title { font-size: 1.8rem; margin: 0 0 10px; color: #111; }
.cav-movie-meta-line { display: flex; align-items: center; gap: 15px; font-size: 0.9rem; color: #666; }
.cav-year-badge { background: #333; color: #fff; padding: 2px 8px; border-radius: 4px; font-weight: 600; }

/* SIDEBAR WIDGETS */
.cav-poster-wrapper { position: relative; border-radius: 10px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); margin-bottom: 20px; }
.movie-poster-image { width: 100%; height: auto; display: block; }
.cav-trailer-btn { display: block; background: #e50914; color: #fff; text-align: center; padding: 10px; text-decoration: none; font-weight: 600; transition: 0.3s; }
.cav-trailer-btn:hover { background: #b20710; }

.cav-movie-widget { background: #fff; border-radius: 10px; box-shadow: 0 2px 10px rgba(0,0,0,0.03); margin-bottom: 20px; overflow: hidden; }
.cav-widget-title { font-size: 1.1rem; margin: 0; padding: 15px 20px; border-bottom: 1px solid var(--cav-border); background: #fafafa; display: flex; align-items: center; gap: 8px; }
.cav-widget-content { padding: 20px; }

/* INFO LIST */
.cav-rating-row { display: flex; gap: 10px; margin-bottom: 15px; padding: 0 20px; margin-top: 15px; }
.rating-box { display: flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 5px; font-size: 0.85rem; font-weight: bold; }
.rating-box.imdb { background: #f5c518; color: #000; }
.rating-box.tmdb { background: #01b4e4; color: #fff; }

.cav-meta-list { list-style: none; padding: 0; margin: 0; font-size: 0.9rem; }
.cav-meta-list li { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed var(--cav-border); }
.cav-meta-list li:last-child { border: none; }
.cav-meta-list strong { color: #555; }
.cav-meta-list span { color: #000; font-weight: 500; text-align: right; }

/* MAIN CONTENT ELEMENTS */
.cav-tagline { font-style: italic; color: #666; border-left: 3px solid var(--cav-primary); padding-left: 15px; margin-bottom: 15px; }
.cav-tags-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 15px; }
.cav-tags-cloud span { background: #f0f0f0; color: #555; padding: 4px 10px; border-radius: 20px; font-size: 0.8rem; }

/* CAST SCROLLER */
.cav-cast-scroller { display: flex; overflow-x: auto; gap: 15px; padding-bottom: 10px; }
.cav-cast-card { min-width: 100px; text-align: center; }
.cav-cast-img { width: 80px; height: 80px; border-radius: 50%; background-size: cover; background-position: center; margin: 0 auto 8px; border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.cav-cast-info strong { display: block; font-size: 0.85rem; line-height: 1.2; }
.cav-cast-info span { display: block; font-size: 0.75rem; color: #777; }

/* BACKDROPS */
.cav-backdrops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.backdrop-item img { width: 100%; height: 100px; object-fit: cover; border-radius: 6px; transition: 0.3s; }
.backdrop-item:hover img { opacity: 0.8; }

/* LINKS AREA */
.category { border: 1px solid var(--cav-border); border-radius: 8px; margin-bottom: 15px; overflow: hidden; }
.category h3 { background: #f8f9fa; margin: 0; padding: 12px 15px; font-size: 1rem; border-bottom: 1px solid var(--cav-border); }
.button-row { padding: 15px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.button-row button { background: var(--cav-primary); color: #fff; border: none; padding: 8px 16px; border-radius: 4px; font-weight: 500; cursor: pointer; transition: 0.2s; }
.button-row button:hover { background: #0056b3; transform: translateY(-2px); }

.cav-alert-box { background: #fff3cd; color: #856404; padding: 10px; border-radius: 6px; margin-bottom: 15px; font-size: 0.9rem; text-align: center; }
.cav-report-btn { background: none; border: none; color: #dc3545; cursor: pointer; font-size: 0.85rem; }

/* MODAL & SKELETON */
.cav-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: none; justify-content: center; align-items: center; z-index: 999; }
.cav-modal-content { background: #fff; padding: 20px; border-radius: 8px; width: 90%; max-width: 400px; position: relative; }
.cav-modal-close { position: absolute; top: 10px; right: 10px; background: none; border: none; font-size: 1.5rem; cursor: pointer; }
.cav-checkbox-group { display: flex; flex-direction: column; gap: 8px; margin: 15px 0; }
#cav-report-other { width: 100%; border: 1px solid #ddd; padding: 8px; margin-bottom: 10px; }
#cav-submit-report { width: 100%; background: #dc3545; color: #fff; border: none; padding: 10px; border-radius: 4px; cursor: pointer; }

.skeleton-container { padding: 20px; background: #f9f9f9; border-radius: 8px; text-align: center; }
.skeleton-line { height: 20px; width: 60%; background: #ddd; margin: 0 auto 15px; }
.skeleton-btn { height: 35px; width: 100px; background: #ddd; margin: 0 auto; display: inline-block; }

/* RESPONSIVE */
@media (max-width: 768px) {
    .cav-movie-sidebar { flex: 100%; }
    .cav-movie-layout-grid { flex-direction: column; }
    .cav-cast-scroller { flex-wrap: nowrap; }
}