:root {
    --background-color: #f0f2f5;
    --text-color: #1c1e21;
    --container-bg: #ffffff;
    --border-color: #dddfe2;
    --button-bg: #e4e6eb;
    --button-text: #050505;
    --button-hover-bg: #d8dadf;
    --link-color: #0066cc;
    --modal-bg: rgba(0, 0, 0, 0.85);
    --modal-content-bg: #ffffff;
    --input-bg: #f0f2f5;
    --input-border: #ccd0d5;
    --danger-color: #dc3545;
    --danger-hover-color: #c82333;
    --message-bg: #d4edda;
    --message-text: #155724;
    --error-bg: #f8d7da;
    --error-text: #721c24;
    --accent-color: #007bff;
    --accent-hover: #0056b3;
}

body.dark-mode {
    --background-color: #18191a;
    --text-color: #e4e6eb;
    --container-bg: #242526;
    --border-color: #3a3b3c;
    --button-bg: #3a3b3c;
    --button-text: #e4e6eb;
    --button-hover-bg: #4e4f50;
    --link-color: #4599ff;
    --modal-bg: rgba(0, 0, 0, 0.95);
    --modal-content-bg: #242526;
    --input-bg: #3a3b3c;
    --input-border: #4e4f50;
    --danger-color: #f44336;
    --danger-hover-color: #e53935;
    --message-bg: #2d4a34;
    --message-text: #a7d7b4;
    --error-bg: #5a2d32;
    --error-text: #f1b0b7;
    --accent-color: #4599ff;
    --accent-hover: #5ba4ff;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 20px;
    transition: background-color 0.3s, color 0.3s;
}

/* Centered Layout (for Login/Access/Admin) */
body.centered-body {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    padding: 0;
}

.container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 20px;
    background-color: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* App Header Layout */
.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--container-bg);
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    gap: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Column 1: Search & Filters (Left) */
.header-left {
    flex: 1;
    min-width: 300px;
}

.compact-search-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.search-line {
    display: flex;
    gap: 8px;
}

.search-line input[type="search"] {
    flex-grow: 1;
    max-width: 250px;
    padding: 8px 12px;
}

.filter-line {
    display: flex;
    gap: 8px;
}

.filter-line select {
    flex: 1;
    padding: 6px;
    font-size: 0.9em;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    color: var(--text-color);
    border-radius: 6px;
}

/* Column 2: Brand (Center) */
.header-center {
    flex: 0 0 auto;
    text-align: center;
}

.header-logo {
    height: 60px;
    width: auto;
    display: block;
    transition: transform 0.2s;
}

.header-logo:hover {
    transform: scale(1.05);
}

/* Column 3: User Actions (Right) */
.header-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    min-width: 300px;
}

/* Header Buttons */
.header-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    white-space: nowrap;
}

/* Old Form Container (Keep for Login pages) */
.form-container {
    background: var(--container-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

h1,
h2,
h3 {
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Forms & Inputs (General) */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="search"],
input[type="file"],
select {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background-color: var(--input-bg);
    color: var(--text-color);
    font-size: 14px;
    box-sizing: border-box;
}

/* Enhanced Text Areas */
textarea {
    min-height: 120px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9rem;
    line-height: 1.4;
    white-space: pre-wrap;
    background-color: var(--input-bg);
    color: var(--text-color);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    width: 100%;
    box-sizing: border-box;
    resize: vertical;
    padding: 10px;
}

/* Copy Button Header */
.input-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
    margin-top: 15px;
}

.input-header label {
    font-weight: bold;
    margin: 0;
    font-size: 0.9rem;
}

.copy-btn-small {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s;
}

.copy-btn-small:hover {
    background-color: var(--button-hover-bg);
}

/* Clear Button */
.clear-button {
    background-color: var(--button-bg);
    color: var(--text-color);
    border: 1px solid var(--border-color);
    padding: 0 10px;
    display: flex;
    align-items: center;
}

.clear-button:hover {
    background-color: var(--button-hover-bg);
    border-color: #bbb;
}

/* General Buttons */
button,
.view-all-button,
.search-button,
.button,
.header-btn {
    border: none;
    border-radius: 6px;
    background-color: var(--accent-color);
    color: white;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background-color 0.2s;
}

button:hover,
.view-all-button:hover,
.search-button:hover,
.button:hover,
.header-btn:hover {
    background-color: var(--accent-hover);
}

.button-secondary,
.header-btn.button-secondary {
    background-color: #6c757d;
    color: white;
}

.button-secondary:hover,
.header-btn.button-secondary:hover {
    background-color: #5a6268;
}

.delete-button {
    background-color: var(--danger-color);
    color: white;
}

.delete-button:hover {
    background-color: var(--danger-hover-color);
}

.interaction-button {
    background: none;
    border: none;
    cursor: pointer;
    color: #ccc;
    font-size: 1.5rem;
    padding: 0 10px;
    background-color: transparent;
}

.interaction-button:hover {
    transform: scale(1.1);
    background-color: transparent;
}

.interaction-button.active {
    color: #ff4500;
}

/* Grids */
.index,
.gallery-grid,
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.index-item img,
.gallery-item img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    display: block;
}

.index-item img:hover,
.gallery-item img:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Admin Cards */
.report-card {
    background: var(--container-bg);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s;
    border: 1px solid var(--border-color);
}

.report-card:hover {
    transform: translateY(-5px);
}

.report-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.report-card-content {
    padding: 15px;
}

.report-card .report-text {
    margin-top: 10px;
    padding: 10px;
    background: var(--input-bg);
    border-left: 3px solid #ffe58f;
    font-size: 0.95em;
}

/* Messages */
.message,
.error,
.action-message,
.notice,
.message-box {
    text-align: center;
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 6px;
}

.message,
.action-message {
    background-color: var(--message-bg);
    color: var(--message-text);
}

.error {
    background-color: var(--error-bg);
    color: var(--error-text);
}

.processing-info,
.disclaimer {
    font-size: 0.9em;
    color: #606770;
    background-color: var(--input-bg);
    padding: 15px;
    border-radius: 6px;
    margin-top: 1rem;
    border: 1px solid var(--border-color);
}

body.dark-mode .processing-info,
body.dark-mode .disclaimer {
    color: #aeb4bb;
}

/* --- MODALS (Enhanced Layout) --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent body scroll bleed */
    background-color: var(--modal-bg);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--modal-content-bg);
    margin: 0 auto;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    /* Fixed height relative to viewport */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: row;
    /* Two columns side-by-side */
    overflow: hidden;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    background: rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    text-align: center;
    border-radius: 50%;
}

.close-button:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.2);
}

/* Modal Left Column (Image & Buttons) */
.modal-left {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.02);
    /* Slight contrast */
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.modal-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    height: 100%;
    /* Fill available space */
}

.modal-image-full {
    max-width: 100%;
    max-height: 75vh;
    /* Keep image within view, leave room for buttons */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    /* Indicate clickable */
}

.modal-button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 10px;
}

/* Modal Right Column (Details) */
.modal-right {
    flex: 1;
    min-width: 350px;
    padding: 20px;
    overflow-y: auto;
    /* Scroll independent of image */
    padding-top: 50px;
    /* Space for close button */
}

/* Keyword & Tag styling */
.keyword-link {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 4px 10px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.keyword-link:hover {
    background-color: var(--button-hover-bg);
}

/* Special Modals (Reports, Keywords) - simple column layout */
#reportModal .modal-content,
#keywordsModal .modal-content,
#messageModal .modal-content {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    max-width: 600px;
    padding: 30px;
    overflow-y: auto;
}

#keywordCloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-center {
        order: 1;
    }

    .header-left {
        order: 2;
        width: 100%;
    }

    .header-right {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        flex-direction: column;
        height: 100%;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .modal-left {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
        max-height: 60vh;
    }

    .modal-image-full {
        max-height: 45vh;
    }

    .modal-right {
        flex: 1;
        padding: 15px;
    }

    .index,
    .gallery-grid,
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Favorite Message Animation */
.fav-message {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.fav-message.show {
    animation: fadeOut 2s forwards;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Prevent body scroll bleed */
    background-color: var(--modal-bg);
    align-items: center;
    justify-content: center;
}

.modal-content {
    background-color: var(--modal-content-bg);
    margin: 0 auto;
    width: 95%;
    max-width: 1400px;
    height: 90vh;
    /* Fixed height relative to viewport */
    border-radius: 8px;
    border: 1px solid var(--border-color);
    position: relative;
    display: flex;
    flex-direction: row;
    /* Two columns side-by-side */
    overflow: hidden;
}

.close-button {
    position: absolute;
    top: 10px;
    right: 15px;
    color: #aaa;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
    line-height: 1;
    background: rgba(0, 0, 0, 0.1);
    width: 40px;
    height: 40px;
    text-align: center;
    border-radius: 50%;
}

.close-button:hover {
    color: var(--text-color);
    background: rgba(0, 0, 0, 0.2);
}

/* Modal Left Column (Image & Buttons) */
.modal-left {
    flex: 2;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.02);
    /* Slight contrast */
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
}

.modal-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
    height: 100%;
    /* Fill available space */
}

.modal-image-full {
    max-width: 100%;
    max-height: 75vh;
    /* Keep image within view, leave room for buttons */
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    /* Indicate clickable */
}

.modal-button-group {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    width: 100%;
    padding-top: 10px;
}

/* Modal Right Column (Details) */
.modal-right {
    flex: 1;
    min-width: 350px;
    padding: 20px;
    overflow-y: auto;
    /* Scroll independent of image */
    padding-top: 50px;
    /* Space for close button */
}

/* Keyword & Tag styling */
.keyword-link {
    background-color: var(--button-bg);
    color: var(--button-text);
    padding: 4px 10px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.keyword-link:hover {
    background-color: var(--button-hover-bg);
}

/* Special Modals (Reports, Keywords) - simple column layout */
#reportModal .modal-content,
#keywordsModal .modal-content,
#messageModal .modal-content {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    max-width: 600px;
    padding: 30px;
    overflow-y: auto;
}

#keywordCloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-center {
        order: 1;
    }

    .header-left {
        order: 2;
        width: 100%;
    }

    .header-right {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        flex-direction: column;
        height: 100%;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .modal-left {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
        max-height: 60vh;
    }

    .modal-image-full {
        max-height: 45vh;
    }

    .modal-right {
        flex: 1;
        padding: 15px;
    }

    .index,
    .gallery-grid,
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Favorite Message Animation */
.fav-message {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.fav-message.show {
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(5px);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(5px);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Blocked Keywords & Tag Wrapper Styling --- */

/* Wrapper for keyword + block button in Modal */
.keyword-tag-wrapper {
    display: inline-flex;
    align-items: center;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-right: 6px;
    margin-bottom: 6px;
    vertical-align: middle;
    transition: background-color 0.2s;
}

.keyword-tag-wrapper:hover {
    background-color: var(--button-hover-bg);
}

/* Override default keyword-link styles when inside wrapper */
.keyword-tag-wrapper .keyword-link {
    background: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 4px 6px 4px 10px !important;
    display: inline-block;
    color: var(--button-text);
}

.block-keyword-btn {
    padding: 4px 8px 4px 2px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.5;
    display: flex;
    align-items: center;
    color: var(--text-color);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.block-keyword-btn:hover {
    opacity: 1;
    color: var(--danger-color);
    background-color: rgba(255, 0, 0, 0.1);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Profile Page Blocked Keywords List */
#blockedKeywordsList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 6px;
    min-height: 60px;
    border: 1px solid var(--input-border);
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    padding: 4px 10px;
    border-radius: 16px;
    text-decoration: none;
    font-size: 13px;
    margin-right: 6px;
    margin-bottom: 6px;
    display: inline-block;
    border: 1px solid var(--border-color);
}

.keyword-link:hover {
    background-color: var(--button-hover-bg);
}

/* Special Modals (Reports, Keywords) - simple column layout */
#reportModal .modal-content,
#keywordsModal .modal-content,
#messageModal .modal-content {
    flex-direction: column;
    height: auto;
    max-height: 90vh;
    max-width: 600px;
    padding: 30px;
    overflow-y: auto;
}

#keywordCloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 60vh;
    overflow-y: auto;
}

/* Responsive Mobile Layout */
@media (max-width: 900px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
    }

    .header-center {
        order: 1;
    }

    .header-left {
        order: 2;
        width: 100%;
    }

    .header-right {
        order: 3;
        width: 100%;
        justify-content: center;
    }

    .modal-content {
        flex-direction: column;
        height: 100%;
        width: 100%;
        border-radius: 0;
        margin: 0;
    }

    .modal-left {
        flex: 0 0 auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        padding: 10px;
        max-height: 60vh;
    }

    .modal-image-full {
        max-height: 45vh;
    }

    .modal-right {
        flex: 1;
        padding: 15px;
    }

    .index,
    .gallery-grid,
    .reports-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
}

/* Favorite Message Animation */
.fav-message {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent-color);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    z-index: 10;
}

.fav-message.show {
    animation: fadeOut 2s forwards;
}

@keyframes fadeOut {
    0% {
        opacity: 1;
        transform: translateX(-50%) translateY(5px);
    }

    70% {
        opacity: 1;
        transform: translateX(-50%) translateY(5px);
    }

    100% {
        opacity: 0;
        transform: translateX(-50%) translateY(0);
    }
}

/* --- Blocked Keywords & Tag Wrapper Styling --- */

/* Wrapper for keyword + block button in Modal */
.keyword-tag-wrapper {
    display: inline-flex;
    align-items: center;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    margin-right: 6px;
    margin-bottom: 6px;
    vertical-align: middle;
    transition: background-color 0.2s;
}

.keyword-tag-wrapper:hover {
    background-color: var(--button-hover-bg);
}

/* Override default keyword-link styles when inside wrapper */
.keyword-tag-wrapper .keyword-link {
    background: none !important;
    border: none !important;
    margin: 0 !important;
    padding: 4px 6px 4px 10px !important;
    display: inline-block;
    color: var(--button-text);
}

.block-keyword-btn {
    padding: 4px 8px 4px 2px;
    cursor: pointer;
    font-size: 12px;
    opacity: 0.5;
    display: flex;
    align-items: center;
    color: var(--text-color);
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.block-keyword-btn:hover {
    opacity: 1;
    color: var(--danger-color);
    background-color: rgba(255, 0, 0, 0.1);
    border-top-right-radius: 16px;
    border-bottom-right-radius: 16px;
}

/* Profile Page Blocked Keywords List */
#blockedKeywordsList {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 15px;
    padding: 15px;
    background: var(--input-bg);
    border-radius: 6px;
    min-height: 60px;
    border: 1px solid var(--input-border);
}

.keyword-tag {
    display: inline-flex;
    align-items: center;
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    color: var(--text-color);
}

.remove-keyword {
    margin-left: 8px;
    cursor: pointer;
    color: #999;
    font-weight: bold;
    font-size: 1.2rem;
    line-height: 1;
    padding: 0 4px;
    transition: color 0.2s;
}

.remove-keyword:hover {
    color: var(--danger-color);
}

/* Keyword Picker (Collapsible) */
.keyword-picker-item {
    display: inline-block;
    padding: 6px 12px;
    margin: 4px;
    background-color: var(--button-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
    user-select: none;
}

.keyword-picker-item:hover {
    background-color: var(--button-hover-bg);
}

.keyword-picker-item.blocked {
    background-color: var(--danger-color);
    color: white;
    border-color: var(--danger-hover-color);
}

.keyword-picker-item.blocked:hover {
    background-color: var(--danger-hover-color);
}

/* --- Profile Page Layout --- */
.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.profile-card {
    background-color: var(--container-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    height: 100%;
    /* Equal height cards */
    display: flex;
    flex-direction: column;
}

.profile-card h2 {
    margin-top: 0;
    font-size: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.profile-card p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

body.dark-mode .profile-card p {
    color: #aaa;
}

.profile-card .card-content {
    flex-grow: 1;
}

.profile-card .card-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    text-align: right;
}

.profile-section-header {
    grid-column: 1 / -1;
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--text-color);
}