:root {
    --bg-body: #1a1a2e;
    --bg-surface: #16213e;
    --bg-card: #1e2a4a;
    --bg-card-hover: #243352;
    --bg-input: #0f1729;
    --accent-pink: #ff6b9d;
    --accent-purple: #c084fc;
    --accent-blue: #60a5fa;
    --accent-lilac: #a78bfa;
    --text-primary: #e2e8f0;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-light: rgba(255, 255, 255, 0.12);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --gradient-primary: linear-gradient(135deg, #ff6b9d, #c084fc);
    --gradient-hero: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #1e1a3a 100%);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-pill: 50px;
}

html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html { font-size: 16px; }
}

*, *::before, *::after {
    box-sizing: border-box;
}

body {
    background-color: var(--bg-body) !important;
    color: var(--text-primary);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    min-height: 100vh;
    margin: 0;
}

a { color: var(--accent-pink); }
a:hover { color: var(--accent-purple); }

::selection {
    background: var(--accent-pink);
    color: white;
}

::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-body); }
::-webkit-scrollbar-thumb { background: var(--bg-card-hover); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--accent-purple); }

/* ===== NAVBAR ===== */
.navbar-dark-custom {
    background: rgba(22, 33, 62, 0.95) !important;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 0;
}

.navbar-brand-custom {
    font-weight: 800;
    font-size: 1.25rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-link-custom {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--radius-pill);
    transition: all 0.2s ease;
}

.nav-link-custom:hover {
    color: var(--text-primary) !important;
    background: rgba(255, 107, 157, 0.1);
}

.nav-link-custom.active {
    color: var(--accent-pink) !important;
    background: rgba(255, 107, 157, 0.15);
}

/* ===== CARDS ===== */
.card-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary);
    transition: all 0.25s ease;
}

.card-dark:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--border-light) !important;
    box-shadow: var(--shadow-card);
    transform: translateY(-2px);
}

.card-dark-static {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary);
}

/* ===== FORMULARIOS ===== */
.form-control-dark, .form-select-dark {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-pill) !important;
    padding: 0.6rem 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control-dark:focus, .form-select-dark:focus {
    border-color: var(--accent-purple) !important;
    box-shadow: 0 0 0 3px rgba(192, 132, 252, 0.15) !important;
    outline: none;
}

.form-control-dark::placeholder {
    color: var(--text-muted) !important;
}

.form-label-dark {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.35rem;
}

.form-check-input-dark:checked {
    background-color: var(--accent-pink);
    border-color: var(--accent-pink);
}

.form-switch .form-check-input-dark {
    width: 2.8em;
    height: 1.4em;
}

/* ===== BOTONES ===== */
.btn-accent {
    background: var(--gradient-primary);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    transition: all 0.25s ease;
    box-shadow: 0 4px 15px rgba(255, 107, 157, 0.3);
}

.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255, 107, 157, 0.45);
    color: white;
}

.btn-accent-outline {
    background: transparent;
    color: var(--accent-pink);
    border: 2px solid var(--accent-pink);
    border-radius: var(--radius-pill);
    font-weight: 700;
    padding: 0.5rem 1.5rem;
    transition: all 0.25s ease;
}

.btn-accent-outline:hover {
    background: rgba(255, 107, 157, 0.1);
    color: var(--accent-pink);
}

.btn-ghost {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.btn-danger-glow {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.btn-danger-glow:hover {
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
    color: white;
}

.btn-success-soft {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    border-radius: var(--radius-pill);
    font-weight: 600;
}

.btn-success-soft:hover {
    background: rgba(74, 222, 128, 0.25);
    color: #4ade80;
}

/* ===== BADGES ===== */
.badge-accent {
    background: var(--gradient-primary);
    color: white;
    font-weight: 600;
    padding: 0.35em 0.8em;
    border-radius: var(--radius-pill);
}

.badge-glass {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    font-weight: 600;
    padding: 0.35em 0.8em;
    border-radius: var(--radius-pill);
}

.badge-category {
    background: rgba(192, 132, 252, 0.15);
    color: var(--accent-purple);
    font-weight: 600;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.3em 0.7em;
    border-radius: var(--radius-pill);
}

.badge-nsfw {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.3em 0.7em;
    border-radius: var(--radius-pill);
}

.badge-success {
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
    font-weight: 700;
    font-size: 0.7rem;
    text-transform: uppercase;
    padding: 0.3em 0.7em;
    border-radius: var(--radius-pill);
}

/* ===== HERO ===== */
.hero-section {
    background: var(--gradient-hero);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(255, 107, 157, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(192, 132, 252, 0.08) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-2%, 2%); }
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.hero-title .gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    position: relative;
    z-index: 1;
}

/* ===== SECCIONES ===== */
.section-title {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* ===== GALERÍA GRID ===== */
.galeria-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all 0.3s ease;
}

.galeria-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-card);
    border-color: rgba(255, 107, 157, 0.3);
}

.galeria-card img.card-img-top {
    height: 240px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.galeria-card:hover img.card-img-top {
    transform: scale(1.03);
}

.galeria-card .card-body-custom {
    padding: 1rem;
}

.galeria-card .title-text {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.galeria-card .artist-text {
    color: var(--text-secondary);
    font-size: 0.8rem;
}

.galeria-card .stats-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 0.6rem;
    margin-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

/* ===== FILTROS / SEARCH ===== */
.search-bar {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1rem 1.25rem;
}

.filter-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-pill);
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    background: rgba(255, 107, 157, 0.1);
    border-color: rgba(255, 107, 157, 0.3);
    color: var(--accent-pink);
}

.filter-chip.active {
    background: rgba(255, 107, 157, 0.15);
    border-color: var(--accent-pink);
    color: var(--accent-pink);
}

/* ===== REACCIONES ===== */
.reactions-bar {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
}

.reaction-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
    border-radius: var(--radius-pill);
    padding: 0.3rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.reaction-btn:hover {
    background: rgba(255, 107, 157, 0.15);
    border-color: var(--accent-pink);
    color: var(--accent-pink);
    transform: scale(1.05);
}

/* ===== COMENTARIOS ===== */
.comment-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
}

.comment-item .comment-author {
    font-weight: 700;
    color: var(--accent-purple);
    font-size: 0.85rem;
}

.comment-item .comment-text {
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

/* ===== FORO ===== */
.foro-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: all 0.25s ease;
}

.foro-card:hover {
    border-color: rgba(192, 132, 252, 0.3);
    box-shadow: 0 4px 20px rgba(192, 132, 252, 0.1);
    transform: translateY(-2px);
}

/* ===== PERFIL ===== */
.profile-banner {
    height: 220px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    overflow: hidden;
    position: relative;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--bg-card);
    object-fit: cover;
    margin-top: -65px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* ===== ADMIN ===== */
.admin-table {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.admin-table table {
    color: var(--text-primary);
    margin-bottom: 0;
}

.admin-table thead {
    background: rgba(255, 255, 255, 0.05);
}

.admin-table thead th {
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
    padding: 0.85rem 1rem;
}

.admin-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.15s ease;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-table tbody td {
    padding: 0.75rem 1rem;
    vertical-align: middle;
    color: var(--text-primary);
}

/* ===== MODAL ===== */
.modal-content-dark {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.modal-header-dark {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    border-bottom: none;
}

.modal-footer-dark {
    border-top: 1px solid var(--border-color);
}

/* ===== ALERTAS ===== */
.alert-dark-info {
    background: rgba(96, 165, 250, 0.1);
    border: 1px solid rgba(96, 165, 250, 0.3);
    color: var(--accent-blue);
    border-radius: var(--radius-md);
}

.alert-dark-danger {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    border-radius: var(--radius-md);
}

.alert-dark-success {
    background: rgba(74, 222, 128, 0.1);
    border: 1px solid rgba(74, 222, 128, 0.3);
    color: #4ade80;
    border-radius: var(--radius-md);
}

.alert-dark-warning {
    background: rgba(251, 191, 36, 0.1);
    border: 1px solid rgba(251, 191, 36, 0.3);
    color: #fbbf24;
    border-radius: var(--radius-md);
}

/* ===== FOOTER ===== */
.footer-dark {
    background: rgba(22, 33, 62, 0.8);
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 1.25rem 0;
}

.footer-dark a {
    color: var(--accent-pink);
    text-decoration: none;
}

.footer-dark a:hover {
    color: var(--accent-purple);
}

/* ===== UTILIDADES ===== */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider-dark {
    border-top: 1px solid var(--border-color);
}

.glow-pink { text-shadow: 0 0 20px rgba(255, 107, 157, 0.3); }
.glow-purple { text-shadow: 0 0 20px rgba(192, 132, 252, 0.3); }

.hover-lift { transition: transform 0.2s ease; }
.hover-lift:hover { transform: translateY(-2px); }

/* ===== FORMULARIO - NSFW ===== */
.nsfw-toggle {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-md);
    padding: 0.8rem 1rem;
}

/* ===== BREADCRUMB-LIKE BACK LINKS ===== */
.back-link {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s ease;
    margin-bottom: 1rem;
}

.back-link:hover {
    color: var(--accent-pink);
}

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.4;
}

.empty-state p {
    font-size: 1.05rem;
}

/* ===== INPUT GROUP DARK ===== */
.input-group-dark .input-group-text {
    background: var(--bg-input);
    border: 1px solid var(--border-light);
    color: var(--text-secondary);
}

/* ===== TABLE FORM SELECT DARK ===== */
.form-select-sm-dark {
    background-color: var(--bg-input) !important;
    border: 1px solid var(--border-light) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 0.8rem;
    padding: 0.35rem 0.6rem;
}

.form-select-sm-dark option {
    background-color: var(--bg-input);
    color: var(--text-primary);
}

/* ===== ADMIN BUTTONS ===== */
.btn-admin-save {
    background: rgba(192, 132, 252, 0.15);
    color: var(--accent-purple);
    border: 1px solid rgba(192, 132, 252, 0.3);
    border-radius: var(--radius-sm);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-admin-save:hover {
    background: rgba(192, 132, 252, 0.25);
    color: var(--accent-purple);
}

.btn-admin-danger {
    background: rgba(255, 107, 157, 0.12);
    color: var(--accent-pink);
    border: 1px solid rgba(255, 107, 157, 0.25);
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-admin-danger:hover {
    background: rgba(255, 107, 157, 0.22);
    color: var(--accent-pink);
    border-color: rgba(255, 107, 157, 0.4);
}

.btn-admin-delete {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

.btn-admin-delete:hover {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

.btn-admin-success {
    background: rgba(74, 222, 128, 0.12);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.25);
    border-radius: var(--radius-pill);
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-admin-success:hover {
    background: rgba(74, 222, 128, 0.22);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.4);
}