/* ── Tag Input & Management ── */
.tag-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag-input {
    flex: 1;
    padding: 0.5rem;
    border: 2px solid #b8860b;
    border-radius: 6px;
    font-size: 0.9rem;
}

.add-tag-btn {
    padding: 0.5rem 1rem;
    background: #8b4513;
    color: #ffd700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.add-tag-btn:hover {
    background: #a0522d;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #2c1810;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.tag-item:hover {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
}

.tag-remove {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 0.8rem;
    padding: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-remove:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* ── Tag Management Modal ── */
.tag-mgmt-search-bar {
    padding: 0 1.5rem 1rem;
}

.tag-mgmt-search-bar input {
    width: 100%;
    padding: 0.6rem 0.8rem;
    border: 2px solid #b8860b;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.6);
    color: #2c1810;
    font-size: 0.9rem;
}

.tag-mgmt-search-bar input::placeholder {
    color: #8b7355;
}

.tag-mgmt-list {
    max-height: 400px;
    overflow-y: auto;
    padding: 0 1.5rem;
}

.tag-mgmt-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.8rem;
    border-bottom: 1px solid rgba(184, 134, 11, 0.15);
    transition: background 0.15s ease;
}

.tag-mgmt-row:hover {
    background: rgba(218, 165, 32, 0.08);
}

.tag-mgmt-info {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex: 1;
    min-width: 0;
}

.tag-mgmt-name {
    font-size: 0.95rem;
    color: #2c1810;
    font-weight: 600;
}

.tag-mgmt-count {
    font-size: 0.75rem;
    color: #8b4513;
    white-space: nowrap;
}

.tag-mgmt-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}

.tag-mgmt-btn {
    background: none;
    border: 1px solid transparent;
    color: #b8860b;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.tag-mgmt-btn:hover {
    background: rgba(218, 165, 32, 0.15);
    border-color: rgba(184, 134, 11, 0.3);
}

.tag-mgmt-delete:hover {
    color: #dc3545;
    border-color: rgba(220, 53, 69, 0.3);
    background: rgba(220, 53, 69, 0.1);
}

.tag-mgmt-save:hover {
    color: #28a745;
    border-color: rgba(40, 167, 69, 0.3);
    background: rgba(40, 167, 69, 0.1);
}

.tag-mgmt-rename-input {
    padding: 0.3rem 0.6rem;
    border: 2px solid #daa520;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.6);
    color: #2c1810;
    font-size: 0.95rem;
    width: 100%;
    max-width: 200px;
}

.tag-mgmt-loading,
.tag-mgmt-empty {
    text-align: center;
    padding: 2rem;
    color: #8b7355;
    font-style: italic;
}

.tag-mgmt-footer {
    padding: 1rem 1.5rem;
    text-align: right;
    border-top: 1px solid rgba(184, 134, 11, 0.15);
}

/* ── Profile Section ── */
.profile-content {
    max-height: 70vh;
    overflow-y: auto;
}

.profile-picture-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    border: 1px solid #b8860b;
}

.current-avatar {
    width: 4rem;
    height: 4rem;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(139, 69, 19, 0.1);
    color: #8b4513;
    font-size: 2rem;
}

.current-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.newsletter-section {
    background: rgba(255, 255, 255, 0.3);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #b8860b;
    margin-top: 1rem;
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 0.8rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    border: 1px solid #b8860b;
    transition: all 0.3s ease;
}

.checkbox-item:hover {
    background: rgba(218, 165, 32, 0.1);
}

.checkbox-item input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: #8b4513;
}

/* Custom NSFW toggle checkbox */
#nsfw-blur-toggle {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 22px !important;
    height: 22px !important;
    background: #f5f0e6;
    border: 2px solid #8b4513;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

#nsfw-blur-toggle:hover {
    background: #efe8d8;
    border-color: #6b3410;
}

#nsfw-blur-toggle:checked {
    background: #5d4037;
    border-color: #8b4513;
}

#nsfw-blur-toggle:checked::after {
    content: '✕';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #ffd700;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
}

#nsfw-blur-toggle:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 134, 11, 0.3);
}

.profile-section {
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.danger-zone {
    background: rgba(220, 53, 69, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #dc3545;
}

.profile-header-section {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    margin-bottom: 2rem;
}

.profile-header-section h3 {
    margin: 0;
    color: #8b4513;
    font-family: 'Cinzel', serif;
}

.profile-header-section p {
    margin: 0.3rem 0;
    color: #2c1810;
}

.user-content-section {
    margin-top: 2rem;
}

.user-content-section h3 {
    color: #8b4513;
    font-family: 'Cinzel', serif;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b8860b;
}

.no-data {
    text-align: center;
    color: #666;
    padding: 2rem;
    font-style: italic;
}

.view-user-actions {
    margin-top: 1rem;
}

#profile-view-mode.hidden,
#profile-edit-mode.hidden {
    display: none;
}

.avatar-upload-options {
    width: 100%;
}

#upload-custom-avatar-btn {
    margin-bottom: 0.5rem;
}

/* ── Content Interactions ── */
.content-interactions {
    margin: 2rem 0;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 12px;
    border-top: 3px solid #b8860b;
}

.interaction-section {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.like-content-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.like-content-btn i {
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.like-content-btn.liked i {
    color: #dc3545;
    animation: pulse 0.3s ease-out;
}

.like-content-btn:hover i {
    transform: scale(1.2);
}

.like-count {
    font-weight: 600;
}

.btn-text {
    background: none;
    border: none;
    color: #8b4513;
    cursor: pointer;
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.btn-text:hover {
    color: #daa520;
}

.btn-text i {
    font-size: 0.9rem;
}


/* ── Newsletter ── */
.newsletter-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.newsletter-create-section,
.newsletter-list-section {
    background: linear-gradient(135deg, #f8f4e6 0%, #e8dcc0 100%);
    border: 2px solid #b8860b;
    border-radius: 12px;
    padding: 1.5rem;
}

.newsletter-create-section h3,
.newsletter-list-section h3 {
    color: #8b4513;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(184, 134, 11, 0.3);
}

.newsletters-list {
    max-height: 400px;
    overflow-y: auto;
}

.no-newsletters {
    text-align: center;
    padding: 2rem;
    color: #8b4513;
    font-style: italic;
}

.newsletter-card {
    background: white;
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.newsletter-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

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

.newsletter-header h4 {
    margin: 0;
    color: #8b4513;
    font-size: 1.1rem;
}

.newsletter-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.newsletter-status.draft {
    background: #ffeeba;
    color: #856404;
}

.newsletter-status.sent {
    background: #d4edda;
    color: #155724;
}

.newsletter-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.newsletter-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

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

#newsletter-editor-en,
#newsletter-editor-de,
#newsletter-editor-ko {
    min-height: 200px;
    max-height: 400px;
    overflow-y: auto;
    background: white;
    border: 2px solid #d4a574;
    border-radius: 8px;
    padding: 1rem;
}

#newsletter-modal .language-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

#newsletter-modal .lang-tab {
    padding: 0.5rem 1rem;
    border: 2px solid #d4a574;
    background: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    font-weight: 500;
}

#newsletter-modal .lang-tab.active {
    background: linear-gradient(135deg, #8b4513 0%, #a0522d 100%);
    color: #ffd700;
    border-color: #8b4513;
}

#newsletter-modal .lang-content {
    display: none;
}

#newsletter-modal .lang-content.active {
    display: block;
}

/* ── User Profile View ── */
.user-profile-content {
    padding: 1rem;
}

.profile-info {
    display: flex;
    gap: 2rem;
    padding: 2rem;
    background: linear-gradient(135deg, #f8f4e6 0%, #e8dcc0 100%);
    border: 3px solid #b8860b;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.profile-avatar-large {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #b8860b;
    display: block;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    flex-shrink: 0;
    position: relative;
}

.profile-avatar-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-avatar-large i {
    font-size: 4rem;
    color: #ffd700;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.profile-details {
    flex: 1;
}

.profile-details h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.profile-member-since {
    color: #666;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.profile-section h3 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #b8860b;
}

.clickable-username, .clickable-avatar {
    cursor: pointer;
    transition: all 0.2s ease;
}

.clickable-username:hover {
    color: #b8860b;
    text-decoration: underline;
}

.clickable-avatar:hover {
    transform: scale(1.05);
    opacity: 0.8;
}


.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    background: linear-gradient(135deg, #daa520 0%, #b8860b 100%);
    color: #2c1810;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.admin-badge i {
    font-size: 0.7rem;
}

/* ── Animations ── */
@keyframes slideInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* ── ToS / Privacy / Impressum ── */
.tos-content,
.privacy-content,
.impressum-content {
    padding: 1.5rem;
    max-height: 60vh;
    overflow-y: auto;
}

.tos-content h3,
.privacy-content h3,
.impressum-content h3,
.impressum-content h4 {
    font-family: 'Cinzel', serif;
    color: #8b4513;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

.tos-content h3,
.privacy-content h3 {
    font-size: 1.3rem;
    border-bottom: 2px solid #b8860b;
    padding-bottom: 0.5rem;
}

.impressum-content h3 {
    font-size: 1.4rem;
    margin-top: 0;
}

.impressum-content h4 {
    font-size: 1.1rem;
}

.tos-content p,
.privacy-content p,
.impressum-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
    color: #2c1810;
}

.tos-content .last-updated,
.privacy-content .last-updated {
    margin-top: 2rem;
    font-size: 0.9rem;
    color: #8b6b4a;
    font-style: italic;
}

.impressum-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(248, 244, 230, 0.5);
    border-radius: 10px;
    border-left: 4px solid #b8860b;
}

.impressum-content a {
    color: #8b4513;
    text-decoration: underline;
}

.impressum-content a:hover {
    color: #daa520;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .content-interactions {
        padding: 1rem;
    }

    .interaction-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .report-filters {
        flex-direction: column;
    }

    .filter-reports-btn {
        width: 100%;
    }

    .report-actions {
        flex-direction: column;
    }

    .report-actions .btn {
        width: 100%;
        min-width: auto;
    }

    .checkbox-group {
        grid-template-columns: 1fr;
    }
}
