:root {
    --primary: #ededed;       /* Minimalist white */
    --secondary: #333333;     /* Dark gray */
    --tertiary: #888888;
    --bg-base: #000000;       /* Vercel Pure Black */
    --glass-bg: rgba(15, 15, 17, 0.7);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-main: #ededed;
    --text-muted: #888888;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    scrollbar-width: thin;
    scrollbar-color: rgba(138, 43, 226, 0.4) transparent;
}

html {
    overflow-x: hidden;
}

/* Títulos grandes y llamativos */
h1,
h2,
h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    color: #ffffff;
}

/* Subtítulos o descripciones cortas debajo del título */
.description,
.subtitle {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    color: #cbd5e1;
    /* Un blanco lila/grisáceo para no cansar la vista */
}

/* Texto normal, párrafos y comandos del bot */
p,
span,
li,
a {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    line-height: 1.6;
}

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

body {
    background-color: var(--bg-base);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
}

.app-layout {
    display: flex;
    width: 100%;
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

.inline-emoji {
    width: 20px;
    height: 20px;
    vertical-align: middle;
    display: inline-block;
}

input[type="text"],
input[type="number"],
input[type="url"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-main) !important;
    font-size: 0.95rem;
    margin-top: 5px;
    outline: none;
    transition: all 0.2s ease;
    resize: vertical;
}

input[type="text"]:focus,
input[type="number"]:focus,
input[type="url"]:focus,
input[type="file"]:focus,
select:focus,
textarea:focus {
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.05);
}

select option {
    background-color: var(--bg-base);
    color: var(--text-main);
}

.sidebar {
    width: 280px;
    min-width: 280px;
    max-width: 280px;
    height: 100vh;
    max-height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
    z-index: 50;
    margin: 0;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

.server-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--glass-border);
}

.server-brand img {
    width: 40px;
    border-radius: 8px;
}

.server-name {
    font-weight: 600;
    font-size: 1.1rem;
}

.nav-item {
    display: block;
    padding: 10px 15px;
    color: var(--text-muted);
    text-decoration: none;
    border-radius: 8px;
    margin-bottom: 5px;
    transition: all 0.3s;
    cursor: pointer;
}

.nav-item:hover,
.nav-item.active {
    background: #ffffff;
    color: #1e293b;
    border-left: 3px solid var(--primary);
}

.nav-stats:hover,
.nav-stats.active {
    border-left-color: #B28DFF !important;
}

.nav-items:hover,
.nav-items.active {
    border-left-color: #FFB2F5 !important;
}

.nav-raids:hover,
.nav-raids.active {
    border-left-color: #A7C5EB !important;
}

.nav-rpg:hover,
.nav-rpg.active {
    border-left-color: #D980FA !important;
}

.nav-clans:hover,
.nav-clans.active {
    border-left-color: #FFB2F5 !important;
}

.nav-lootboxes:hover,
.nav-lootboxes.active {
    border-left-color: #A7C5EB !important;
}

.nav-casino:hover,
.nav-casino.active {
    border-left-color: #B28DFF !important;
}

.nav-roblox:hover,
.nav-roblox.active {
    border-left-color: #D980FA !important;
}

.nav-codigos:hover,
.nav-codigos.active {
    border-left-color: #FFB2F5 !important;
}

.nav-economy:hover,
.nav-economy.active {
    border-left-color: #A7C5EB !important;
}

.nav-store:hover,
.nav-store.active {
    border-left-color: #B28DFF !important;
}

.nav-vip:hover,
.nav-vip.active {
    border-left-color: #FFB2F5 !important;
}

.nav-mod:hover,
.nav-mod.active {
    border-left-color: #A7C5EB !important;
}

.nav-logs:hover,
.nav-logs.active {
    border-left-color: #D980FA !important;
}

.nav-social:hover,
.nav-social.active {
    border-left-color: #FFB2F5 !important;
}

.nav-levels:hover,
.nav-levels.active {
    border-left-color: #B28DFF !important;
}

.nav-tickets:hover,
.nav-tickets.active {
    border-left-color: #A7C5EB !important;
}

.nav-config:hover,
.nav-config.active {
    border-left-color: #D980FA !important;
}

.nav-group {
    margin-bottom: 5px;
}

.nav-group-title {
    padding: 10px 15px;
    color: var(--text-main);
    font-weight: 600;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.nav-group-title:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-group-title .arrow {
    font-size: 0.8rem;
    transition: transform 0.3s;
}

.nav-group.open .nav-group-title .arrow {
    transform: rotate(-180deg);
}

.nav-group-items {
    display: none;
    flex-direction: column;
    padding-left: 15px;
    margin-top: 5px;
    border-left: 1px solid var(--glass-border);
    margin-left: 15px;
}

.nav-group.open .nav-group-items {
    display: flex;
}

.nav-group-items .nav-item {
    padding: 8px 15px;
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.main-content {
    flex: 1;
    min-width: 0;
    min-height: 0; /* Fix flex child overflow */
    padding: 1.5rem 0;
    background: radial-gradient(circle at 100% 0%, rgba(0, 132, 255, 0.06), transparent 50%);
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%; /* Fill the app-layout exactly */
    box-sizing: border-box;
    scrollbar-gutter: stable;
}

.header-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.tab-content {
    display: none;
    width: 100%;
    max-width: 1280px;               /* Un poco más amplio */
    margin: 0 auto;
    padding: 2rem 1rem 1rem 1rem;
    box-sizing: border-box;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0) 100%);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 0 auto 1.5rem auto;
    transition: all 0.2s ease;
    position: relative;
    max-width: 100%;
    box-sizing: border-box;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 24px rgba(0,0,0,0.2);
}

/* Allow horizontal scrolling specifically for tables if needed */
.card-table-wrapper {
    overflow-x: auto;
    width: 100%;
}

.btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    height: fit-content;
    background: #1e293b; /* Gris oscuro un poco azulado */
    color: #ffffff; /* Letras blancas */
    border: 1px solid transparent;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    box-shadow: none;
}

.btn::after {
    display: none;
}

.btn:hover, .btn.active {
    background: #ffffff;
    color: #1e293b !important;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.btn-danger {
    background: #e5484d !important;
    color: white !important;
}

.btn-danger:hover {
    background: #ff4d4d !important;
    color: white !important;
    box-shadow: 0 0 0 4px rgba(229, 72, 77, 0.2) !important;
}

.btn-success {
    background: #30a46c !important;
    color: white !important;
}

.btn-success:hover {
    background: #46ba7f !important;
    color: white !important;
    box-shadow: 0 0 0 4px rgba(48, 164, 108, 0.2) !important;
}

/* Custom Checkboxes */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    min-width: 22px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--glass-border);
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    vertical-align: middle;
    display: inline-block;
}

input[type="checkbox"]:checked {
    background: var(--primary);
    border-color: var(--secondary);
    box-shadow: 0 0 10px rgba(138, 43, 226, 0.4);
}

input[type="checkbox"]:checked::after {
    content: '✔';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1280px;
    margin: 0 auto !important;                  /* Centrado */
}

@media (max-width: 991px) {
    .grid-2 {
        grid-template-columns: 1fr;
    }
}

.embed-builder-layout.grid-2 {
    max-width: 1280px;
    margin: 0 auto !important;
    padding: 0 1rem;
}

.builder-preview {
    background: #313338;
    border-radius: 8px;
    padding: 20px;
    position: sticky;
    top: 20px;
    height: fit-content;
    max-width: 480px;
    margin: 0 auto !important;                  /* Centrado fuerte */
}


.item-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.item-card:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 210, 255, 0.15);
    border-color: rgba(138, 43, 226, 0.4);
}

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

.item-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.item-stats {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: var(--bg-base);
    border: 1px solid var(--glass-border);
    padding: 2rem;
    border-radius: 12px;
    width: 400px;
    max-width: 90%;
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.modal.closing .modal-content {
    animation: modalPopOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes modalPop {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes modalPopOut {
    from {
        transform: scale(1);
        opacity: 1;
    }

    to {
        transform: scale(0.9);
        opacity: 0;
    }
}

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

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

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

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

/* Rarity Badges */
.badge-rareza {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.badge-rareza::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    animation: badge-shine 6s infinite linear;
    transform: skewX(-20deg);
}

@keyframes badge-shine {
    0% {
        left: -100%;
    }

    20% {
        left: 200%;
    }

    100% {
        left: 200%;
    }
}

.rareza-comun {
    background: linear-gradient(135deg, #2c2e35 0%, #1e2025 100%);
    color: #a5a9b4;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.rareza-infrecuente {
    background: linear-gradient(135deg, #163a21 0%, #0d2515 100%);
    color: #7fe092;
    border: 1px solid rgba(46, 213, 115, 0.15);
    box-shadow: 0 0 10px rgba(46, 213, 115, 0.2);
}

.rareza-raro {
    background: linear-gradient(135deg, #10335e 0%, #0a213f 100%);
    color: #7cb3f5;
    border: 1px solid rgba(30, 144, 255, 0.15);
    box-shadow: 0 0 10px rgba(30, 144, 255, 0.2);
}

.rareza-epico {
    background: linear-gradient(135deg, #441751 0%, #2b0e34 100%);
    color: #df9cf7;
    border: 1px solid rgba(155, 89, 182, 0.15);
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.2);
}

.rareza-legendario {
    background: linear-gradient(135deg, #5c4e14 0%, #3e350d 100%);
    color: #fae170;
    border: 1px solid rgba(241, 196, 15, 0.15);
    box-shadow: 0 0 10px rgba(241, 196, 15, 0.2);
}

.rareza-mitico {
    background: linear-gradient(135deg, #6c1a1a 0%, #471111 100%);
    color: #faa0a0;
    border: 1px solid rgba(231, 76, 60, 0.15);
    box-shadow: 0 0 10px rgba(231, 76, 60, 0.2);
}

.rareza-exotico {
    background: linear-gradient(135deg, #53115e 0%, #350b3d 100%);
    color: #faa3fa;
    border: 1px solid rgba(255, 0, 255, 0.15);
    box-shadow: 0 0 12px rgba(255, 0, 255, 0.3);
}

.rareza-divino {
    background: linear-gradient(90deg, #ff007f, #7f00ff, #00ffff, #ff007f);
    background-size: 200% auto;
    color: #fff;
    border: none;
    box-shadow: 0 0 15px rgba(255, 0, 127, 0.5);
    text-shadow: 0 0 5px rgba(255, 255, 255, 0.8);
    animation: rainbow-glow 3s linear infinite;
}

@keyframes rainbow-glow {
    0% {
        background-position: 0% 50%;
    }

    100% {
        background-position: -200% 50%;
    }
}

.badge-source {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid transparent;
}

.source-custom {
    background: rgba(46, 213, 115, 0.1);
    border-color: rgba(46, 213, 115, 0.3);
    color: #2ed573;
    box-shadow: 0 0 5px rgba(46, 213, 115, 0.2);
}

.source-default {
    background: rgba(160, 165, 181, 0.1);
    border-color: rgba(160, 165, 181, 0.3);
    color: #a0a5b5;
    box-shadow: 0 0 5px rgba(160, 165, 181, 0.2);
}

/* Emoji Preview */
.emoji-preview {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(0, 0, 0, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
    margin-right: 15px;
}

.emoji-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Mobile Responsiveness */
.mobile-header {
    display: none;
    padding: 15px;
    background: rgba(6, 9, 19, 0.9);
    border-bottom: 1px solid var(--glass-border);
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 99;
}

.hamburger-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Animated Backgrounds */
.space-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background: radial-gradient(circle at 15% 50%, rgba(178, 141, 255, 0.15), transparent 40%),
        radial-gradient(circle at 85% 30%, rgba(255, 178, 245, 0.15), transparent 40%);
    animation: pulse-bg 15s infinite alternate;
}

@keyframes pulse-bg {
    0% {
        opacity: 0.7;
    }

    100% {
        opacity: 1;
    }
}

.stars {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    background-repeat: repeat;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.6));
    background-image:
        radial-gradient(1.5px 1.5px at 40px 70px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 150px 160px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(1.5px 1.5px at 90px 40px, #fff, rgba(0, 0, 0, 0)),
        radial-gradient(2px 2px at 10px 190px, #fff, rgba(0, 0, 0, 0));
    background-size: 250px 250px;
    opacity: 0.15;
    animation: subtle-pulse 15s ease-in-out infinite alternate;
}

@keyframes subtle-pulse {
    0% {
        opacity: 0.1;
    }
    100% {
        opacity: 0.25;
    }
}

@media (max-width: 768px) {
    .app-layout {
        position: relative;
        overflow-x: hidden;
    }

    body {
        overflow-x: hidden;
    }

    /* Sidebar Responsive Fixes */
    .sidebar-overlay.show {
        display: block;
        opacity: 1;
    }

    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        z-index: 1000;
        width: 280px;
        height: 100vh;
        padding: 1.5rem 1rem;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    /* Main Content Fixes */
    .main-content {
        width: 100%;
        padding: 1rem 1rem 2rem 1rem;
        overflow-x: hidden;
    }

    .mobile-header {
        display: flex;
    }

    /* Typography & Cards Fixes */
    .header-title {
        font-size: 1.5rem;
        word-wrap: break-word;
    }

    .card {
        padding: 1rem !important;
        margin-bottom: 1rem;
        max-width: 100% !important;
    }

    /* Grids */
    .grid,
    .grid-2 {
        grid-template-columns: 1fr !important;
    }

    .form-row {
        flex-direction: column;
        gap: 5px;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 90vh;
        overflow-y: auto;
    }

    /* Charts & Leaderboards styles */
    .chart-card {
        background: var(--glass-bg);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        padding: 20px;
        margin-bottom: 20px;
        position: relative;
        min-height: 320px;
        display: flex;
        flex-direction: column;
    }

    .chart-card h3 {
        margin-bottom: 15px;
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .chart-container {
        position: relative;
        flex-grow: 1;
        width: 100%;
        height: 250px;
    }

    .leaderboard-table {
        width: 100%;
        border-collapse: collapse;
    }

    .leaderboard-table th,
    .leaderboard-table td {
        padding: 10px;
        text-align: left;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        font-size: 0.95rem;
    }

    .leaderboard-table th {
        color: var(--primary);
        font-weight: 600;
    }

    .leaderboard-table tr:hover td {
        background: rgba(255, 255, 255, 0.02);
    }

    .stats-loader-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 400px;
        width: 100%;
    }

    .stats-loader {
        border: 4px solid rgba(255, 255, 255, 0.1);
        width: 50px;
        height: 50px;
        border-radius: 50%;
        border-left-color: var(--primary);
        animation: spin 1s linear infinite;
        margin-bottom: 15px;
    }

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

        100% {
            transform: rotate(360deg);
        }
    }

    /* Mobile UI Fixes */
    .item-card {
        width: 100% !important;
        max-width: 100% !important;
    }
    #unsaved-bar {
        width: 90% !important;
        flex-direction: column !important;
        gap: 15px !important;
        padding: 15px !important;
        border-radius: 20px !important;
        bottom: 10px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    .form-row, .btn-group {
        flex-direction: column !important;
        width: 100%;
        gap: 10px !important;
    }
    .item-card .btn, .card .btn, .btn {
        width: 100% !important;
    }
    .item-card > div {
        flex-wrap: wrap !important;
    }
    .builder-preview {
        position: relative !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }
    .embed-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    .embed-card > div {
        flex-wrap: wrap !important;
        width: 100% !important;
    }
    .card > div[style*="justify-content: space-between"] {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }
    .card > div[style*="justify-content: space-between"] > div {
        width: 100% !important;
        flex-direction: column !important;
        align-items: stretch !important;
    }
    .card > div[style*="justify-content: space-between"] > div > button,
    .card > div[style*="justify-content: space-between"] > div > input {
        width: 100% !important;
    }
    .form-group > div[style*="display: flex"] {
        flex-direction: column !important;
        gap: 10px !important;
    }
    .form-group > div[style*="display: flex"] > input {
        width: 100% !important;
    }
}

/* Fix for success circle SVG overflow */
.svg-success {
    overflow: visible !important;
}

/* --- ANIMACIONES GLOBALES DE INTERFAZ NYXIAN --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-zoom-in {
    animation: zoomIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Efectos de Hover Premium en Botones y Tarjetas */
.btn-glow {
    transition: all 0.3s ease;
}
.btn-glow:hover {
    box-shadow: 0 0 20px rgba(0, 132, 255, 0.45);
    transform: translateY(-2px);
}

.card-hover-scale {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.card-hover-scale:hover {
    transform: translateY(-4px) scale(1.01);
    border-color: rgba(0, 132, 255, 0.35);
    box-shadow: 0 12px 30px rgba(0, 132, 255, 0.1);
}

.discord-mention {
    background-color: rgba(88, 101, 242, 0.3);
    color: #c9cdfb;
    padding: 0 4px;
    border-radius: 3px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.1s ease;
}

.discord-mention:hover {
    background-color: rgba(88, 101, 242, 0.6);
    color: #ffffff;
}

/* ==========================================================================
   NYXIAN INTERACTIVE EMBED BUILDER & PREVIEW CANVAS
   ========================================================================== */
.embed-editor-wrapper {
    background: #2f3136;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    color: #dcddde;
    font-family: 'gg sans', 'Noto Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin-bottom: 20px;
}

.embed-editor-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.embed-editor-title {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.embed-preview-toggle-btn {
    background: #5865f2;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.embed-preview-toggle-btn:hover {
    background: #4752c4;
}

.embed-preview-toggle-btn.active {
    background: #2ed573;
    color: #111;
}

.discord-message-frame {
    display: flex;
    gap: 16px;
    background: #36393f;
    border-radius: 8px;
    padding: 16px;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #5865f2;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    overflow: hidden;
}

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

.discord-message-body {
    flex: 1;
    min-width: 0;
}

.discord-header-info {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.discord-bot-name {
    font-weight: 600;
    color: #fff;
    font-size: 1rem;
}

.discord-bot-badge {
    background: #5865f2;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
}

.discord-timestamp {
    font-size: 0.75rem;
    color: #72767d;
}

/* Embed Box */
.discord-embed-card {
    background: #2f3136;
    border-left: 4px solid #5865f2;
    border-radius: 4px;
    padding: 12px 16px;
    max-width: 520px;
    margin-top: 8px;
    position: relative;
}

.embed-inline-input {
    background: transparent;
    border: 1px dashed transparent;
    color: inherit;
    width: 100%;
    outline: none;
    border-radius: 4px;
    padding: 3px 6px;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.embed-inline-input:hover, .embed-inline-input:focus {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(0, 0, 0, 0.2);
}

.embed-inline-input::placeholder {
    color: #72767d;
    font-style: italic;
}

.embed-message-content {
    font-size: 0.95rem;
    color: #dcddde;
    margin-bottom: 8px;
}

.embed-author-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    margin-bottom: 6px;
}

.embed-title-section {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 6px;
}

.embed-desc-section {
    font-size: 0.875rem;
    color: #dcddde;
    white-space: pre-wrap;
    margin-bottom: 10px;
}

.embed-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 10px;
}

.embed-field-item {
    background: rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.embed-footer-section {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.75rem;
    color: #72767d;
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.embed-color-picker-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 15px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.embed-color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.2);
    cursor: pointer;
    padding: 0;
}

/* Preview parsed content styling */
.preview-mode .embed-placeholder-hidden {
    display: none !important;
}

.discord-code-block {
    background: #202225;
    border: 1px solid #18191c;
    border-radius: 4px;
    padding: 8px 12px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #b9bbbe;
    margin: 6px 0;
    overflow-x: auto;
}

.discord-inline-code {
    background: #202225;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: 'Consolas', 'Courier New', monospace;
    font-size: 0.85rem;
    color: #b9bbbe;
}

.discord-spoiler {
    background: #202225;
    color: transparent;
    border-radius: 3px;
    padding: 0 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.discord-spoiler.revealed {
    background: rgba(255, 255, 255, 0.1);
    color: #dcddde;
}

.discord-h1 { font-size: 1.35rem; font-weight: 800; color: #fff; margin: 8px 0 4px 0; }
.discord-h2 { font-size: 1.15rem; font-weight: 700; color: #fff; margin: 6px 0 4px 0; }
.discord-h3 { font-size: 1.05rem; font-weight: 600; color: #fff; margin: 4px 0 2px 0; }
.discord-quote { border-left: 4px solid #4f545c; padding-left: 8px; color: #b9bbbe; margin: 4px 0; }

/* ==========================================================================
   UNIVERSAL ITEM SELECTOR MODAL & ACCORDION
   ========================================================================== */
.item-selector-modal {
    max-width: 720px !important;
    width: 90vw;
}

.item-selector-search {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-size: 1rem;
    margin-bottom: 20px;
}

.item-accordion-category {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    margin-bottom: 10px;
    overflow: hidden;
}

.item-accordion-header {
    padding: 14px 18px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    transition: background 0.2s ease;
    user-select: none;
}

.item-accordion-header:hover {
    background: rgba(255, 255, 255, 0.06);
}

.item-accordion-content {
    display: none;
    padding: 12px;
    gap: 8px;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.item-accordion-category.open .item-accordion-content {
    display: grid;
}

.shop-accordion-content {
    display: none;
}

.shop-accordion-category.open .shop-accordion-content {
    display: block !important;
}

.item-select-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 10px 12px;
    border-radius: 6px;
    color: #fff;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
    width: 100%;
}

.item-select-btn:hover {
    background: rgba(88, 101, 242, 0.25);
    border-color: #5865f2;
    transform: translateY(-1px);
}

.item-select-emoji {
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.item-select-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.item-select-name {
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-select-id {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   MOBILE & RESPONSIVE DESIGN STYLES
   ========================================================================== */
.mobile-sidebar-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--border-glass);
    color: #fff;
    font-size: 1.25rem;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-sidebar-toggle:hover {
    background: rgba(168, 85, 247, 0.2);
    border-color: var(--primary);
}

@media (max-width: 992px) {
    .mobile-sidebar-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .app-layout {
        position: relative;
        overflow: hidden;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 999;
        width: 280px;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.8);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .topbar {
        padding: 12px 16px;
        gap: 10px;
        flex-wrap: wrap;
    }

    .topbar-actions {
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    .dashboard-main {
        padding: 15px !important;
    }

    .grid, .form-row {
        grid-template-columns: 1fr !important;
    }

    .header-title {
        font-size: 1.5rem !important;
    }

    .modal-content {
        width: 95vw !important;
        max-width: 95vw !important;
        padding: 16px !important;
        margin: 10px !important;
        max-height: 90vh !important;
        overflow-y: auto !important;
    }

    .discord-message-frame {
        padding: 10px !important;
    }

    .discord-embed-card {
        padding: 10px !important;
    }

    .item-card {
        padding: 12px !important;
    }

    .topbar {
        padding: 8px 12px !important;
        gap: 6px !important;
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
    }

    .server-selector-pill {
        padding: 4px 10px !important;
        gap: 8px !important;
        max-width: 160px !important;
    }

    .server-info-title {
        font-size: 0.85rem !important;
        max-width: 105px !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .server-id-sub {
        display: none !important;
    }

    .topbar-actions {
        gap: 6px !important;
        margin-left: auto !important;
        align-items: center !important;
    }

    .topbar-actions .btn {
        padding: 4px 10px !important;
        font-size: 0.75rem !important;
    }

    .user-profile-pill {
        padding: 2px 6px !important;
        background: transparent !important;
        border: none !important;
    }

    .user-profile-pill span {
        display: none !important;
    }

    .global-search-wrapper {
        order: 4 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 4px !important;
    }

    .global-search-wrapper #global-search-input {
        height: 32px !important;
        font-size: 0.8rem !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
        background: rgba(255, 255, 255, 0.05) !important;
        border-radius: var(--radius-full) !important;
    }

    .global-search-wrapper .ctrl-k-badge {
        display: none !important;
    }

    /* Horizontal scroll for table wrappers */
    .table-responsive {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}



