        /* Estilos personalizados para el dark premium */
        body {
            background: #0B0F19;
            color: #E2E8F0;
            font-family: 'Inter', system-ui, -apple-system, sans-serif;
        }
        .glass-card {
            background: rgba(30, 41, 59, 0.7);
            backdrop-filter: blur(12px);
            border: 1px solid rgba(255, 255, 255, 0.06);
            box-shadow: 0 20px 40px -12px rgba(0, 0, 0, 0.8);
        }
        .input-premium {
            background: #1E293B;
            border: 1px solid #334155;
            color: #F1F5F9;
            transition: all 0.2s ease;
        }
        .input-premium:focus {
            border-color: #A78BFA;
            box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.2);
            outline: none;
        }
        .input-premium::placeholder {
            color: #64748B;
        }
        .btn-primary {
            background: linear-gradient(135deg, #8B5CF6, #6D28D9);
            color: white;
            font-weight: 600;
            transition: all 0.2s ease;
        }
        .btn-primary:hover {
            transform: scale(1.02);
            box-shadow: 0 8px 25px -5px rgba(139, 92, 246, 0.4);
        }
        .btn-primary:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }
        .dropdown-item {
            transition: background 0.15s ease;
        }
        .dropdown-item:hover {
            background: #334155;
        }
        .badge-existing {
            background: #10B981;
            color: #0B0F19;
            font-weight: 600;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .badge-new {
            background: #F59E0B;
            color: #0B0F19;
            font-weight: 600;
            padding: 4px 12px;
            border-radius: 20px;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        .spinner {
            border: 2px solid rgba(255, 255, 255, 0.2);
            border-top-color: #A78BFA;
            border-radius: 50%;
            width: 20px;
            height: 20px;
            animation: spin 0.8s linear infinite;
            display: inline-block;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        .preview-box {
            border: 2px dashed #475569;
            border-radius: 12px;
            padding: 8px;
            transition: border-color 0.2s;
            max-width: 200px;
        }
        .preview-box img {
            border-radius: 8px;
            max-height: 200px;
            object-fit: cover;
        }
        .section-title {
            font-size: 0.8rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: #94A3B8;
            border-bottom: 1px solid #334155;
            padding-bottom: 8px;
            margin-bottom: 20px;
        }
        /* Scrollbar personalizada */
        ::-webkit-scrollbar {
            width: 6px;
        }
        ::-webkit-scrollbar-track {
            background: #1E293B;
        }
        ::-webkit-scrollbar-thumb {
            background: #475569;
            border-radius: 8px;
        }
        ::-webkit-scrollbar-thumb:hover {
            background: #64748B;
        }
        /* ===== TOAST DE ERROR FLOTANTE ===== */
        .toast-container {
        position: fixed;
        top: 24px;
        right: 24px;
        z-index: 9999;
        max-width: 400px;
        width: 100%;
        animation: slideInRight 0.4s ease;
        }
        .toast {
        background: #1E293B;
        border-left: 5px solid #EF4444;
        border-radius: 12px;
        padding: 16px 20px;
        box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.8);
        display: flex;
        align-items: flex-start;
        gap: 12px;
        }
        .toast-icon {
        color: #EF4444;
        font-size: 1.5rem;
        flex-shrink: 0;
        margin-top: 2px;
        }
        .toast-content {
        flex: 1;
        }
        .toast-title {
        font-weight: 600;
        color: #F1F5F9;
        font-size: 0.95rem;
        }
        .toast-message {
        color: #94A3B8;
        font-size: 0.9rem;
        margin-top: 4px;
        line-height: 1.4;
        }
        .toast-close {
        background: none;
        border: none;
        color: #64748B;
        font-size: 1.2rem;
        cursor: pointer;
        padding: 0 4px;
        transition: color 0.2s;
        }
        .toast-close:hover {
        color: #F1F5F9;
        }
        @keyframes slideInRight {
        from { transform: translateX(120%); opacity: 0; }
        to { transform: translateX(0); opacity: 1; }
        }
        @keyframes fadeOut {
        to { opacity: 0; transform: translateY(-20px); }
        }
        .toast-fade-out {
        animation: fadeOut 0.3s ease forwards;
        }
        .btn-secondary {
        background: #334155;
        color: #E2E8F0;
        border: 1px solid #475569;
        transition: all 0.2s ease;
        }
        .btn-secondary:hover {
        background: #475569;
        border-color: #64748B;
        transform: scale(1.02);
        }
        /* Toast - éxito */
        .toast-success {
        border-left: 5px solid #22C55E !important;
        }
        .toast-success .toast-icon {
        color: #22C55E !important;
        }

        /* Toast - error */
        .toast-error {
        border-left: 5px solid #EF4444 !important;
        }
        .toast-error .toast-icon {
        color: #EF4444 !important;
        }
        /* Modal overlay */
        .modal-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(6px);
        display: flex;
        justify-content: center;
        align-items: center;
        z-index: 10000;
        animation: fadeIn 0.3s ease;
        }
        .modal-overlay.hidden {
        display: none;
        }
        .modal-card {
        background: #1E293B;
        border: 1px solid #334155;
        border-radius: 16px;
        max-width: 450px;
        width: 90%;
        padding: 24px;
        box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.9);
        animation: slideUp 0.4s ease;
        }
        .modal-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid #334155;
        padding-bottom: 12px;
        }
        .modal-header h3 {
        font-size: 1.1rem;
        font-weight: 600;
        color: #F1F5F9;
        }
        .modal-close-btn {
        background: none;
        border: none;
        color: #64748B;
        font-size: 1.2rem;
        cursor: pointer;
        transition: color 0.2s;
        }
        .modal-close-btn:hover { color: #F1F5F9; }
        .modal-body {
        padding: 20px 0;
        }
        .modal-body p {
        color: #E2E8F0;
        line-height: 1.6;
        }
        .modal-warning {
        color: #FCA5A5 !important;
        font-size: 0.9rem;
        margin-top: 12px;
        border-top: 1px solid #334155;
        padding-top: 12px;
        }
        .modal-footer {
        display: flex;
        justify-content: flex-end;
        gap: 12px;
        border-top: 1px solid #334155;
        padding-top: 16px;
        }
        .btn-modal-cancel {
        background: #334155;
        color: #E2E8F0;
        border: none;
        padding: 8px 20px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
        }
        .btn-modal-cancel:hover { background: #475569; }
        .btn-modal-danger {
        background: #DC2626;
        color: white;
        border: none;
        padding: 8px 20px;
        border-radius: 8px;
        cursor: pointer;
        transition: background 0.2s;
        }
        .btn-modal-danger:hover { background: #B91C1C; }

        .chapter-card {
        background: #1E293B;
        border: 1px solid #334155;
        border-radius: 10px;
        padding: 12px 16px;
        transition: all 0.2s ease;
        display: flex;
        justify-content: space-between;
        align-items: center;
        }
        .chapter-card:hover {
        border-color: #64748B;
        transform: translateY(-2px);
        box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
        }
        .chapter-info {
        display: flex;
        flex-direction: column;
        }
        .chapter-number {
        font-weight: 600;
        color: #F1F5F9;
        font-size: 0.95rem;
        }
        .chapter-title {
        color: #94A3B8;
        font-size: 0.8rem;
        }
        .chapter-date {
        color: #64748B;
        font-size: 0.7rem;
        margin-top: 2px;
        }
        .chapter-actions {
        display: flex;
        gap: 8px;
        }
        .btn-delete {
        background: #7F1D1D;
        color: #FCA5A5;
        border: none;
        padding: 6px 12px;
        border-radius: 6px;
        font-size: 0.8rem;
        cursor: pointer;
        transition: background 0.2s;
        display: flex;
        align-items: center;
        gap: 4px;
        }
        .btn-delete:hover {
        background: #991B1B;
        color: #FECACA;
        }

        @keyframes fadeIn {
        from { opacity: 0; }
        to { opacity: 1; }
        }
        @keyframes slideUp {
        from { transform: translateY(40px); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
        }

        /* ===== HISTORIAL DE SUBIDAS ===== */
        .history-card {
            display: flex;
            align-items: center;
            gap: 12px;
            background: #1E293B;
            border: 1px solid #334155;
            border-radius: 10px;
            padding: 10px 14px;
            transition: all 0.2s ease;
            cursor: default;
        }
        .history-card:hover {
            border-color: #64748B;
            transform: translateY(-2px);
            box-shadow: 0 8px 20px -8px rgba(0, 0, 0, 0.6);
        }
        .history-cover {
            width: 50px;
            height: 70px;
            border-radius: 6px;
            object-fit: cover;
            flex-shrink: 0;
            background: #0B0F19;
        }
        .history-info {
            flex: 1;
            min-width: 0;
        }
        .history-title {
            font-weight: 600;
            color: #F1F5F9;
            font-size: 0.85rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .history-chapter {
            font-size: 0.75rem;
            color: #A78BFA;
        }
        .history-date {
            font-size: 0.65rem;
            color: #64748B;
            margin-top: 2px;
        }
        .history-empty {
            color: #64748B;
            text-align: center;
            padding: 20px 0;
            font-size: 0.9rem;
        }