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

body {
    font-family: Arial, sans-serif;
    background-color: #fff;
    color: #333;
    padding-top: 80px;
}

#logo {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
    z-index: 1000;
}

#logo table {
    width: 100%;
}

#logo td {
    vertical-align: middle;
}

#logo a {
    color: black;
    text-decoration: none;
    font-size: 16px;
}

#logo a:hover {
    text-decoration: underline;
}

.arrow-icon {
    font-size: 24px;
    font-weight: bold;
    margin-right: 5px;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.entries-list {
    list-style: none;
}

.entry-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.entry-item:hover {
    background-color: #f5f5f5;
}

.entry-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 5px;
}

.entry-rating {
    font-weight: normal;
    font-size: 14px;
    color: #666;
    margin-left: 10px;
}

.entry-ai-score {
    font-weight: normal;
    font-size: 14px;
    color: #0066cc;
    margin-left: 10px;
}

.entry-date {
    color: #666;
    font-size: 14px;
    margin-bottom: 8px;
}

.entry-tags {
    margin-top: 8px;
}

.tag {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
    cursor: pointer;
}

a.tag:hover {
    background-color: #ccc;
}

.entry-title-link {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.entry-title-link:hover {
    text-decoration: underline;
}

.entry-year {
    font-weight: normal;
    font-size: 0.5em;
}

.filter-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.filter-header h2 {
    margin-bottom: 10px;
}

.tag-definition {
    color: #666;
    font-style: italic;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* Suggestions box */
.suggestions-box {
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.suggestions-disallowed {
    background-color: #f5f5f5;
    border-style: dashed;
}

.suggestions-disallowed-text {
    color: #888;
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

.suggestions-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.suggestions-header h3 {
    margin: 0;
    font-size: 16px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
}

.suggestions-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.suggestion-pill {
    display: inline-block;
    background-color: #e8e8e8;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 14px;
    color: #333;
}

.suggestion-pill.added {
    background-color: #d4edda;
    color: #155724;
    text-decoration: line-through;
}

.suggestions-footer {
    margin-top: 10px;
}

.suggestions-empty {
    color: #666;
    font-style: italic;
    margin: 0 0 15px 0;
}

/* Modal styles */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    width: min(90vw, 800px);
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    margin: 20px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.modal-images {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-end;
}

.modal-image {
    max-height: 500px;
    max-width: 100%;
    object-fit: contain;
    flex-shrink: 1;
    min-width: 0;
}

.modal-image.with-poster {
    flex: 0 1 auto;
}

.modal-poster {
    max-height: 500px;
    max-width: 100%;
    object-fit: contain;
    flex: 0 1 auto;
    min-width: 0;
}

.modal-title {
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 10px;
}

.modal-date {
    color: #666;
    margin-bottom: 15px;
}

.modal-description {
    line-height: 1.6;
    margin-bottom: 15px;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

.modal-whats-good {
    margin-bottom: 15px;
    padding: 12px;
    background-color: #f0f8f0;
    border-radius: 6px;
    border-left: 3px solid #28a745;
}

.whats-good-label {
    font-size: 14px;
    color: #155724;
    margin-bottom: 6px;
}

.whats-good-content {
    line-height: 1.5;
    color: #333;
    white-space: pre-wrap;
}

.modal-rating {
    margin-bottom: 15px;
}

.modal-scores {
    margin-bottom: 15px;
}

.modal-score-item {
    margin-right: 20px;
    color: #666;
}

.modal-score-ai {
    color: #0066cc;
}

/* Similar movies in modal */
.modal-similar {
    margin-top: 15px;
    margin-bottom: 15px;
}

.similar-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.similar-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.similar-pill {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
}

.similar-pill.in-collection {
    background-color: #d4edda;
    color: #155724;
    cursor: pointer;
}

.similar-pill.in-collection:hover {
    background-color: #c3e6cb;
}

.similar-link {
    display: inline-block;
    background-color: #e0e0e0;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 13px;
    color: #666;
    margin-right: 5px;
    margin-bottom: 5px;
    text-decoration: none;
}

a.similar-link {
    background-color: #d4edda;
    color: #155724;
    cursor: pointer;
}

a.similar-link:hover {
    background-color: #c3e6cb;
}

.star {
    color: #ffc107;
    font-size: 20px;
}

.star.empty {
    color: #ddd;
}

/* Login form styles */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 30px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.login-container h2 {
    text-align: center;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.form-group input:focus {
    outline: none;
    border-color: #333;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    text-decoration: none;
}

.btn:hover {
    background-color: #555;
}

.btn-full {
    width: 100%;
}

.btn-danger {
    background-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
}

.btn-secondary {
    background-color: #6c757d;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.error-message {
    background-color: #f8d7da;
    color: #721c24;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Edit page styles */
.edit-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    box-sizing: border-box;
}

.edit-options {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-bottom: 30px;
}

.edit-option {
    padding: 20px 30px;
    background-color: #f5f5f5;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    text-decoration: none;
    color: #333;
    flex: 1 1 200px;
    max-width: 250px;
    box-sizing: border-box;
}

.edit-option:hover {
    background-color: #e0e0e0;
}

.edit-option h3 {
    margin-bottom: 10px;
}

/* Entry form styles */
.entry-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}

.entry-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    resize: vertical;
    min-height: 100px;
}

.entry-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

/* Tags management */
.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.tag-checkbox {
    display: flex;
    align-items: center;
    background-color: #e0e0e0;
    padding: 5px 12px;
    border-radius: 15px;
    cursor: pointer;
}

.tag-checkbox input {
    margin-right: 5px;
}

.tag-checkbox:hover {
    background-color: #d0d0d0;
}

/* Entry list in edit mode */
.entries-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.entries-table th,
.entries-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.entries-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.entries-table tr:hover {
    background-color: #f9f9f9;
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-buttons .btn {
    padding: 5px 15px;
    font-size: 14px;
}

/* Tags list */
.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.tag-item {
    display: flex;
    align-items: center;
    background-color: #e0e0e0;
    padding: 8px 15px;
    border-radius: 20px;
}

.tag-item span {
    margin-right: 10px;
}

.tag-delete {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.tag-delete:hover {
    color: #a71d2a;
}

.tag-actions {
    display: flex;
    gap: 5px;
}

.tag-edit {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
}

.tag-edit:hover {
    color: #333;
}

.tag-edit-form {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: 1;
}

.tag-edit-input {
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    flex: 1;
}

.tag-save {
    background: none;
    border: none;
    color: #28a745;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.tag-save:hover {
    color: #1e7e34;
}

.tag-cancel {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 18px;
    padding: 0;
    line-height: 1;
}

.tag-cancel:hover {
    color: #a71d2a;
}

/* No entries message */
.no-entries {
    text-align: center;
    padding: 50px;
    color: #666;
}

/* Back link */
.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #333;
    text-decoration: none;
}

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