/* Header Styles */
.main-header {
    background-color: #990000;
    color: white;
    padding: 20px;
    text-align: center;
    margin: 0;
}

.main-header h1 {
    margin: 0 0 15px 0;
    font-size: 2.5rem;
    font-weight: bold;
}

.header-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

@media (min-width: 768px) {
    .header-controls {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    .main-header h1 {
        margin: 0;
    }
}

/* Auth Container */
.auth-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.auth-btn {
    background-color: white;
    color: red;
    border: 2px solid white;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.auth-btn:hover {
    background-color: transparent;
    color: white;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 15px;
}

.username {
    font-weight: bold;
    color: white;
    transition: all 0.3s ease;
}

.username:hover {
    color: #ffcccc;
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.3);
}

/* Search Bar Styles */
.search-container {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.search-bar {
    padding: 10px 15px;
    font-size: 16px;
    border: none;
    border-radius: 5px;
    width: 300px;
    outline: none;
}

.search-button {
    padding: 10px 20px;
    font-size: 16px;
    background-color: white;
    color: red;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
}

.search-button:hover {
    background-color: #f0f0f0;
}

/* Basic body styles */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
}

main {
    padding: 20px;
}

/* Info Box Styles */
.info-box {
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 600px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-box p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: #495057;
}

/* Search Results Styles */
.search-results {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px auto;
    max-width: 700px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.search-results h3 {
    margin-top: 0;
    color: #495057;
    border-bottom: 2px solid red;
    padding-bottom: 10px;
}

.search-results .error {
    color: #dc3545;
    font-weight: bold;
}

/* Loading Animation */
.loading {
    text-align: center;
    padding: 40px 20px;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid red;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Rankings Display */
.results-info {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    margin-bottom: 25px;
}

.rankings-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.rank-item {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.rank-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.rank-item[data-rank="1"] {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    border-color: #ffc107;
}

.rank-item[data-rank="2"] {
    background: linear-gradient(135deg, #c0c0c0, #e8e8e8);
    border-color: #6c757d;
}

.rank-item[data-rank="3"] {
    background: linear-gradient(135deg, #cd7f32, #deb887);
    border-color: #fd7e14;
}

.rank-number {
    font-size: 24px;
    font-weight: bold;
    margin-right: 20px;
    min-width: 50px;
    text-align: center;
}

.ship-info {
    flex: 1;
}

.ship-name {
    margin: 0 0 8px 0;
    color: #495057;
    font-size: 18px;
}

.fic-count {
    margin: 0;
    color: #990000;
    font-weight: bold;
    font-size: 16px;
}

.note {
    margin: 5px 0 0 0;
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* Data Notice */
.data-notice {
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 15px;
    margin-top: 25px;
}

.data-notice h4 {
    margin-top: 0;
    color: #856404;
}

.data-notice ul {
    margin: 10px 0;
    padding-left: 20px;
}

.data-notice li {
    margin: 5px 0;
    color: #856404;
}

/* Link Input Section */
.link-input-section {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    max-width: none;
}

.fic-list-section .link-input-section {
    margin: 20px 0 30px 0;
}

.link-input-section h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #495057;
    text-align: left;
    font-size: 1.3rem;
}

.input-container {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.link-input {
    flex: 1;
    padding: 12px 15px;
    font-size: 16px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    outline: none;
}

.link-input:focus {
    border-color: #990000;
    box-shadow: 0 0 0 2px rgba(153, 0, 0, 0.1);
}

.add-button {
    padding: 12px 25px;
    font-size: 16px;
    background-color: #990000;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.add-button:hover:not(:disabled) {
    background-color: #cc0000;
}

.add-button:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Fic List Section */
.fic-list-section {
    max-width: 700px;
    margin: 20px auto;
}

.fic-list-section h3 {
    color: #495057;
    text-align: center;
    margin-bottom: 20px;
}

.empty-state {
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

/* Fic Items */
.fic-item {
    background-color: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
}

.fic-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.fic-item.expanded {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.fic-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.fic-title {
    margin: 0;
    flex: 1;
}

.fic-title a {
    color: #990000;
    text-decoration: none;
    font-size: 18px;
}

.fic-title a:hover {
    text-decoration: underline;
}

.fic-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.remove-btn {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

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

.fic-author {
    color: #6c757d;
    margin: 0 0 10px 0;
    font-style: italic;
}

.fic-summary {
    color: #495057;
    line-height: 1.5;
    margin: 0 0 15px 0;
}

.fic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.meta-item {
    color: #6c757d;
    font-size: 14px;
}

.fic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    border: 1px solid #dee2e6;
}

.date-added {
    color: #6c757d;
    font-size: 12px;
    margin: 0;
}

/* Fic Details (Collapsible) */
.fic-details {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fic-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #f8f9fa;
}

.expand-indicator {
    color: #6c757d;
    font-size: 12px;
    font-style: italic;
    -webkit-user-select: none; /* Safari 3.1+ */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none;
}

.no-tags {
    color: #6c757d;
    font-style: italic;
    font-size: 12px;
}

/* Success Message */
.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Auth Required Message */
.auth-required-message {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    padding: 40px 20px;
    margin: 40px auto;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.auth-required-message h3 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 15px;
}

.auth-required-message p {
    color: #6c757d;
    margin-bottom: 25px;
    line-height: 1.5;
}

.auth-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-action-btn {
    background-color: #990000;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: all 0.3s ease;
    min-width: 120px;
}

.auth-action-btn:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(153, 0, 0, 0.3);
}

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

.auth-action-btn.secondary:hover {
    background-color: #5a6268;
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.modal h2 {
    color: #495057;
    margin-top: 0;
    margin-bottom: 25px;
    text-align: center;
}

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

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #990000;
    box-shadow: 0 0 0 2px rgba(153, 0, 0, 0.1);
}

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.modal-buttons .auth-action-btn {
    flex: 1;
}

.modal-subtitle {
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 20px;
    text-align: center;
}

.modal-subtitle a {
    color: #990000;
    text-decoration: none;
}

.modal-subtitle a:hover {
    text-decoration: underline;
}

.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    font-family: inherit;
    resize: vertical;
}

.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
    background-color: white;
}

.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #990000;
    box-shadow: 0 0 0 2px rgba(153, 0, 0, 0.1);
}

/* Search Results Section */
.search-results-section {
    max-width: 800px;
    margin: 20px auto;
}

.search-loading {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.search-loading h3 {
    color: #495057;
    margin: 20px 0 10px 0;
}

.search-loading p {
    color: #6c757d;
    margin: 0;
}

.no-results, .search-error {
    text-align: center;
    padding: 40px 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.no-results h3, .search-error h3 {
    color: #495057;
    margin-top: 0;
}

.search-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.search-error h3 {
    color: #721c24;
}

.search-results-container h3 {
    color: #495057;
    text-align: center;
    margin-bottom: 10px;
}

.results-summary {
    text-align: center;
    color: #6c757d;
    margin-bottom: 30px;
    font-style: italic;
}

/* Search Results Sections */
.results-section {
    margin-bottom: 40px;
}

.section-title {
    color: #495057;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007bff;
}

/* List Match Results */
.list-match-result {
    background-color: #f8f9fa;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.list-match-result:hover {
    background-color: #e9ecef;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.list-match-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}

.list-match-title {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    flex: 1;
    min-width: 200px;
}

.list-match-stats {
    color: #6c757d;
    font-size: 0.9rem;
    white-space: nowrap;
}

.list-match-description {
    color: #666;
    margin: 0;
    line-height: 1.4;
    font-style: italic;
}

/* User Recommendation Lists */
.user-rec-list {
    background-color: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    margin-bottom: 30px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.user-header {
    background-color: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.user-header h4 {
    margin: 0;
    color: #495057;
    font-size: 18px;
}

.user-stats {
    color: #6c757d;
    font-size: 14px;
}

.user-fics {
    padding: 20px;
}

/* Public Fic Items */
.public-fic-item {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.public-fic-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0,0,0,0.1);
}

.public-fic-item:last-child {
    margin-bottom: 0;
}

.public-fic-item .fic-title {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.public-fic-item .fic-title a {
    color: #990000;
    text-decoration: none;
}

.public-fic-item .fic-title a:hover {
    text-decoration: underline;
}

.public-fic-item .fic-author {
    color: #6c757d;
    margin: 0 0 10px 0;
    font-style: italic;
    font-size: 14px;
}

.public-fic-item .fic-summary {
    color: #495057;
    line-height: 1.4;
    margin: 0 0 12px 0;
    font-size: 14px;
}

.public-fic-item .fic-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 10px;
}

.public-fic-item .meta-item {
    color: #6c757d;
    font-size: 12px;
}

.public-fic-item .fic-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.public-fic-item .tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    border: 1px solid #dee2e6;
}

/* List Management Styles */
.list-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    gap: 15px;
}

.current-list-info {
    flex: 1;
}

.current-list-info h3 {
    margin: 0 0 5px 0;
    color: #333;
    font-size: 1.4rem;
}

.current-list-description {
    margin: 0;
    color: #666;
    font-size: 14px;
    font-style: italic;
}

.create-list-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.create-list-btn:hover {
    background-color: #0056b3;
}

/* Centered List Title */
.centered-list-title {
    text-align: center;
    margin: 20px 0 30px 0;
    color: #333;
    font-size: 2rem;
    font-weight: 600;
    border: none;
    background: none;
    padding: 0;
}

/* Checkbox Styles */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    -webkit-user-select: none; /* Safari 3.1+ */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* IE/Edge */
    user-select: none;
    font-size: 14px;
    color: #495057;
}

.checkbox-label input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ced4da;
    border-radius: 3px;
    margin-right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.checkbox-label:hover input ~ .checkmark {
    border-color: #007bff;
}

.checkbox-label input:checked ~ .checkmark {
    background-color: #007bff;
    border-color: #007bff;
}

.checkbox-label input:checked ~ .checkmark::after {
    content: '✓';
    color: white;
    font-weight: bold;
    font-size: 12px;
}

/* New List Welcome Message */
.new-list-welcome {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 2px dashed #007bff;
    margin-bottom: 20px;
}

.new-list-welcome h4 {
    margin: 0 0 15px 0;
    color: #007bff;
    font-size: 1.2rem;
}

.new-list-welcome p {
    margin: 10px 0;
    color: #495057;
}

.new-list-welcome .empty-state {
    margin-top: 20px;
    font-style: italic;
    color: #6c757d;
}

/* User Dashboard Styles */
.user-dashboard-section {
    max-width: 1200px;
    margin: 20px auto;
    padding: 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.dashboard-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.8rem;
}

.lists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.list-card {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.list-card:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
    transform: translateY(-2px);
}

.list-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 10px;
}

.list-card-title {
    margin: 0;
    color: #333;
    font-size: 1.3rem;
    font-weight: 600;
    line-height: 1.2;
    flex: 1;
    min-width: 0; /* Allow text to wrap */
}

.list-card-privacy {
    padding: 4px 8px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.list-card-privacy.public {
    background-color: #d4edda;
    color: #155724;
}

.list-card-privacy.private {
    background-color: #f8d7da;
    color: #721c24;
}

.list-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.delete-list-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
}

.delete-list-btn:hover {
    opacity: 1;
    background-color: #f8d7da;
    color: #721c24;
}

.delete-list-btn:active {
    transform: scale(0.95);
}

.list-card-description {
    color: #666;
    margin: 0 0 15px 0;
    line-height: 1.4;
    font-size: 0.95rem;
}

.list-card-stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #6c757d;
    font-size: 0.85rem;
}

.list-card-fic-count {
    font-weight: 600;
}

.list-card-updated {
    font-style: italic;
}

/* Back Button */
.back-btn {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.back-btn:hover {
    background-color: #5a6268;
    transform: translateX(-2px);
}

.back-btn:active {
    transform: translateX(-1px);
}

/* Back to Profile Button */
.back-to-profile-btn {
    background-color: #990000;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.95rem;
}

.back-to-profile-btn:hover {
    background-color: #7a0000;
    transform: translateX(-2px);
}

.back-to-profile-btn:active {
    transform: translateX(-1px);
}

/* Password Requirements Styling */
.password-requirements {
    margin-top: 8px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #e9ecef;
}

.password-requirements small {
    color: #6c757d;
    font-weight: 500;
}

.password-requirements ul {
    margin: 5px 0 0 0;
    padding-left: 20px;
}

.password-requirements li {
    color: #dc3545;
    font-size: 0.85rem;
    margin: 2px 0;
}

.password-requirements li.valid {
    color: #28a745;
}

.password-requirements li.valid::before {
    content: "✓ ";
    font-weight: bold;
}

.password-requirements li:not(.valid)::before {
    content: "✗ ";
    font-weight: bold;
}

/* Search Results Header */
.search-results-header {
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

/* Update list header to accommodate back button */
.list-header {
    margin-bottom: 20px;
}

.current-list-info {
    margin-top: 10px;
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    border-left: none;
}

/* Empty state for dashboard */
.lists-grid .empty-state {
    grid-column: 1 / -1;
    text-align: center;
    color: #6c757d;
    font-style: italic;
    padding: 40px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 2px dashed #dee2e6;
}

/* Fic Preview Modal */
.fic-preview-modal {
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.fic-preview-content {
    margin-bottom: 20px;
}

.loading-message {
    text-align: center;
    padding: 30px;
    color: #6c757d;
}

.loading-message p {
    margin: 0;
    font-size: 1.1rem;
}

.preview-header {
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.preview-header h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.4rem;
    line-height: 1.3;
}

.preview-author {
    margin: 0 0 10px 0;
    color: #666;
    font-size: 1rem;
}

.preview-author span {
    font-weight: 600;
    color: #333;
}

.preview-link {
    color: #007bff;
    text-decoration: none;
    font-size: 0.9rem;
}

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

.preview-meta {
    margin-bottom: 20px;
}

.preview-stats {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.preview-stat {
    background-color: #f8f9fa;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
    color: #495057;
    border: 1px solid #dee2e6;
}

.preview-summary {
    margin-bottom: 20px;
}

.preview-summary h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.preview-summary p {
    margin: 0;
    line-height: 1.5;
    color: #495057;
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #28a745;
}

.preview-tags h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1rem;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.preview-tag {
    background-color: #e9ecef;
    color: #495057;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid #ced4da;
}

.error-message {
    text-align: center;
    padding: 20px;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    color: #721c24;
}

.error-message p {
    margin: 0;
}

/* Responsive styling for centered list title */
@media (max-width: 768px) {
    .centered-list-title {
        font-size: 1.5rem;
        margin: 15px 0 25px 0;
    }
}