:root {
    --bg: #0f172a;
    --surface: #1e293b;
    --surface-hover: #334155;
    --text: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --discord: #5865f2;
    --discord-hover: #4752c4;
    --gold: #facc15;
    --border: #334155;
    --radius: 10px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1rem;
}

.topbar {
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.topbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.topbar h1 {
    font-size: 1.4rem;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: var(--bg);
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    font-size: 0.9rem;
}

.user-badge img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}

.user-id-tag {
    color: var(--text-muted);
    font-size: 0.75rem;
}

main {
    flex: 1;
    padding: 1.5rem 0;
}

.controls-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.sort-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

select, input, textarea {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.55rem 0.75rem;
    font-size: 0.95rem;
    font-family: inherit;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 6px;
    padding: 0.55rem 1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    color: #fff;
    transition: background-color 0.2s;
}

.btn-primary { background-color: var(--primary); }
.btn-primary:hover { background-color: var(--primary-hover); }

.btn-secondary { background-color: var(--surface-hover); }
.btn-secondary:hover { background-color: #475569; }

.btn-discord { background-color: var(--discord); }
.btn-discord:hover { background-color: var(--discord-hover); }

.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}

.form-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.form-actions {
    display: flex;
    gap: 0.5rem;
}

.movies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.25rem;
}

.movie-card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.movie-poster {
    width: 100%;
    height: 180px;
    object-fit: cover;
    background-color: #0b1120;
}

.movie-body {
    padding: 1rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.75rem;
}

.movie-title {
    font-size: 1.15rem;
    margin-bottom: 0.25rem;
}

.movie-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.movie-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--border);
}

.rating-badge {
    color: var(--gold);
    font-weight: 700;
}

.modal {
    background-color: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 540px;
    width: 92%;
    margin: auto;
    padding: 0;
}

.modal::backdrop {
    background: rgba(0, 0, 0, 0.75);
}

.modal-content {
    padding: 1.25rem;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.btn-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.6rem;
    cursor: pointer;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 1rem;
}

.review-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

hr {
    border: 0;
    border-top: 1px solid var(--border);
    margin: 1rem 0;
}

.reviews-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
    max-height: 220px;
    overflow-y: auto;
}

.review-item {
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 0.65rem;
    font-size: 0.9rem;
}

.review-item-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.warning-text {
    color: var(--gold);
    font-size: 0.85rem;
}

.hidden {
    display: none !important;
}

.footer {
    background-color: var(--surface);
    border-top: 1px solid var(--border);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.88rem;
    color: var(--text-muted);
    margin-top: 2rem;
}

.unique-key {
    margin-top: 0.25rem;
    color: var(--text);
}