body {
    font-family: "Segoe UI", Arial, sans-serif;
    margin: 20px 16px;
    background-color: #f5f5f7;
}

body.theme-filmai {
    --accent: #6a1b9a;
    --accent-active: #4a148c;
    --accent-bg: rgba(106, 27, 154, 0.1);
    --accent-bg-hover: rgba(106, 27, 154, 0.08);
    --content-max: 1100px;
    --muted: #555;
}

.page-header {
    max-width: var(--content-max, 1100px);
    margin: 0 auto 16px;
}

.page-header h1 {
    margin: 0;
    color: var(--accent, #6a1b9a);
    font-size: 22px;
}

.filmai-content {
    margin: 0 auto;
}

.filmai-meta {
    margin: 0 0 12px;
    color: #555;
    font-size: 14px;
}

.poster-col {
    width: 52px;
}

.poster-cell {
    padding: 4px;
    vertical-align: middle;
}

.film-poster {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
    background: #eceff1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
    transition: box-shadow 0.15s ease;
}

.poster-imdb-link {
    display: block;
    line-height: 0;
}

.poster-imdb-link:hover .film-poster {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
}

.title-cell {
    text-align: left;
}

.film-title {
    font-weight: 700;
}

.external-link {
    color: #6a1b9a;
    font-weight: 600;
    text-decoration: none;
}

.external-link:hover {
    text-decoration: underline;
}

.external-link-disabled {
    color: #999;
    font-weight: 600;
    cursor: default;
}

.logout-link {
    font-size: 13px;
    color: #6a1b9a;
    text-decoration: none;
}

.logout-link:hover {
    text-decoration: underline;
}

.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f5f5f7;
    margin: -20px;
}

.login-box {
    width: 100%;
    max-width: 360px;
    background: white;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.login-box h1 {
    margin: 0 0 8px;
    color: #6a1b9a;
    font-size: 24px;
    text-align: center;
}

.login-subtitle {
    margin: 0 0 20px;
    color: #666;
    font-size: 14px;
    text-align: center;
}

.login-error {
    margin: 0 0 12px;
    color: #c62828;
    font-size: 13px;
    text-align: center;
}

.login-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    color: #444;
}

.login-form input {
    width: 100%;
    padding: 8px 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

.login-btn,
.guest-btn {
    width: 100%;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    border: 1px solid transparent;
}

.login-btn {
    background: #7b1fa2;
    color: white;
    border-color: #6a1b9a;
}

.login-btn:hover {
    background: #6a1b9a;
}

.guest-form {
    margin-top: 12px;
}

.guest-btn {
    background: #f5f5f5;
    color: #333;
    border-color: #ccc;
}

.guest-btn:hover {
    background: #eceff1;
}

.login-back {
    margin: 18px 0 0;
    text-align: center;
    font-size: 14px;
}

.login-back a {
    color: #6a1b9a;
    text-decoration: none;
}

.login-back a:hover {
    text-decoration: underline;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

th,
td {
    border: 1px solid #ddd;
    padding: 6px;
    text-align: center;
    font-size: 13px;
}

th {
    background-color: #7b1fa2;
    color: white;
}

tr:nth-child(even) {
    background-color: #f3e5f5;
}

.filter-row input {
    width: 100%;
    box-sizing: border-box;
    padding: 4px 6px;
    font-size: 12px;
}

.clear-filters {
    padding: 2px 8px;
    font-size: 12px;
    border: 1px solid #7b1fa2;
    border-radius: 4px;
    background: #f3e5f5;
    color: #6a1b9a;
    cursor: pointer;
}

.pagination {
    margin: 12px auto 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
}

.pagination button {
    padding: 2px 10px;
    font-size: 12px;
    line-height: 1.2;
    border: 1px solid #7b1fa2;
    border-radius: 4px;
    background: #f3e5f5;
    color: #6a1b9a;
    cursor: pointer;
}

.pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}

#page-info {
    font-size: 13px;
    color: #444;
}

.empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #fff;
    border: 1px dashed #ce93d8;
    border-radius: 12px;
}

.empty-state h2 {
    margin: 0 0 12px;
    color: #6a1b9a;
}

.empty-state p {
    color: #666;
    line-height: 1.5;
}

.empty-state code {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 12px;
    background: #f3e5f5;
    border-radius: 6px;
    color: #4a148c;
    font-size: 13px;
}

@media (max-width: 640px) {
    body {
        margin: 12px 8px;
    }
}
