/* ===================================================================
   ArtSite Design System - Clean & Organized
   =================================================================== */

/* ===================================================================
   CSS Variables & Color System
   =================================================================== */
:root {
    /* Primary Colors (Indigo) */
    --primary-900: #1e1b4b;
    --primary-800: #312e81;
    --primary-700: #3730a3;
    --primary-600: #4338ca;
    --primary-500: #6366f1;
    --primary-400: #818cf8;
    --primary-300: #a5b4fc;
    --primary-200: #c7d2fe;
    --primary-100: #e0e7ff;
    --primary-50: #f0f4ff;

    /* Secondary Colors (Orange) */
    --secondary-900: #7c2d12;
    --secondary-800: #9a3412;
    --secondary-700: #c2410c;
    --secondary-600: #ea580c;
    --secondary-500: #f97316;
    --secondary-400: #fb923c;
    --secondary-300: #fdba74;
    --secondary-200: #fed7aa;
    --secondary-100: #ffedd5;
    --secondary-50: #fff7ed;

    /* Neutral Colors */
    --gray-900: #111827;
    --gray-800: #1f2937;
    --gray-700: #374151;
    --gray-600: #4b5563;
    --gray-500: #6b7280;
    --gray-400: #9ca3af;
    --gray-300: #d1d5db;
    --gray-200: #e5e7eb;
    --gray-100: #f3f4f6;
    --gray-50: #f9fafb;

    /* Semantic Colors */
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --danger-dark: #e74c3c;
    --info: #3b82f6;

    /* Glow Effects */
    --glow-color: 16, 185, 129;

    /* Layout */
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --border-radius-xl: 20px;
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===================================================================
   Dark Theme (Default)
   =================================================================== */
:root, [data-theme="dark"] {
    --bg-primary: #0e1a27;
    --bg-secondary: #162029;
    --bg-tertiary: #1e2832;
    --bg-card: #253142;
    --bg-overlay: rgba(37, 49, 66, 0.95);

    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --text-accent: var(--accent-color, #10b981);

    /* Theme-aware opacity backgrounds for accent color */
    --accent-bg-5: color-mix(in srgb, var(--text-accent) 5%, transparent);
    --accent-bg-10: color-mix(in srgb, var(--text-accent) 10%, transparent);
    --accent-bg-15: color-mix(in srgb, var(--text-accent) 15%, transparent);
    --accent-bg-25: color-mix(in srgb, var(--text-accent) 25%, transparent);

    --border-color: #334155;
    --border-hover: #475569;

    --shadow-sm: 0 1px 2px 0 color-mix(in srgb, var(--text-accent) 20%, transparent);
    --shadow: 0 4px 6px -1px color-mix(in srgb, var(--text-accent) 15%, transparent), 0 2px 4px -1px color-mix(in srgb, var(--text-accent) 10%, transparent);
    --shadow-lg: 0 10px 15px -3px color-mix(in srgb, var(--text-accent) 25%, transparent), 0 4px 6px -2px color-mix(in srgb, var(--text-accent) 15%, transparent);
    --shadow-xl: 0 20px 25px -5px color-mix(in srgb, var(--text-accent) 30%, transparent), 0 10px 10px -5px color-mix(in srgb, var(--text-accent) 20%, transparent);

    --gradient-primary: var(--accent-gradient-primary, linear-gradient(135deg, #10b981 0%, #059669 100%));
    --gradient-secondary: var(--accent-gradient-secondary, linear-gradient(135deg, #34d399 0%, #10b981 100%));
    --gradient-hero: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 50%, var(--bg-tertiary) 100%);
}

/* ===================================================================
   Light Pastel Theme
   =================================================================== */
[data-theme="light"] {
    --bg-primary: #fef7f0;
    --bg-secondary: #fef2f2;
    --bg-tertiary: #f0fdf4;
    --bg-card: #ffffff;
    --bg-overlay: rgba(255, 255, 255, 0.95);

    --text-primary: #374151;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-accent: var(--accent-color, #f97316);

    /* Theme-aware opacity backgrounds for accent color */
    --accent-bg-5: color-mix(in srgb, var(--text-accent) 5%, transparent);
    --accent-bg-10: color-mix(in srgb, var(--text-accent) 10%, transparent);
    --accent-bg-15: color-mix(in srgb, var(--text-accent) 15%, transparent);
    --accent-bg-25: color-mix(in srgb, var(--text-accent) 25%, transparent);

    --border-color: #fecaca;
    --border-hover: #fca5a5;

    --shadow-sm: 0 1px 2px 0 color-mix(in srgb, var(--text-accent) 20%, transparent);
    --shadow: 0 4px 6px -1px color-mix(in srgb, var(--text-accent) 15%, transparent), 0 2px 4px -1px color-mix(in srgb, var(--text-accent) 10%, transparent);
    --shadow-lg: 0 10px 15px -3px color-mix(in srgb, var(--text-accent) 25%, transparent), 0 4px 6px -2px color-mix(in srgb, var(--text-accent) 15%, transparent);
    --shadow-xl: 0 20px 25px -5px color-mix(in srgb, var(--text-accent) 30%, transparent), 0 10px 10px -5px color-mix(in srgb, var(--text-accent) 20%, transparent);

    --gradient-primary: var(--accent-gradient-primary, linear-gradient(135deg, #fbbf24 0%, #f97316 50%, #f472b6 100%));
    --gradient-secondary: var(--accent-gradient-secondary, linear-gradient(135deg, #a7f3d0 0%, #6ee7b7 50%, #34d399 100%));
    --gradient-hero: linear-gradient(135deg, #fef7f0 0%, #fef2f2 30%, #f0fdf4 70%, #ecfdf5 100%);
}

/* ===================================================================
   Base Styles & Reset
   =================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: var(--font-family), sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
}

body {
    background: var(--gradient-hero);
    background-attachment: fixed;
}

#app {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================================================
   Typography
   =================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    margin: 0;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    outline: none;
}

h1:focus, h2:focus, h3:focus, h4:focus, h5:focus, h6:focus, main:focus {
    outline: none;
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.25rem;
}

h3 {
    font-size: 1.875rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1.125rem;
}

p {
    color: var(--text-secondary);
    margin: 0;
}

.text-muted {
    color: var(--text-muted);
}

.text-accent {
    color: var(--text-accent);
}

/* ===================================================================
   Layout Utilities
   =================================================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.container-wide {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.flex {
    display: flex;
}

.flex-1 {
    flex: 1;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-center {
    justify-content: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.py-8 {
    padding: 2rem 0;
}

.py-12 {
    padding: 3rem 0;
}

/* ===================================================================
   Navigation
   =================================================================== */
.navbar {
    background: var(--bg-overlay);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: all 0.3s ease;
}

.navbar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 900;
    text-decoration: none;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    position: relative;
}

.navbar-brand:hover {
    transform: scale(1.05);
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--border-radius);
    padding: 2px;
    background: var(--gradient-primary);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.navbar-brand:hover::before {
    opacity: 0.3;
}

.brand-icon {
    font-size: 2rem;
    display: inline-block;
    margin-right: 0.5rem;
    filter: drop-shadow(0 2px 8px rgba(var(--glow-color), 0.6));
    animation: gentle-glow 4s ease-in-out infinite alternate;
    vertical-align: middle;
    line-height: 1;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.brand-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    letter-spacing: -0.025em;
}

@keyframes gentle-glow {
    0% {
        filter: drop-shadow(0 2px 8px rgba(var(--glow-color), 0.6));
        transform: scale(1);
    }
    100% {
        filter: drop-shadow(0 4px 12px rgba(var(--glow-color), 0.8));
        transform: scale(1.02);
    }
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link {
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--text-accent);
    background: var(--accent-bg-10);
    transform: translateY(-1px);
}

.nav-link:active {
    transform: translateY(0);
}

.nav-link.active {
    color: var(--text-accent);
    background: var(--accent-bg-15);
    font-weight: 600;
}

.nav-user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logout-btn {
    padding: 0.75rem 1rem !important;
    color: var(--danger) !important;
    font-weight: 500;
}

.logout-btn:hover {
    color: white !important;
    background: var(--danger) !important;
    transform: translateY(-1px);
}

/* ===================================================================
   Cards
   =================================================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--accent-bg-5);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

/* ===================================================================
   Buttons
   =================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--border-radius);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    min-height: 2.5rem;
}

.btn:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.btn-primary:hover {
    background: var(--gradient-secondary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
    background: var(--gradient-secondary);
    color: white;
    box-shadow: var(--shadow-sm);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    font-weight: 700;
}

.btn-secondary:hover {
    background: var(--gradient-primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--text-accent);
    border: 2px solid var(--text-accent);
}

.btn-outline:hover {
    background: var(--text-accent);
    color: white;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    min-height: 2rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    min-height: 3rem;
}

/* ===================================================================
   Theme Switcher
   =================================================================== */
.theme-switcher {
    top: 1rem;
    right: 5rem;
    z-index: 1000;
    display: flex;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.theme-toggle {
    width: 2.5rem;
    height: 2.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.3s ease;
    border-radius: var(--border-radius);
}

.theme-toggle:hover {
    color: var(--text-primary);
    background: var(--bg-secondary);
}

.theme-toggle.active {
    color: white;
    background: var(--gradient-primary);
}

[data-theme="light"] .theme-toggle.active {
    background: var(--gradient-primary);
}

/* ===================================================================
   Accent Color Picker
   =================================================================== */
.accent-picker-container {
    position: relative;
    z-index: 1000;
}

.accent-picker-toggle {
    width: 3rem;
    height: 3rem;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.accent-picker-toggle:hover {
    transform: scale(1.1);
    border-color: var(--text-accent);
    box-shadow: var(--shadow-lg);
}

.accent-picker-flyout {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1rem;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    min-width: 220px;
    animation: flyout-enter 0.2s ease-out;
}

@keyframes flyout-enter {
    from {
        opacity: 0;
        transform: translateY(-0.5rem) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.accent-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.accent-picker-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.accent-picker-close {
    width: 1.5rem;
    height: 1.5rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.accent-picker-close:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

.accent-picker-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.accent-option {
    width: 2.5rem;
    height: 2.5rem;
    border: 2px solid transparent;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
}

.accent-option:hover {
    transform: scale(1.1);
    border-color: var(--border-hover);
}

.accent-option.active {
    border-color: var(--text-accent);
    background: var(--bg-secondary);
    transform: scale(1.05);
}

/* ===================================================================
   Features Grid
   =================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    margin-bottom: 4rem;
}

.cta-section {
    margin-top: 4rem;
}

.feature-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.feature-card .card-body {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

/* ===================================================================
   Characters & Avatars
   =================================================================== */
.character-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
    color: var(--text-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.custom-theater-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.theater-masks {
    display: flex;
    gap: 4px;
    transform: rotate(-10deg);
}

.mask {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
}

.mask.happy {
    transform: rotate(5deg);
}

.mask.sad {
    transform: rotate(-5deg);
}

.character-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
}

.character-card {
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.character-card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.character-card .card-footer {
    margin-top: auto;
}

.character-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

/* ===================================================================
   Badges
   =================================================================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.badge-species {
    background: var(--accent-bg-15);
    color: var(--text-accent);
    border: 1px solid var(--text-accent);
}

.badge-gender {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: #3b82f6;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
    border-color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border-color: var(--danger);
}

/* ===================================================================
   Profile Page
   =================================================================== */
.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-fallback {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-accent);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.highlight-card {
    position: relative;
    background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-secondary) 100%);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.highlight-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border-radius: inherit;
    background: var(--gradient-primary);
    z-index: -1;
    opacity: 0.7;
}

.highlight-border {
    border: 2px solid var(--text-accent);
    position: relative;
}

.highlight-border::after {
    content: '⭐';
    position: absolute;
    top: 4px;
    right: 4px;
    background: var(--gradient-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    box-shadow: var(--shadow);
}

/* ===================================================================
   Form Grids
   =================================================================== */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

/* ===================================================================
   Forms & Inputs
   =================================================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    background: var(--bg-card);
    color: var(--text-primary);
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px var(--accent-bg-10);
}

.form-input:focus-visible {
    outline: 2px solid var(--primary-400);
    outline-offset: 2px;
}

.form-textarea {
    min-height: 120px;
    resize: vertical;
}

.form-help {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-accent);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb-separator::before {
    content: '›';
    color: var(--text-muted);
    margin: 0 0.5rem;
}

/* ===================================================================
   Navigation Dropdown Styles
   =================================================================== */
.nav-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    background: none;
    border: none;
}

.dropdown-arrow {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    color: inherit;
}

.nav-dropdown:hover .dropdown-arrow,
.nav-dropdown.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(20px);
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.2s ease;
    pointer-events: none;
}

.dropdown-menu.show {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    font-weight: 500;
    border-radius: var(--border-radius);
    margin: 0.25rem;
}

.dropdown-item:first-child {
    margin-top: 0.5rem;
}

.dropdown-item:last-child {
    margin-bottom: 0.5rem;
}

.dropdown-item:hover {
    color: var(--text-primary);
    background: var(--accent-bg-10);
    transform: translateX(4px);
    text-decoration: none;
}

.dropdown-item:active {
    transform: translateX(2px);
}

.dropdown-icon {
    font-size: 1.1rem;
    width: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: inherit;
}

/* Light theme specific adjustments */
[data-theme="light"] .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="light"] .dropdown-item {
    color: var(--text-secondary);
}

[data-theme="light"] .dropdown-item:hover {
    background: var(--accent-bg-10);
    color: var(--text-primary);
}

/* Dark theme specific adjustments */
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .dropdown-item {
    color: var(--text-secondary);
}

[data-theme="dark"] .dropdown-item:hover {
    background: var(--accent-bg-15);
    color: var(--text-primary);
}

/* Responsive behavior */
@media (max-width: 768px) {
    .dropdown-menu {
        position: fixed;
        top: 60px;
        left: 1rem;
        right: 1rem;
        width: auto;
        min-width: 0;
    }
}

.loading {
    width: 2rem;
    height: 2rem;
    border: 2px solid var(--border-color);
    border-top: 2px solid var(--text-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-lg {
    width: 3rem;
    height: 3rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.animate-fade-in {
    animation: fade-in 0.5s ease-out;
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(1rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===================================================================
   Responsive Design
   =================================================================== */
@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

    .navbar-content {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-nav {
        justify-content: center;
        width: 100%;
    }

    .character-grid {
        grid-template-columns: 1fr;
    }

    .theme-switcher {
        top: 1rem;
        left: 1rem;
        right: auto;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 3rem;
    }

    .cta-section {
        margin-top: 3rem;
    }
}

/* ===================================================================
   Timeline Styling - Complete Overhaul
   =================================================================== */
.timeline-container {
    width: 100%;
}

.timeline {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 1rem;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(to bottom, var(--text-accent), var(--border-color));
    border-radius: 1.5px;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 1rem;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -1.75rem;
    top: 0.5rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--bg-card);
    border: 3px solid var(--text-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    box-shadow: var(--shadow);
    z-index: 1;
    color: var(--text-accent);
}

.timeline-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 1rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 8px 8px 8px 0;
    border-color: transparent var(--border-color) transparent transparent;
}

.timeline-content::after {
    content: '';
    position: absolute;
    left: -6px;
    top: 1.125rem;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 6px 6px 6px 0;
    border-color: transparent var(--bg-card) transparent transparent;
}

.timeline-content:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.timeline-title-section {
    flex: 1;
}

.timeline-title {
    margin: 0 0 0.25rem 0;
    color: var(--text-primary);
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
}

.timeline-date {
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 500;
    background: var(--bg-secondary);
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
}

.timeline-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.timeline-actions .btn {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    min-height: auto;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.timeline-actions .btn:hover {
    transform: translateY(-1px);
}

.timeline-description {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-style: italic;
    line-height: 1.6;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: var(--border-radius);
    border-left: 4px solid var(--text-accent);
}

.timeline-story {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.story-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.story-text {
    color: var(--text-secondary);
    line-height: 1.7;
    white-space: pre-wrap;
    margin: 0;
}

.timeline-artworks {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
}

.artworks-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.artworks-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
}

.timeline-artworks .artwork-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem;
    transition: transform 0.2s ease;
}

.timeline-artworks .artwork-item:hover {
    transform: translateY(-2px);
}

.timeline-artworks .artwork-placeholder {
    width: 40px;
    height: 40px;
    background: var(--bg-tertiary);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
}

.timeline-artworks .artwork-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-primary);
    margin: 0;
}

/* Timeline Empty State */
.timeline-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: var(--text-muted);
}

.timeline-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.timeline-empty p {
    margin: 0;
    font-size: 1.1rem;
}

/* Timeline Add Button */
.timeline-add-button {
    margin-top: 2rem;
    text-align: center;
    padding-top: 2rem;
    border-top: 2px dashed var(--border-color);
}

.timeline-add-button .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    border-radius: var(--border-radius-lg);
}

/* Timeline Modal Overhaul - Fixed Positioning */
.modal-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px) !important;
    z-index: 99999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    animation: modalFadeIn 0.2s ease-out !important;
    margin: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-dialog {
    width: 100%;
    max-width: 700px;
    max-height: 90vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
    margin: 0 auto;
    position: relative;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-2rem) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--border-radius-lg) !important;
    box-shadow: var(--shadow-xl) !important;
    color: var(--text-primary) !important;
    overflow: hidden !important;
    max-height: 90vh !important;
    display: flex !important;
    flex-direction: column !important;
}

.modal-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-color) !important;
    padding: 1.5rem 2rem !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    flex-shrink: 0 !important;
}

.modal-title {
    margin: 0 !important;
    font-size: 1.25rem !important;
    font-weight: 600 !important;
    color: var(--text-primary) !important;
    display: flex !important;
    align-items: center !important;
}

.modal-close {
    background: none !important;
    border: none !important;
    color: var(--text-muted) !important;
    font-size: 1.25rem !important;
    cursor: pointer !important;
    padding: 0.5rem !important;
    border-radius: var(--border-radius) !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
}

.modal-close:hover {
    color: var(--text-primary) !important;
    background: var(--bg-tertiary) !important;
}

/* ===================================================================
   Tabs & Text Content Styling
   =================================================================== */
.tabs {
    display: flex;
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.tabs::-webkit-scrollbar {
    display: none;
}

.tab {
    background: none;
    border: none;
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab:hover {
    color: var(--text-accent);
    background: var(--bg-secondary);
}

.tab.active {
    color: var(--text-accent);
    border-bottom-color: var(--text-accent);
    background: var(--bg-secondary);
}

.text-content {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
}

.text-lg {
    font-size: 1.125rem;
}

.text-2xl {
    font-size: 1.5rem;
}

.font-bold {
    font-weight: 700;
}

.grid {
    display: grid;
    gap: 1rem;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.lg\:grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.gap-4 {
    gap: 1rem;
}

.gap-6 {
    gap: 1.5rem;
}

.text-sm {
    font-size: 0.875rem;
}

.text-muted {
    color: var(--text-muted);
}

.link {
    color: var(--text-accent);
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: underline;
}

.items-center {
    align-items: center;
}

@media (max-width: 768px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }

    .lg\:grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .tabs {
        gap: 0;
    }

    .tab {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }
}

.modal-body {
    padding: 2rem !important;
    overflow-y: auto !important;
    flex: 1 !important;
}

.modal-footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-color) !important;
    padding: 1rem 2rem !important;
    display: flex !important;
    justify-content: flex-end !important;
    gap: 1rem !important;
    flex-shrink: 0 !important;
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group-full {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
}

.form-control,
.form-select {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px var(--accent-bg-15);
    background: var(--bg-card);
}

.story-textarea {
    min-height: 150px;
    resize: vertical;
    font-family: var(--font-family);
    line-height: 1.6;
}

/* Characters Grid */
.characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.character-checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.character-checkbox:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-accent);
}

.character-checkbox input[type="checkbox"] {
    margin: 0;
    accent-color: var(--text-accent);
}

.character-checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin: 0;
}

/* Timeline Modal - Simplified Structure */
.timeline-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.timeline-modal-container {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateY(-2rem) scale(0.95);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}

.timeline-modal-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.timeline-modal-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.timeline-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: var(--border-radius);
    transition: all 0.2s ease;
}

.timeline-modal-close:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.timeline-modal-body {
    padding: 2rem;
    max-height: 60vh;
    overflow-y: auto;
}

.timeline-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.timeline-form-group {
    display: flex;
    flex-direction: column;
}

.timeline-form-full {
    grid-column: 1 / -1;
}

.timeline-form-group label {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.timeline-form-input {
    background: var(--bg-secondary);
    border: 2px solid var(--border-color);
    color: var(--text-primary);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.timeline-form-input:focus {
    outline: none;
    border-color: var(--text-accent);
    box-shadow: 0 0 0 3px var(--accent-bg-15);
    background: var(--bg-card);
}

.timeline-form-textarea {
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

.timeline-characters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.timeline-character-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all 0.2s ease;
}

.timeline-character-option:hover {
    background: var(--bg-tertiary);
    border-color: var(--text-accent);
}

.timeline-character-option input[type="checkbox"] {
    margin: 0;
    accent-color: var(--text-accent);
}

.timeline-character-option span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.timeline-modal-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Responsive */
@media (max-width: 768px) {
    .timeline-form-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .timeline-modal-container {
        max-width: 95vw;
        margin: 0.5rem;
    }

    .timeline-modal-header,
    .timeline-modal-body,
    .timeline-modal-footer {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .timeline-characters-grid {
        grid-template-columns: 1fr;
    }
}

/* ===================================================================
   Modal Styling
   =================================================================== */
.modal {
    backdrop-filter: blur(5px);
    z-index: 1050;
}

.modal-content {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-xl);
    color: var(--text-primary);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.modal-title {
    color: var(--text-primary);
    font-weight: 600;
}

.modal-body {
    background: var(--bg-card);
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    background: var(--bg-secondary);
}

.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.7;
}

.btn-close:hover {
    opacity: 1;
}

/* Form styling within modals */
.modal .form-label {
    color: var(--text-primary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.modal .form-control,
.modal .form-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal .form-control:focus,
.modal .form-select:focus {
    background: var(--bg-secondary);
    border-color: var(--text-accent);
    color: var(--text-primary);
    box-shadow: 0 0 0 0.2rem var(--accent-bg-25);
}

.modal .form-check-input {
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

.modal .form-check-input:checked {
    background-color: var(--text-accent);
    border-color: var(--text-accent);
}

.modal .form-check-label {
    color: var(--text-secondary);
}

/* ===================================================================
   Character Detail Page Styling
   =================================================================== */
.character-detail-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

.error-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
}

/* Character Header */
.character-header {
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.breadcrumb-nav {
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 2;
}

.breadcrumb {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    margin: 0;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    color: var(--text-muted);
    margin: 0 0.75rem;
    font-weight: bold;
}

.breadcrumb-item a {
    color: var(--text-accent);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
}

.breadcrumb-item a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.breadcrumb-item.active {
    color: var(--text-secondary);
    font-weight: 500;
}

.character-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.character-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
}

.character-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    flex-shrink: 0;
}

.character-avatar-icon {
    font-size: 3rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.character-details h1 {
    margin: 0 0 0.5rem 0;
    font-size: 2.5rem;
    font-weight: 700;
}

.character-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.character-badges .badge {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.badge-species {
    background: rgba(168, 85, 247, 0.15);
    color: var(--text-accent);
    border: 1px solid var(--text-accent);
}

.badge-gender {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
    border: 1px solid #3b82f6;
}

.character-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-danger {
    background: var(--danger);
    color: white;
    box-shadow: var(--shadow);
}

.btn-danger:hover {
    background: var(--danger-dark);
    box-shadow: var(--shadow-lg);
}

.btn-danger-outline {
    background: transparent;
    border: 2px solid var(--danger);
    color: var(--danger);
}

.btn-danger-outline:hover {
    background: var(--danger);
    color: white;
    box-shadow: var(--shadow-lg);
}

[data-theme="light"] .btn-danger {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .btn-danger-outline {
    color: white;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.character-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Character Content */
.character-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 3rem;
}

.character-main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Character Sections */
.character-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.character-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.section-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
}

.section-content {
    padding: 2rem;
}

.empty-state {
    text-align: center;
    padding: 3rem 2rem;
}

.empty-state i {
    display: block;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

.biography-content {
    line-height: 1.8;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Artwork Grid */
.artwork-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 1.5rem;
}

.artwork-item {
    display: flex;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex-direction: column;
    justify-content: space-between;

}

.artwork-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.artwork-item .artwork-placeholder {
    height: 150px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 1.5rem;
}

.artwork-info {
    padding: 1rem;
}

.artwork-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.9rem;
}

.artwork-date {
    color: var(--text-muted);
    font-size: 0.8rem;
}

/* Character Sidebar */
.character-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-section {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.sidebar-title {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    -webkit-text-fill-color: unset;
}

.sidebar-content {
    padding: 1.5rem;
}

.detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 20px;
    border-bottom: 1px solid var(--border-color);
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
}

.detail-value {
    color: var(--text-accent);
    font-weight: 600;
}

.detail-value > a {
    color: var(--text-accent);
}

.detail-value > a:hover {
    text-decoration: underline;
    color: var(--text-muted);
}

/* Quick Stats - Fix the layout to prevent cutoff */
.sidebar-section:last-child .sidebar-content {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem 1rem;
    border-bottom: 1px solid var(--border-color);
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-accent);
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* Fix detail items layout to prevent cutoff */
.detail-item {
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-color);
    gap: 1rem;
    min-height: 2.5rem;
    padding: 0.75rem 20px;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    color: var(--text-secondary);
    font-weight: 500;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 50%;
}

.detail-value {
    color: var(--text-accent);
    font-weight: 600;
    text-align: right;
    word-wrap: break-word;
    flex: 1;
    min-width: 0;
}

/* Timeline Specific Styling */
.timeline-section .section-content {
    padding: 1rem 2rem 2rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .character-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .character-title-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }

    .character-info {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .character-actions {
        justify-content: center;
        width: 100%;
    }

    .artwork-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .sidebar-section .sidebar-content {
        grid-template-columns: 1fr;
    }

    .stat-item {
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }

    .stat-item:last-child {
        border-bottom: none;
    }
}

@media (max-width: 768px) {
    .character-detail-page {
        padding: 1rem;
    }

    .character-title-section {
        padding: 1.5rem;
    }

    .character-avatar {
        width: 80px;
        height: 80px;
    }

    .character-avatar-icon {
        font-size: 2.5rem;
    }

    .character-details h1 {
        font-size: 2rem;
    }

    .section-header {
        padding: 1rem 1.5rem;
    }

    .section-content {
        padding: 1.5rem;
    }

    .artwork-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================================================
   Print Styles
   =================================================================== */
@media print {
    .navbar, .btn, .card-footer, .theme-switcher, .accent-picker-container, .timeline-actions {
        display: none !important;
    }

    .card {
        border: 1px solid #ccc;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .timeline-content {
        border: 1px solid #ccc;
        background: white !important;
        color: black !important;
    }
}

/* ===================================================================
   Gallery Page Styling
   =================================================================== */
.gallery-page {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    min-height: 100vh;
}

.gallery-header {
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.gallery-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-xl);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
}

.gallery-info {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex: 1;
    min-width: 0;
}

.gallery-details h1 {
    margin: 0 0 0.75rem 0;
    font-size: 2.25rem;
    font-weight: 700;
    word-wrap: break-word;
    color: var(--text-primary);
}

.gallery-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.gallery-stats .stat {
    color: var(--text-secondary);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
}

.gallery-upload-btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    white-space: nowrap;
    border-radius: var(--border-radius-lg);
    transition: all 0.3s ease;
}

.gallery-upload-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Gallery Grid */
.gallery-content {
    margin-top: 2rem;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
    margin: 0;
}

.artwork-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.artwork-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
    border-color: var(--text-accent);
}

.artwork-image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: var(--bg-secondary);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.artwork-image {
    width: 100%;
    object-fit: contain;
    transition: transform 0.3s ease;
    display: block;
}

.artwork-card:hover .artwork-image {
    transform: scale(1.05);
}

.artwork-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    color: var(--text-muted);
    font-size: 2rem;
}

.artwork-overlay {
    position: absolute;
    top: 12px;
    right: 12px;
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    gap: 0.5rem;
}

.artwork-card:hover .artwork-overlay {
    opacity: 1;
    transform: translateY(-2px);
}

.artwork-overlay .btn {
    backdrop-filter: blur(8px);
    color: black;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow);
}

.card-cover-image {
    border-radius: 8px;
    width: 100%;
    object-fit: cover;
}


.mxh200 {
    max-height: 200px;
    object-fit: cover;
}

.character-avatar-img {
    width: 100px;
    height: 100px;
}

.artwork-info {
    padding: 1.5rem;
}

.artwork-title {
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
    word-wrap: break-word;
}

.artwork-description {
    margin: 0 0 1rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.artwork-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.artwork-date,
.artwork-size {
    display: flex;
    align-items: center;
}

/* Empty Gallery State */
.empty-gallery {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--bg-card);
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-xl);
    margin: 2rem 0;
}

.empty-gallery .empty-icon {
    font-size: 4rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    opacity: 0.6;
}

.no-text-fill {
    -webkit-text-fill-color: initial;
}

.empty-gallery h3 {
    margin: 0 0 1rem 0;
    color: var(--text-primary);
    font-size: 1.5rem;
}

.empty-gallery p {
    margin: 0 0 2rem 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* File Upload Area */
.file-upload-area {
    border: 2px dashed var(--border-color);
    border-radius: var(--border-radius-lg);
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: var(--bg-secondary);
    position: relative;
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--text-accent);
    background: var(--accent-bg-5);
    transform: translateY(-2px);
}

.file-input-hidden {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.file-upload-prompt .upload-text {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin: 0 0 0.5rem 0;
    font-weight: 500;
}

.file-upload-prompt .upload-hint {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0;
}

.file-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.file-preview .file-name {
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    word-break: break-all;
}

.file-preview .file-size {
    color: var(--text-muted);
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
}

/* Artwork Viewer Modal */
.artwork-viewer-overlay {
    background: rgba(0, 0, 0, 0.9) !important;
    backdrop-filter: blur(8px) !important;
}

.artwork-viewer {
    max-width: 90vw;
    max-height: 90vh;
    background: var(--bg-card);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    display: flex;
    flex-direction: column;
}

.artwork-viewer-header {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.artwork-viewer-header h4 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
}

.artwork-viewer-content {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: var(--bg-tertiary);
    min-height: 400px;
}

.artwork-viewer-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.artwork-viewer-info {
    padding: 1.5rem 2rem;
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
}

.artwork-viewer-info p {
    margin: 0;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .gallery-title-section {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
        gap: 1.5rem;
    }

    .gallery-info {
        flex-direction: column;
        text-align: center;
        width: 100%;
    }

    .gallery-upload-btn {
        align-self: center;
        width: 100%;
        justify-content: center;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }

    .gallery-stats {
        justify-content: center;
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .gallery-page {
        padding: 1rem;
    }

    .gallery-title-section {
        padding: 1.5rem;
    }

    .gallery-details h1 {
        font-size: 1.75rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1rem;
    }

    .artwork-info {
        padding: 1rem;
    }

    .file-upload-area {
        padding: 2rem 1rem;
    }

    .artwork-meta {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }

    .artwork-viewer {
        max-width: 95vw;
        max-height: 95vh;
    }

    .artwork-viewer-content {
        padding: 0.5rem;
    }

    .artwork-viewer-image {
        max-height: 60vh;
    }
}

/* Universe Cover Small */
.universe-cover-small {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: var(--border-radius);
}

/* Character Timeline Avatar */
.character-timeline-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.timeline-characters {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.characters-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.characters-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.character-link {
    text-decoration: none;
}


.character-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-accent);
    transition: transform 0.2s ease;
    border: 2px solid var(--border-color);
}

.character-avatar-placeholder:hover {
    transform: scale(1.1);
}

.timeline-characters {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: 1rem;
}

.characters-label {
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.characters-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.character-link {
    text-decoration: none;
}

.character-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--text-accent);
    transition: transform 0.2s ease;
    border: 2px solid var(--border-color);
}

.character-avatar-placeholder:hover {
    transform: scale(1.1);
}

/* Artwork Links */
.artwork-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.2s ease;
}

.artwork-link:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.artwork-link:hover .artwork-image {
    transform: scale(1.02);
}

.universe-cover-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: all 0.2s ease;
}

.universe-cover-link:hover {
    transform: scale(1.05);
}

.universe-cover-link:hover .universe-cover-small {
    transform: scale(1.05);
}

/* ===================================================================
   NSFW Content Blur System
   =================================================================== */
.nsfw-wrapper {
    position: relative;
    display: block;
    width: 100%;
}

.nsfw-wrapper.nsfw-image-wrapper {
    display: inline-block;
}

.nsfw-enabled {
    cursor: pointer;
}

.nsfw-image-wrapper {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.nsfw-text-wrapper {
    position: relative;
    display: block;
    width: 100%;
    min-height: 150px;
    overflow: hidden;
    border-radius: var(--border-radius);
}

.nsfw-text-wrapper.nsfw-enabled {
    min-height: 300px;
}

.nsfw-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
    z-index: 25;
    border-radius: inherit;
    transition: all 0.3s ease;
    min-height: 200px;
}

.nsfw-overlay:hover {
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(12px);
}

.nsfw-warning {
    text-align: center;
    color: white;
    padding: 2rem;
    max-width: 300px;
}

.nsfw-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 8px rgba(255, 255, 255, 0.3));
    animation: gentle-pulse 3s ease-in-out infinite;
}

@keyframes gentle-pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.8;
    }
}

.nsfw-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #ff6b6b;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    -webkit-text-fill-color: #ff6b6b;
}

.nsfw-message {
    font-size: 1rem;
    margin: 0 0 1.5rem 0;
    opacity: 0.9;
    line-height: 1.5;
}

.nsfw-show-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 2px solid rgba(255, 255, 255, 0.3) !important;
    color: white !important;
    backdrop-filter: blur(4px);
    transition: all 0.3s ease !important;
    font-weight: 600;
    padding: 0.75rem 1.5rem !important;
    border-radius: var(--border-radius-lg) !important;
}

.nsfw-show-btn:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

/* Content Blur Effects */
.nsfw-blurred {
    filter: blur(16px);
    transition: filter 0.3s ease;
    pointer-events: none;
    user-select: none;
    opacity: 0.3;
}

.nsfw-blurred-image {
    filter: blur(20px);
    transition: filter 0.3s ease;
    pointer-events: none;
    user-select: none;
    opacity: 0.3;
}

.nsfw-blurred-text {
    filter: blur(4px);
    transition: filter 0.3s ease;
    pointer-events: none;
    user-select: none;
    text-shadow: 0 0 8px var(--text-primary);
    opacity: 0.2;
}

/* NSFW Content Classes - Immediate blur protection (no JS dependency) */
/* Apply blur immediately to any NSFW content classes */
.nsfw-image-content img,
.nsfw-image-content picture,
.nsfw-image-content [style*="background-image"] {
    filter: blur(20px) !important;
    opacity: 0.3 !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.nsfw-text-content {
    filter: blur(4px) !important;
    opacity: 0.2 !important;
    text-shadow: 0 0 8px var(--text-primary);
    transition: filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    user-select: none;
}

.nsfw-general-content {
    filter: blur(16px) !important;
    opacity: 0.3 !important;
    transition: filter 0.3s ease, opacity 0.3s ease;
    pointer-events: none;
    user-select: none;
}

/* NSFW Overlay - Show for NSFW content, hide when revealed */
.nsfw-content-wrapper .nsfw-overlay {
    display: flex; /* Show by default */
}

.nsfw-content-wrapper:not(.nsfw-enabled) .nsfw-overlay {
    display: none; /* Hide for non-NSFW content */
}

/* Override: Remove blur and hide overlay when content is revealed */
[data-revealed="true"] .nsfw-image-content img,
[data-revealed="true"] .nsfw-image-content picture,
[data-revealed="true"] .nsfw-image-content [style*="background-image"] {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    user-select: auto;
}

[data-revealed="true"] .nsfw-text-content {
    filter: none !important;
    opacity: 1 !important;
    text-shadow: none;
    pointer-events: auto;
    user-select: auto;
}

[data-revealed="true"] .nsfw-general-content {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    user-select: auto;
}

[data-revealed="true"] .nsfw-overlay {
    display: none !important;
}

/* Remove blur when content is revealed */
[data-nsfw="true"][data-revealed="true"] .nsfw-image-content img,
[data-nsfw="true"][data-revealed="true"] .nsfw-image-content picture,
[data-nsfw="true"][data-revealed="true"] .nsfw-image-content [style*="background-image"] {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    user-select: auto;
}

[data-nsfw="true"][data-revealed="true"] .nsfw-text-content {
    filter: none !important;
    opacity: 1 !important;
    text-shadow: none;
    pointer-events: auto;
    user-select: auto;
}

[data-nsfw="true"][data-revealed="true"] .nsfw-general-content {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto;
    user-select: auto;
}

/* NSFW Badge */
.badge-nsfw {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    animation: gentle-glow-red 3s ease-in-out infinite alternate;
}

@keyframes gentle-glow-red {
    0% {
        box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
    }
    100% {
        box-shadow: 0 4px 8px rgba(255, 107, 107, 0.5);
    }
}

/* Compact NSFW Warning for Small Spaces */
.nsfw-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
    border-radius: var(--border-radius);
    color: #ff6b6b;
    font-size: 0.875rem;
    font-weight: 600;
}

.nsfw-compact-icon {
    font-size: 1rem;
}

/* Form NSFW Toggle */
.nsfw-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.nsfw-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.nsfw-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.nsfw-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-tertiary);
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    border-radius: 12px;
}

.nsfw-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background: var(--text-muted);
    transition: all 0.3s ease;
    border-radius: 50%;
}

.nsfw-toggle input:checked + .nsfw-slider {
    background: #ff6b6b;
    border-color: #ee5a24;
}

.nsfw-toggle input:checked + .nsfw-slider:before {
    transform: translateX(24px);
    background: white;
}

.nsfw-toggle-label {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.nsfw-toggle-description {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    line-height: 1.4;
}

/* Responsive NSFW Content */
@media (max-width: 768px) {
    .nsfw-warning {
        padding: 1.5rem 1rem;
        max-width: 250px;
    }

    .nsfw-icon {
        font-size: 2.5rem;
    }

    .nsfw-title {
        font-size: 1.25rem;
    }

    .nsfw-message {
        font-size: 0.875rem;
    }

    .nsfw-show-btn {
        padding: 0.625rem 1.25rem !important;
        font-size: 0.875rem !important;
    }
}

/* ===================================================================
   Creator Info Components
   =================================================================== */
.creator-info {
    margin-top: 0.5rem;
}

.creator-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.875rem;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: var(--border-radius);
}

.creator-link:hover {
    color: var(--text-accent);
    background: var(--accent-bg-10);
    text-decoration: none;
    transform: translateX(2px);
}

.creator-avatar-small {
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    background: var(--gradient-secondary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.75rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
    object-fit: cover;
}

.creator-name-small {
    font-weight: 500;
    color: inherit;
}

.creator-text {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.creator-label {
    font-size: 0.6875rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

/* Universe Card specific spacing */
.universe-card .creator-info {
    margin-bottom: 0.75rem;
}