:root {
    --bg: #0f172a;
    --card-bg: #1e293b;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --danger: #ef4444;
    --danger-hover: #dc2626;
    --upvote: #10b981;
    --downvote: #f43f5e;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; padding: 2rem; }
.container { max-width: 800px; margin: 0 auto; }

.top-url { text-align: center; font-size: 0.75rem; color: var(--text-muted); margin-bottom: 0.5rem; opacity: 0.6; font-family: monospace; }

header { display: flex; flex-direction: row; justify-content: space-between; align-items: center; margin-bottom: 1rem; background: var(--card-bg); padding: 0.75rem 1.5rem; border-radius: 1rem; box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); }
header h1 { font-size: 1.5rem; background: linear-gradient(to right, #60a5fa, #a78bfa); -webkit-background-clip: text; color: transparent; }
header h1 a { color: inherit; text-decoration: none; display: block; }
.header-right { display: flex; gap: 1.5rem; font-size: 1.1rem; font-weight: 600; }
.users-online { color: var(--primary); }
.timer-display { color: #fbbf24; font-variant-numeric: tabular-nums; }

.movies-section { margin-bottom: 2rem; }
.suggest-section { background: var(--card-bg); padding: 1.5rem; border-radius: 1rem; margin-bottom: 1.5rem; }
.suggest-section h2, .movies-section h2 { margin-bottom: 1rem; color: #e2e8f0; }

.controls { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; margin-top: 2.5rem; margin-bottom: 2rem; }

.divider { border: 0; border-top: 1px solid #334155; margin: 3rem 0; }

.trending-section, .boxsets-section { margin-bottom: 3rem; }
.trending-section h2, .boxsets-section h2 { font-size: 1.5rem; margin-bottom: 1.5rem; color: #f1f5f9; display: flex; align-items: center; gap: 0.75rem; }
.trending-section h2 i { color: #f59e0b; }
.boxsets-section h2 i { color: #8b5cf6; }

.trending-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; }
.trending-item { background: var(--card-bg); padding: 1rem; border-radius: 0.75rem; display: flex; align-items: center; gap: 1rem; font-weight: 500; transition: 0.2s; border: 1px solid transparent; }
.trending-item:hover { border-color: #334155; transform: scale(1.02); background: #2d3a4f; }
.trending-item span { background: #334155; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.85rem; color: #94a3b8; }

.boxsets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.boxset-item { background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%); padding: 1.5rem; border-radius: 1rem; text-align: center; font-weight: 600; border: 1px solid #334155; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.2); transition: 0.3s; }
.boxset-item:hover { border-color: #8b5cf6; transform: translateY(-4px); box-shadow: 0 10px 15px -3px rgba(0,0,0,0.4); }

.share-section { margin-top: 4rem; text-align: center; padding: 2rem; background: var(--card-bg); border-radius: 1rem; margin-bottom: 1.5rem; }
.share-section h3 { margin-bottom: 1.5rem; color: #e2e8f0; font-size: 1.2rem; }
.share-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.btn-share { padding: 0.75rem 1.25rem; border-radius: 0.75rem; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.5rem; font-weight: 600; color: white; transition: 0.2s; font-family: inherit; font-size: 0.9rem; }
.btn-share.whatsapp { background: #25d366; }
.btn-share.sms { background: #3b82f6; }
.btn-share.email { background: #ef4444; }
.btn-share.share { background: #6366f1; }
.btn-share:hover { opacity: 0.9; transform: translateY(-2px); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.3); }

.lang-section { text-align: center; margin-bottom: 2rem; }
.btn.secondary { background: #334155; border: 1px solid #475569; }
.btn.secondary:hover { background: #475569; }

.feedback-section { margin-top: 2rem; padding: 1.5rem; background: var(--card-bg); border-radius: 1rem; border: 1px solid #334155; margin-bottom: 3rem; }
.feedback-section h3 { margin-bottom: 1rem; color: #e2e8f0; font-size: 1.2rem; }
.feedback-section textarea { width: 100%; min-height: 100px; background: #0f172a; border: 1px solid #334155; border-radius: 0.5rem; padding: 0.75rem; color: var(--text); font-family: inherit; font-size: 0.95rem; margin-bottom: 1rem; resize: vertical; outline: none; }
.feedback-section textarea:focus { border-color: var(--primary); }
.feedback-section #btn-submit-feedback { width: 100%; justify-content: center; }

.btn { padding: 0.5rem 1rem; border: none; border-radius: 0.5rem; font-family: inherit; font-weight: 600; cursor: pointer; transition: all 0.2s; background: #334155; color: var(--text); display: flex; align-items: center; gap: 0.5rem; }

.btn:hover { background: #475569; }
.btn.primary { background: var(--primary); }
.btn.primary:hover { background: var(--primary-hover); }
.btn.danger { background: var(--danger); }
.btn.danger:hover { background: var(--danger-hover); }
.btn.active { box-shadow: 0 0 0 2px var(--text); background: #475569; }
.btn.danger.active { box-shadow: 0 0 0 2px var(--text); background: var(--danger-hover); }

.suggest-section { background: var(--card-bg); padding: 1.5rem; border-radius: 1rem; margin-bottom: 2rem; }
.suggest-section h2, .movies-section h2 { margin-bottom: 1rem; color: #e2e8f0; }
.input-group { display: flex; gap: 0.5rem; margin-bottom: 0.5rem; }
.input-group input { flex: 1; padding: 0.75rem 1rem; border-radius: 0.5rem; border: 1px solid #334155; background: #0f172a; color: var(--text); font-family: inherit; font-size: 1rem; outline: none; transition: border-color 0.2s; }
.input-group input:focus { border-color: var(--primary); }
.input-group input:disabled { opacity: 0.5; cursor: not-allowed; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.suggestions-info { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 1rem; }

.recent-container { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #334155; }
.recent-label { font-size: 0.85rem; color: var(--text-muted); }
.recent-suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.recent-pill { padding: 0.25rem 0.75rem; background: #334155; border-radius: 1rem; font-size: 0.8rem; cursor: pointer; color: var(--text-muted); transition: 0.2s; }
.recent-pill:hover { background: #475569; color: var(--text); }

.movies-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
.movie-item { display: flex; flex-direction: column; background: var(--card-bg); padding: 0.6rem 1rem; border-radius: 0.75rem; transition: transform 0.2s; box-shadow: 0 2px 4px -1px rgb(0 0 0 / 0.1); border: 1px solid #334155; }
.movie-main { display: flex; flex-direction: column; align-items: flex-start; width: 100%; gap: 0.75rem; }
.movie-info { display: flex; align-items: center; width: 100%; gap: 0.5rem; }
.movie-info .title { font-size: 0.95rem; font-weight: 600; flex: 1; }
.movie-actions { display: flex; gap: 0.5rem; width: 100%; flex-wrap: wrap; }
.movie-item:first-child { grid-column: span 2; background: linear-gradient(135deg, #1e293b 0%, #2d3a4f 100%); border-color: #8b5cf6; padding: 0.8rem 1.2rem; }
.movie-item:first-child .title { font-size: 1.2rem; color: #a78bfa; }
.movie-item:hover { transform: translateY(-1px); border-color: #475569; }
.movie-rank { background: #334155; width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.65rem; color: #94a3b8; margin-right: 0.4rem; flex-shrink: 0; }
.movie-item:first-child .movie-rank { width: 28px; height: 28px; font-size: 0.9rem; background: #8b5cf6; color: white; }


.review-box { margin-top: 0.5rem; display: flex; gap: 0.4rem; padding-top: 0.5rem; border-top: 1px solid #334155; }
.review-box input { flex: 1; background: #0f172a; border: 1px solid #334155; border-radius: 0.4rem; padding: 0.3rem 0.6rem; color: var(--text); font-size: 0.85rem; outline: none; }
.review-box input:focus { border-color: var(--primary); }
.review-box button { background: var(--primary); border: none; border-radius: 0.4rem; color: white; padding: 0.3rem 0.75rem; font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.review-box button:hover { background: var(--primary-hover); }

.vote-btn { background: #0f172a; border: 1px solid #334155; border-radius: 0.4rem; padding: 0.35rem 0.6rem; cursor: pointer; color: var(--text-muted); font-size: 0.85rem; font-family: inherit; transition: 0.2s; display: flex; align-items: center; gap: 0.3rem; font-weight: 600; }
.vote-btn:hover { background: #1e293b; border-color: #475569; color: var(--text); }
.vote-btn.up.active { color: var(--upvote); border-color: var(--upvote); background: rgba(16, 185, 129, 0.1); }
.vote-btn.down.active { color: var(--downvote); border-color: var(--downvote); background: rgba(244, 63, 94, 0.1); }

.total-votes { font-weight: 600; background: #334155; padding: 0.35rem 0.6rem; border-radius: 0.4rem; font-size: 0.8rem; color: #cbd5e1; }

footer { margin-top: 4rem; padding: 2rem 0; border-top: 1px solid #334155; text-align: center; color: var(--text-muted); font-size: 0.9rem; }
footer a { color: var(--primary); text-decoration: none; font-weight: 600; }
footer a:hover { text-decoration: underline; }

/* Modal */
.modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.8); backdrop-filter: blur(5px); }
.modal-content { background: var(--bg-secondary); margin: 5% auto; padding: 2rem; border-radius: 1rem; width: 90%; max-width: 600px; position: relative; border: 1px solid var(--border); }
.close-modal { position: absolute; right: 1.5rem; top: 1rem; font-size: 2rem; cursor: pointer; color: var(--text-muted); }
.close-modal:hover { color: #fff; }

/* Star Rating */
.star-rating { display: flex; flex-direction: row-reverse; justify-content: center; gap: 0.5rem; font-size: 2rem; margin-bottom: 1rem; }
.star { cursor: pointer; color: #334155; transition: color 0.2s; }
.star:hover, .star:hover ~ .star, .star.active, .star.active ~ .star { color: #fbbf24; }

/* Review Form */
.review-inputs { display: grid; grid-template-columns: 80px 1fr; gap: 1rem; margin-bottom: 1rem; }
#review-initials { text-align: center; font-weight: 700; text-transform: uppercase; }
#review-comment { min-height: 80px; resize: none; }

/* Reviews List in Modal */
#modal-reviews-list { max-height: 300px; overflow-y: auto; margin-bottom: 2rem; padding-right: 0.5rem; }
.review-item { padding: 1rem; border-bottom: 1px solid var(--border); }
.review-item:last-child { border-bottom: none; }
.review-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.5rem; }
.review-initials-badge { background: var(--primary); color: #fff; padding: 0.2rem 0.5rem; border-radius: 0.3rem; font-size: 0.7rem; font-weight: 800; }
.review-stars { color: #fbbf24; font-size: 0.9rem; }
.review-text { font-size: 0.9rem; color: #cbd5e1; }
.review-date { font-size: 0.7rem; color: var(--text-muted); }

/* Movie Item Tweaks */
.seen-movie { opacity: 0.5; filter: grayscale(0.5); border-left: 4px solid #475569; }
.vote-btn.seen.active { color: #10b981; border-color: #10b981; background: rgba(16, 185, 129, 0.1); }
.vote-btn.review { color: #8b5cf6; }
.vote-btn.review:hover { border-color: #8b5cf6; background: rgba(139, 92, 246, 0.1); }

@media (max-width: 600px) {
    header h1 { font-size: 1.2rem; }
    .header-right { flex-direction: column; gap: 0.5rem; align-items: center; }
    .movies-list { grid-template-columns: 1fr; }
    .movie-item:first-child { grid-column: span 1; padding: 1rem 1.5rem; }
    .movie-item:first-child .title { font-size: 1.2rem; }
    .input-group { flex-direction: column; }

}
